I expect to use my Photon application from two different WiFi networks. So I added to the setup() code of the app the setting of the credentials for the two WiFi networks, let’s call then WiFiA and WiFiB. I have been using WiFiA for my testing (WiFiB is not visible from the location of WiFiA) and after the app was running as expected, it was time to add the code to set both credentials:
As per the documentation, this adds the network credentials to the list of up to 5 WiFi networks that can be held in the Photon. The list is used the next time the Photon is reset.
After I reset the Photon, it never connected to the cloud again. I assume since it was WiFiB which I programmed last, it was the first in the list of networks to attempt to connect to. Upon a reset the Photon continued to blink fast Green while looking for WiFiB which is not accessible from the location of the Photon. I expected the Photon to back off and successfully connect to WiFiA which was also in the list of SSIDs but it never got out of the flashing Green mode and I am assuming that it was stuck on WiFiB and never tried WiFiA which it had been using for several days.
Now that it could not connect to WiFiA, I was unable to flash a new version of the application. The Photo was not connected to the cloud. I attempted to go into Safe Mode but that also left me with the flashing Green LED. I could not fix this using CLI either for the same reason. I ended up having to use the DFU Utility to reload the firmware, then erase the list of SSIDs using the setup button, then using the Particle IOS app to program a good set of credentials. I had tried using the CLI command “particle setup wifi” and selected the good network but it still would not connect. It was only after using the IOS app that I got back to the cloud.
I am afraid to run the test again where I set both sets of credentials until I get some feedback from the community. Is there a known problem with the Photon when multiple SSIDs are in its list of networks? Does the Photon have a known problem of connecting to another network in its list if the first network in the list does not respond? To me it appeared that I was stuck on a SSID which was not available from the current location of the Photon.