Lost WiFi - all photon p1 devices fail setup

I’m working on a product where we’ve implemented the P1 onto some custom hardware into a product. We have 4 devices that have been working well, until here the other day when the WiFi router broke down.

Of course, when the WiFi disappears, the p1 won’t connect. But the problem is that it’s impossible to give them new wifi credentials.

I get the devices into Setup mode with the LED blinking blue. And I can use the Particle app and find the devices via “Setup new Photon”. But after selecting the new WiFi router and entering the password I get the following error:

“Setup process couldn’t configure the WiFi credentials for your photon…”

I’ve tried connecting via the command line interface and serial connection using ‘particle serial wifi’ command. It finds the correct access point, but when I choose it, it just freezes and nothing more happens.

This has happened with 4 devices now.

I tried running the ‘particle update’ command - and even though it runs and completes without errors, it’s still not possible to get the device to connect to a new access point.

I’ve found that by running the particle doctor, I am able to fix the problem. So I am not looking for a way to fix the problem, I am looking for a way to avoid the problem in the future as this is going to be a product that goes out to customers - and it’s going to happen that customers lose their wifi now and then.

I’ve reproduced the error after getting the device connected to the new wifi router by disconnecting the wifi router. Now trying to set it up with a new wifi router, I get the same error as above.

I ran the ‘particle update’ yesterday (1st of May 2018) so the devices should have the latest Device OS release. We did not have this problem before, so I guess it’s either a bug in the latest device os release or a firmware problem. But I have no idea what to look for.

The probably best way would be to have your firmware provide some means to enter credentials.
One way to do that and which has been adopted by many users is the SoftAP feature where the device can expose a WebServer to which any WiFi enabled device could connect and use a browser to enter the required data.

Do you have any idea why what I am seeing is happening? I guess your softAP suggestion is a possible solution. But it would be even better if we could just figure out what is causing the problem and then continuing to use the provided tools.