Photon unable to recover while updating firmware OTA incase of WiFi outage

Hello,
I saw this behaviour today when my WiFi network is finicky. My computer and photon are connected to the same WiFi hotspot, the WiFi is terribly slow. The photon was breathing cyan so I issued an OTA update request using particle cli. The photon turned magenta and got stuck in magenta. I checked the connectivity and the WiFi is down.

I waited till my WiFi connectivity is good. After a couple of minutes the WiFi was up and I was able to browse the internet. But the particle didn’t recover. It’s still showing static magenta.

It’s time to press the reset button, so I did. Now the particle LED is off and the onboard LED(connected to D7) is blue(dimmed). I did a power cycle but it’s still in that mode.

Safe mode:
I tried to setup in safe mode but it either ends up in the particle LED being solid blue or particle LED being off. No luck.
Video in here.

DFU_UTIL:
I was able to set the photon in dfu-util mode successfully. I tried flashing my bin file using
particle flash --usb code.bin

The downloading was success but my photon ended up in the dim blue onboard LED mode.

FIX:
I kept the photon in dfu-util mode and flashed it using the bin file generated from a monolithic build. The photon was back to life.

I didn’t find any fix to solve this issue without updating the entire photon firmware image. Any ideas?

Hope this helps!

Thank you
Dheeraj

Were you flashing user firmware or a monolithic firmware?

By user firmware do you mean only the application firmware?

First I flashed the bin file generated using particle compile photon . No luck.

Then I flashed the bin file generated using monolithic build with APPDIR pointing to my application directory. So the generated bin file contains the system firmware and my code.

When you were performing the OTA firmware flash and the wifi was disconnected, how were you compiling your firmware and what tool did you use to initiate the flash?

Compiled using - particle compile photon myFiles --saveTo code.bin
Flashed using - particle flash photon code.bin

Do you remember the system firmware version on the Photon before you performed the OTA flash?

The reason why I asked is that the Photon might have been updating the system firmware when WiFi disconnected.

If I recall correctly, flashing user firmware would not result in this situation with the integrity check etc.

Maybe @mdma has more inputs here.

The system version on the Photon before the OTA is 0.6.1. It’s a used Photon.

Once you go monolithic, you can't go back to OTA without refreshing the system firmware parts so that OTA can update only the user firmware. If you follow the instructions the github releases page for DFU flashing parts 1,2 and 3 depending on Photon/Electron then OTA will work again.

2 Likes

I get it now. Sorry for this post. I flashed this with monolithic build before I noticed this behaviour. I forgot that. I am sorry.

1 Like