Flash unsuccessful - Device not discoverable or is offline

I have a photon that has been working and I can still ping, signal, run health check, device doctor, particle update, etc, but I can’t flash the device.

I have the same program on another Photon and it flashes properly. I have tried to flash “blink” and that won’t flash either.

No matter what program I try to flash, I get a “flash unsuccessful” and “Device not discoverable or is offline” – it’s neither, it’s discovered by the web IDE.

Device Doctor reports that the device is working properly. What I can try next?

Thanks
Steve

Have you tried Safe Mode?

Yes I did. When I run safe mode, I can run health check and ping but I still can’t flash the device.

Steve

Put your device into Listening Mode and run particle serial inspect - updates not sticking is sometimes caused by an outdated bootloader.

particle serial inspect:

All 16 tests PASS - still can’t flash

Steve

Can you try this in DFU Mode

particle flash --usb tinker -v
particle update -v
particle flash --usb tinker -v

and then try again?

What does the device do while OTA updating and what do you get in console.particle.io/events?

“particle flash --usb tinker -v” reports '… download done and file downloaded successfully but then says ‘invalid DFU suffix signature’ and ‘a valid DFU suffix will be required in a future dfu-util release’. ‘flash success’

“particle update -v” reports 4 downloads, all successful. (also note about invalid DFU…)

“particle flash --usb tinker -v” reports ’ same as 1st

flash of “Blink an LED” successful although program did not blink. No events shown

I then forked “Blink” (no changes to code). Program would not flash. No events shown

Tried original “Blink” again and it does flash but doesn’t do anything. No events shown

In all cases, the Photon is returned to “connected”

Steve

I tried a few more things.

“particle list” shows that the device is online and has the digitalread/write analogread/write functions

“particle call device_name digitalwrite D7, HIGH” turns the LED on and it stays on which confirms the Blink program is not running. (and probably not actually installed)

I then compiled the program: “particle compile photon xxx.ino”

and “particle flash device_name photon_firmware_yyyyy.bin”
Flash success.

Web IDE events shows correct events and program seems to runs correctly (ie: variables and functions and JavaScript API calls are working) but I need to reinstall device in panel to confirm but it looks good.

I then tried to flash with the web IDE but that still doesn’t work. (“flash unsuccessful - Device not discoverable or is offline”)

The program that was flashed via USB still behaves correctly so the unsuccessful flash via the web IDE did not affect the device (which confirms that the “successful” flash of Blink didn’t actually work.)

I can now flash this device with the CLI but not with the web IDE. My other device can be flashed via the web IDE (same program, same software rev on both devices (rev 1.4.4) so the problem appears to be something to do with the particular device.

Steve

You have definetly targeted the correct device in Web IDE?

Yes, my test set up only allows me to connect one Photon to power at a time.

That’s not what I was asking :wink:

Can you show the status bar and the target drawer of your Web IDE?
What is the device name and ID of the Photon you have issues with?

Hi ScruffR

Here are the devices: (neither device is connected via USB to my computer - both are plugged into their own power supplies and they both show up my router as 2/4 GHz allowed devices with correct ip addresses.)

The device that causing the problem is “Alarm-Panel”. The screen grab below is just after power up after flashing via the USB (The events are as expected)

and today, I get a “flash successful” when I use the Web IDE to flash the “Alarm-Panel” device but no events are published. This is the same result I get when I flash the Blink program (ie: it says it flashed successfully but the program doesn’t run). The software in the device is unchanged.

So, at this point, I can flash the Alarm-Panel device properly via USB but I still can’t flash via the Web IDE. (Force Enable OTA makes no difference). I can flash the Test device via Web IDE with the same program that fails for the Alarm-Panel.

By the way, I appreciate the effort you’ve put into trying to get this to work.

Thanks
Steve

The console events names are truncated but what I can see is that there are several events missing that I’d expect to see when flashing a device - most notable the app-hash event which would indicate that a new application has been installed.

These are the events I’d expect to see

In your screenshot ths spark/flash/status events are not showing so I’d think your device never actually receives a new firmware as you are targeting the wrong device.

So I try it again: Can you show us your Web IDE status bar and target drawer?

Hi ScruffR

The target is the correct device. ‘Test’ works but ‘Alarm Panel’ doesn’t.

The events above were from powering up the Alarm-Panel device, not from flashing it. The power up events are correct (so the device is working). Here are the flash events from the ‘Test device’: (no events are published when flashing the ‘Alarm-Panel’)

If I turn on the Chrome / developer tools / console and open the Blink code, I get:

I don’t know if this is normal or not.

I’m not sure what you mean by the Web IDE status bar and target drawer? What do they look like?

Steve

This is the status bar (bottom of the window)

And the target (or devices) drawer pops out when you hit this icon
image

This would back my assertion that you are targeting the wrong device.
You need to select the correct device in Web IDE for the cloud to know which device to deliver the new application to.

Hence the request to see the Status Bar (right hand corner states the targeted device, its currently installed device OS version and online status - during flashing you’ll also see the events issued to console).
The target/devices drawer is where you would select the desired device for OTA flashing. If the yellow star is not next to your Alarm-Panel device it is not selected.

e.g. my ScruffyBlue is currently selected but ScruffyE is not.
image

Hi ScruffR

I see that I have confused the issue by mentioning the ‘Test’ device. I used the ‘Test’ device to show that the events are being displayed properly when the ‘Test’ device is being flashed and is running. I also used it to show that the router, browser, etc, are all configured properly and to prove that my setup allows me to actually flash programs.

Let’s forget about the ‘Test’ device, and I have disconnected it. Now, the only device connected and online is the ‘Alarm-Panel’.

If I flash the ‘Blink’ program, I get:

As before, events are published, but the Blink program is not actually flashed. (the functions and variables from the program I flashed via USB are still there and respond as they should. )

If I fork the ‘Blink’ program, and I can compile it and I get ‘code verified, great work’ and when I flash it, I get " Device not discoverable or is offline:" and no events are published.

If I then re-flash the original ‘Blink’ program, I get the ‘Flash successful! Your device is being updated’ message, but no events are published.

Steve

This clearly shows that you are not flashing your Alarm-Panel device but still are targeting the now offline Test device.
image

I don’t know how much clearer I can say it. In that spot you must have Alarm-Panel written - if it’s not the new application will not be delivered to any other device than the one with the name that’s written there - in this case Test.

1 Like

3 posts were merged into an existing topic: Boron Unsuccessful Flashing after multiple OTA flashing tests

Hi ScruffR

Ok, now I understand - sorry for being so slow. What steps am I missing?

  1. I log into Particle IO.

  2. I click on Console

  3. In Devices, I click on Alarm-Panel

  4. I then I click on the code </> which brings up a new window.

image

and it shows ‘Test’ - I missed that, but why is is not showing ‘Alarm-Panel’ since that is the device I selected? and how do I change it?

Steve

Open the device/target drawer and click the star next to the device you want to flash