Factory reset not working

During development with the Spark Cores, I would first claim and flash them at home, to ensure everything worked. Then I’d take them to where I wanted to deploy them, factory reset them ( hold both buttons, release the rightmost button, wait until fast flashing white, release ), reclaim them, and flash them once more.

I recently received my Particle Photons, but I’m having trouble with the same procedure. I claimed them today ( and they went through their firmware updates to 0.4.4 ), and then I tried factory resetting so I could have a fresh start, claim again, and flash again. The docs state that whilst holding the leftmost button, the LED goes through flashing magenta, flashing yellow, flashing green, flashing white, solid white, then rapid flashing white, at which point I should let go. However, it never makes it to fast flashing white - it goes through to slow white, then instead of solid white, it goes dark, then starts over at magenta.

Nonetheless, this seemed to match the diagram on the docs, so I tried letting go during the slow white flashing to get a full factory reset. The Photon goes straight to slow flashing blue, where it seems to be listening. It doesn’t broadcast its own wireless network as it did out of the box. Maybe one time out of five, I can set up its Wifi over USB, but mostly it gives me an error about not being able to communicate with the Photon ( internal device error, if I recall, will run it again tonight if exact error messages are needed ). If I hit the reset button, it mostly goes back to running old code from before I tried the factory reset, but sometimes it’ll just boot into listening mode.

In summary, factory reset doesn’t seem to be resetting to factory settings, but some strange intermediate setup.

Specs : I tried claiming first via USB using Particle CLI on a Mac, using particle setup. This failed more times than it worked, various issues with connecting or disconnecting the Photon. The Android app had far more success. After factory reset, the Android app would give me Setup process couldn't disconNect from the Photon Wi-Fi network. This is an internal problem with the device. From that point on, I could only get it back via USB with some faffing and a few failures and reboots - the Android never made it further.

Any help much appreciated.

Hi @Quentin

I suggest you read this thread

In short--Photon has a "safe" mode that is much better than factory reset in my experience.

Thanks @bko. I saw that yesterday, but only after trying the factory resets. However, my Photons were on 0.4.4 before factory reset - so at least I don’t think they’re damaged, and it looked like I was able to get them back after some effort. The goal of the factory reset was just to be able to claim them again from fresh, as that was one of the easier ways to connect the Cores to a different network. The Photons have more CLI options ( I believe ? ), so I might be able to just do this instead.

Still, having a functional factory reset would be great !

I agree and it certainly should work and bugs should be reported (likely on github). But the design of Photon was such that "safe" mode was considered to be what you needed 99% of the time so you can reflash you devices while factory reset should be the 1 out of 100 (or 1000) things you need to do very rarely.

Understood. I’ll do a little more diagnosis before opening an issue on Github, I’d like the full error messages.

I’ll try particle setup wifi first, then Safe Mode if that doesn’t get me what I want. Thanks, @bko.

1 Like

You could use listening mode, which is what it's made for. If you want to clear all credentials, simply hold the setup button, until it starts blinking blue quickly.

Factory reset on the photon will get some love. I don’t think it will ever function like it does on the core, since there isn’t room on the Photon for a separate copy of factory firmware, and right now it’s not clear to me what it should do. So a future update may simply drop factory reset altogether to avoid causing further confusion.

3 Likes

@Moors7 : I’ll try that tonight, thanks.

@mdma : dropping it might be a good idea, then. Point aside, is there a simple way to flash the factory firmware, assuming the Photon is claimed and on the cloud ?

You can use dfu to flash the binary to address 0x80E0000. Please note that this will be overwritten next time system firmware is updated.

Why exactly would you like to get the factory firmware back on it? Anything specific you like about that?

I liked the “pull out my phone and claim it in seconds” aspect, rather than having to pull out a laptop and squeeze USB cables into my prototype. Also, when I first tried claiming these Photons, it wouldn’t work via the Particle CLI. After failing a few times, I tried the Android app and it was quick and painless. Again, the error over CLI was about not being able to communicate with the Photon for some reason. So, it would make my life easier on deploying these things if I could pull out a phone and set them up on the wireless network on location.

In that case, just put it into listening mode. Then you won’t even have to reflash it :slight_smile: The Photon will hold 5 different sets of credentials, and tries to connect to what’s available. Using listening mode allows you to add credentials. Holding it until it starts blinking blue quickly (10s) will erase all credentials.

Thanks, @Moors7, that looks great. I managed to add another Wifi to it through Listening Mode, through the Particle CLI. However, it didn’t restart - it went back into Listening Mode. I can restart it, but I don’t know what network it’s on.

I just tried erasing all credentials. It goes into Listening Mode fine. I reboot, it goes into Listening Mode, so I’m happy that everything’s erased. I then try giving it a network through the Android app, and it fails with Setup process couldn't disconnect from the Photon WiFi network. This is an internal problem with the device, so please try running setup again after resetting your Photon and putting it back in blinking blue listen mode if needed. However, I’m able to give it WiFi credentials over CLI this time. It’s very quick, and after, tells me everything worked and that the Photon should restart. However, it does not - it’s on solid blue. Restarting the Photon seems to have everything working again.

This is pretty inconsistent behaviour everywhere…

Not exiting listening mode is a bug announced in the release thread. A fix is already in place, to be released next week. For now, just hit reset after providing credentials, or you can apply the workaround mentioned in the issue description.