Photon in Listening mode crashes CLI, fails web setup


#1

I had an apparent bad app flashed that would reset the Photon endlessly and was not allowing anything else to be flashed. Either that or the OS got corrupted. Either way, the Photon seemed to reset, connect to WiFi, connect to the cloud, crash and repeat.

I tried to enter Safe mode, holding down Setup and pulsing Reset, but the LED sped through a bunch of different modes without ever getting to the magenta safe mode state. Eventually it seemingly entered blue Listening mode. OK, thought I, we’ll just have to set it up again.

The Photon registers with my laptop’s WiFi. I can connect and go through Stage 2 of web setup, but step 3 always fails… it never blinks cyan indicating connection with my chosen network, but stays blinking blue.

Worse yet, my go-to failsafe of using command line particle-cli setup over USB failed spectacularly… after the photon was detected on USB, cli crashed with so much error output that it overflowed the command line window. As a bonus cli was corrupted and though setup seems to run from the command line, it never even prints it’s fist line reporting version.

Does this ring a bell to anyone? I’m pretty much over trying to revive this unit, but it would be nice to know what-all went sideways.


#2

You have not mentioned using DFU Mode - have you tried that?

If you can get your device into DFU Mode, try this

particel flash --usb tinker
particle update
particel flash --usb tinker

(yes tinker twice)

As of your Listening Mode crashes of CLI, you may run into driver issues.
What OS are you running CLI on?
What version CLI?


#3

I have already reinstalled CLI, so what went wrong with it is now moot and un-diagnoseable, I only mentioned it as a possible recognizable symptom.

I followed your instructions, passing 3 times through DFU, tinker-update-tinker. Each step was reported successful. 4th reset went straight to Listening mode, I started setup, and CLI crashed at exactly the same place (having detected the device on USB, and upon my Y to credential that one) instantly coughing up pages of path names etc. The Photon behaves exatly as before: cannot go into Safe mode, boots to Listening, etc.

I have to run right now to do an install, thanks for the suggestion…


#4

Have you tried not to let the device scan for WiFi but enter the credentials manually?

BTW, are you using ˋparticel setupˋ or ˋparticel serial wifiˋ?
I’d go with the latter.

Also can you post the CLI output?
We still don’t know your OS tho’


#5

I always do manual entry for the initial credentials as our Exhibits network is hidden. I tried particle serial wifi, and at first it didn’t work… though neither did it crash. I fiddled around a bit on another unit and finally figured out, with the help of WiFi.getCedentials(), that my IT department had told me the wrong Cipher. Oddly, setup does not ask for this explicitly, so I’d been sneaking through, and a working unit allowed me to reverse-engineer it. Once I had the right full creds, serial wifi worked to restore connectivity.

Still no clue why it bricked originally, or why I couldn’t get Safe mode, or why the DFU tactic didn’t play.

For the record, W7 SP2. The CLI output is no longer reproducible since the unit is back among the living, but I would have posted it if I thought it capture-able… it was several hundred lines, at least, and I didn’t want to run the experiment again to get it, seeing as how the second attempt seemed to take CLI down.

Thanks for the help!


#6

I’d say your device was in Safe Mode (not running your user code), but due to the fact that there were no valid WiFi creds it never made it to Particle.connected() state and hence never reached the breathing magenta phase.
Safe Mode’s starting color sequences are indistinguishable from “User Mode”.

Does your computer now connect to the device in DFU Mode? If not, it’s probably due to driver issues on your machine.


#7

Yes, the tinker/update/tinker sequence now works. When I re-upped CLI I had to approve at least 3-4 driver installs, so looks like everything is back, both CLI and the unit at issue. I have since set up a couple of fresh Photons with no apparent issues.

Is there any way to clear credentials with CLI? I’ve been doing a lot of black-boxing with one of my units, including credentialling for alternate networks both in and out of range to test the process, and would like to now give it a blank slate. Boy howdy, do I wish Photons had a “return to factory state” mode accessible through the on-board buttons! That seems to be the intent behind particle doctor, I’m curious why you didn’t recommend using that right off.

Last, if it matters, the version that my command line reports is 6.1.7601

Many thanks!


#8

Because I’d rather first dignose thoroughly and only operate on the organ that actually has an issue than just take the patient apart and try out each and every surgery I once learnt and maybe put the patien back together never knowing what actually helped :wink:

Not that I know of. But you could flash a code that executes WiFi.clearCredentials() and then flash Tinker again.
Or you just do the SETUP 10+sec routine on these few devices.