Particle is almost always disconnected from network [SOLVED]


I have a very simple program running on the latest firmware (0.4.9):


void setup()
    Spark.function("rssi", rssi);
void loop()
   // Nothing to do here
int rssi(String command) {
        return WiFi.RSSI();

Unfortunately the Photon is almost always disconnected from the network with the LED flashing green.

When connected the call to “rssi” returns a value between -55 and -75.

Any ideas on how to debug. Connecting a USB cable is fairly difficult.

I have a 5v power supply connected to Vin. The external antenna is a 2.4ghz “rubber duck”.



Forgiv the obvious question, but do you have an external antenna connected to the u.Fl connector?

Happily yes. I’ve tried another u.Fl cable as well. And several different antennae. Hum, my mobile phone doesn’t have any problem in the location though I hesitate to extrapolate too much from that fact since I don’t know the orientations of the phone’s antennae. Running a network analyzer on my phone I’m seeing many overlapping networks. Any insight on the robustness of the firmware to deal with an environment with too many 2.4 ghz networks on the same channel?

How did you configure your wifi credentials?

If you configure your wifi credentials using the CLI or the mobile app, this uses the photon to scan for nearby networks. That will give you a picture of what the device can see.

I used the CLI to provision. Unfortunately I provisioned on my bench then installed.

I know nothing about RF and watching this video confirmed that fact: So counterintuitively I placed the antenna just 12 inches above the floor and lo and behold I haven’t dropped the connection once over several hours.

Hum, maybe this will be a clue to someone who understands and implements Wi-Fi drivers.

Regardless, your question about the u.Fl connector was just the nudge I needed to try different cables and move the antenna lower instead of higher. Strange but effective. (The RSSI is now -51, yeah.)

1 Like

Just something interesting on the RSSI. My Core often returns 2 (timeout) for the RSSI as a return from Particle.function() which means it’s connected but failing to read the RSSI (or find it in the table). When it first boots, it returns a value, but the first time it drops out, it goes to 2 and remains. I haven’t seen that with the Photon, but it’s much closer to the router.

I have the same problem with my Core - originally reporting -58dB but suddenly now it is showing 2 - but must be working otherwise the dashboard wouldn’t be getting the data.