[solved] Photon stops connecting with same WiFi after Firmware upgrade from 0.5.3 to 0.6.0

So lately we have been encountering this issue that after we make a firmware upgrade of Photon P1 (specifically from 0.5.3 to 0.6.0), the photon stops connecting to the same WiFi and it only works with other WiFi credentials.

So we had this issue on 3 photon P1’s in the past 4-5 days. Now we are a bit scare to make a firmware upgrade on any of our other customer Photons. There seems to be an obvious issue that may be we have not handled before a firmware upgrade?


Hi @NS_Blue, we are not aware of any loss of credentials when upgrading. Would you give us some more details about why type of router you are connecting to, encryption protocol, cipher, and password length. How are you entering the credentials, and how are you performing the upgrade. Does the same thing happen if you change your user app to something very simple like a blinking D7 LED? If not that might suggest something in the user firmware. Which hardware are you using exactly? It sounds like a P1 module, but is it your own PCB design or the Sparkfun Photon Redboard (which is P1 based).

1 Like

1.Hardware is Photon P1 on our own PCB (not sparkfun).
2. Router encryption protocol - WPA2 PSK
3. Password length - 15
4. So we have been successfully flashing our same app across 0.5.3 without any issue.

This time the situation is that the Photon P1 had 0.5.3 and when we flashed the same app only selecting the firmware from 0.5.3 to 0.6.0 this issue is what we are encountering.

Also, the wifi credentials is not getting wiped out as we have a cloud variable in which we are storing all the wifi credentials. so I do not think thats the issue. Also, when we powerup another hotspot from the known networks it connects immediately. It just stops connecting to the same network. (I have been using network, hotspot, ssid, wifi interchangable - apologies if thats causing any confusion)

@BDub any help?

Guys I need urgent help with this issue. We now have 5 photons coming in from the customer due to this issue. This is a grave issue where the photon stops communicating with the same wifi after firmware upgrade from 0.5.3 to 0.6.0. When we just flash the new application without the firmware upgrade everything is fine the photon reconnects to the same wifi. Business is as usual. Please help urgently!!

@NS_Blue, are you making use of retained variables in your code?

@NS_Blue thanks for the info. Have you tried this with just a simple D7 LED blinky app? Could you provide us with a minimal version of your user app that exhibits the problem?


Because I’m a bit at the mercy of your situation without being able to replicate it, forgive me if these are a lot of questions but they should help us narrow down the problem.

  • It sounds like you have multiple Wi-Fi credentials saved. Does the problem occur if you clear all credentials and use only one network? Does it happen on when connected to both networks individually or just one?
  • You are storing the Wi-Fi credentials in a Cloud variable, is that both networks worth of info? So when it’s not connecting after upgrading, and you enable the hotspot for example and it connects… that variable contains the Wi-Fi credentials from the other network that wasn’t connecting still? Are you polling this information continuously? Are you setting the Wi-Fi credentials with the API in firmware as well, or just reading out the credentials?
  • When you update your user app from 0.5.3 to 0.6.0, normally what would happen is the device would reboot, copy the new user app into memory and run in Safe Mode due to system firmware still being on 0.5.3. The Cloud Safe Mode Healer would then update your system firmware parts and the device would reboot two more times, after which it would boot and run your user app again. So can you describe exactly what you are seeing on your device when you flash the new 0.6.0 user app… Magenta RGB LED during flashing process… and then what? Also after you enable your hotspot, what happens with the RGB LED, and are you pressing RESET at all and do you find that you need to press RESET?
  • You said you have implemented your own PCB. What components and signals are connected to your RST input?
1 Like

Do you mean using eeprom? If thats the case yes we are using eeprom to store things continuously during the program. How would that affect?

retained variables are not in EEPROM but in a special battery backed SRAM area of the device

Sorry I was out for a few days for product demo to another city. So couldnt reply back. But we did the tests that you guys asked. So to give a little more insight upgrading the code on photon P1, when we upgrade with the Blink app it works fine.

So that directs us into believing that the issue is with our application. But it is weird that when we flash the code photon stops connecting to the same wifi but connects onto other wifi in its list. What could be the issue?

Another observation - when we had recently flashed our app keep the firmware also the same as 0.5.3 then also it had stopped connecting over the same wifi. But when we enabled the other wifi photon quickly connected to the other one and we could flash the same application code on the new wifi without it giving any such problems.

So to summarise whatever little I have understood, the first time we flash the latest app code even keeping the firmware the same the photon stops communicating with the same wifi. And after we enable the other wifi (which it knows) it connects successfully and then we can flash the app code as many times without such an issue. It just becomes like its forgotten the wifi credntials as if its been deleted. But when we read the wifi credentials stored it shows that wifi credential in its list.

Nope. Not using retained variables.

Hi @NS_Blue would you please go through and address each of my questions? Thanks!

Hi Guys… Sorry for all the commotion… I was trouble-shooting the issue and realized that I had set watchdog timer to 5 sec. This was not letting the photon to connect to the wifi.

Apologies again. Problem solved!!!

That’s quite alright @NS_Blue I’m glad you found the issue! That does make complete sense now as well, and I’ll have a new question to ask if this pattern should arise again :slight_smile: Thanks for the update!