Not able to erase/reset Photon

I accidentally uploaded an infinite loop to a Photon. The code was to turn on the LED Red. Not it just keeps turning the LED red. I am not able to erase that code no matter what.

  1. I have tried pressing Setup and Reset, leaving the reset and keep pressing the setup. It did not work.

  2. I tried long pressing Setup(about 10 seconds) until it was rapidly blinking blue. It did not work.

Is there a way to do Factory reset or remove the uploaded code ? When it is connected to the cloud, it automatically runs the code and I am not able to do anything with it now.

Thank you.

@sandipsubedi You want to put it into safe mode, it should take new code after that.

Safe Mode Reference, Make sure that you release the RESET BUTTON (while holding down the SETUP BUTTON) after the first Magenta Flash.

3 Likes

After your step 2 Safe Mode alone won’t help anymore.
You first need to reapply the WiFi credentials befor you can use Safe Mode to flash OTA.
Or you use CLI to flash code via USB.

1 Like

@carbuthn putting it into the safe mode and flashing the new program solved the issue. Thank you so much.

@ScruffR I always get confused on the difference between Step 1 and Step 2 mentioned above. Do they have different purposes ?

  1. is the way to put the device into Safe Mode (first option - magenta) or DFU Mode (second option - yellow).
  2. Is the way to put the device into Listening Mode (blinking blue) to add new WiFi credentials and (with 10+ sec) erase all already stored sets of credentials.

Thank you so much. It answers my questions. One more questions. I read somewhere that we can add upto 3 wifi credentials what happens if you add more than 3 ? or there is no limit to that ?

I think it’s five on a Photon and seven on a Core and the newest will just push out the oldest.

1 Like

Awesome, Thank you so much.

1 Like