Flash unsuccessful - Device not discoverable or is offline

Hi ScruffR

Well, that was easy :slight_smile:

I shall now go back and re-read the documentation to see what else I’ve missed.

Thanks for all of your help.

Steve

Hi, I am having a similar issue with my Argon.
It was working properly till saturday, as the last vitals show, but now it is impossible to flash it through the web ide.
Situation is:
my device is breathing cyan, but is no discoverable. I am sure the target device is correct.
What I tried is:

  • update device firmware through particle cli. It was updated, device flashed magenta for a few minutes, then breath cyan, but still it’s not possible to flash via web ide
  • flashed my firmware through particle cli: it worked but still the device is not discoverable online and I can’t access variables nor functions.
  • I tried to add my device again to my account. It happened that the Particle Iot App showed me that the device connects to the network but it was not possible to create a secure session with the particle device cloud. Still the device is breathing cyan (and it has always done so).
  • When I reset the device these are the events shown.

I would like to now what I am missing or what can I do to make my device work again.

Thanks in advance,

Luca


last vitals

When you said you flashed new firmware via CLI, chances are that this new firmware causes the issue.
Have you tried putting the device in DFU Mode and flash OTA?
You can also put your device in Listening Mode and run particle serial inspect to see whether anything sticks out there.

When I updated the device OS via CLI, my argon was already not discoverable and this was a trial to put it back to work.
About your suggestion, I put the device in listening mode and run the particle serial inspect. Everything looks pass as the picture shows.

About flashing the OTA, I know how to go in DFU mode, but I don’t know how to flash the OTA. Can you please guide me? I couldn’t find it in the CLI.

immagine

Luca

A bit of history. Since my original posting, the device ran for about a year without any problems. I then added one line of code (a Particle.publish), OTA compiled, flashed successfully ( at least both the code and device windows said it was successful ) but the program did not work. I could not re-flash, as the Photon had gone off-line. I had to reset the device before I could flash it. To further complicate things, I could not flash backup copies that successfully compiled and flashed a year ago .

After talking with support, I removed bits of code, tried to flash, reset the device, removed more code, etc, until I eventually got it working again.

Each time the photon went offline, I needed to reset it before I could flash the device again. I did it so many times I broke the reset button on a Photon. I then wrote a windows batch file to put the device back online:

@echo off
particle usb dfu
start /W /b particle flash --usb tinker
start /W /b particle usb dfu
start /W /b particle flash --usb photon.bin
echo Done.

Every once in awhile the batch file failed to put the Photon online and I had to run particle device doctor before I could flash again. (sometimes I couldn’t even flash the blink program without the device going offline).

… and you can run device doctor in one command window and when it asks to reset the device to DFU, you can do it from another command window with ‘particle usb dfu’ so there is no need to push the setup/reset buttons.

I eventually discovered the problem to be with the Particle functions / variables and Particle.connect. I had the functions/variables at the start of setup() immediately followed by Particle.connect. I moved the Particle.connect to the end of setup() and the program now flashes properly.

By the way, I have a couple of spare Photons that behaved exactly the same way, so it not a hardware problem.

Unfortunately, Support says there is no way to know which version of the OTA compiler was used a year ago to successfully compile the code, or what changes have been made to the current OTA compiler. Making changes to old code with the OTA compiler is always going to be bit of a problem.

Hope this helps
Steve

I suggested to put your device into Listening Mode (breathing magenta) - this way the device is not running your fimware but only listens to the cloud which is the ideal condition to flash OTA (Over The Air) - e.g. via Web IDE

After putting the device into breathing magenta I could flash over the air.
I found out that I have an issue in my code. I still have to find out where, but I can solve the problem.
Thanks a lot