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?
“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”
“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.
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.
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.
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?
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’)
And the target (or devices) drawer pops out when you hit this icon
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 knowwhich 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 ScruffyBlueis currently selected but ScruffyE is not.
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’.
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.
This clearly shows that you are not flashing your Alarm-Panel device but still are targeting the now offline Test device.
I don’t know how much clearer I can say it. In that spot you must haveAlarm-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.