Cannot flash new code

I now have two Photons that will no longer flash any (tried multiple different programs including blinky) new code from the web IDE over Wifi. The WEB IDE says the flash was successful and after the Photon resets normally, but the code on the Photon has not been changed. They will however flash correctly from the CLI in DFU mode over USB. Both of the Photons were flashing without problems from the WEB IDE many times, but then that just stopped working for no apparent reason. I have also tried multiple different firmware versions including the latest release 0.6.2 and using safe mode when flashing.
This is an issue for me because ultimately these will be remote and I need to be able to update their programming remotely.
I would appreciate advice on this issue.
Thanks,
TJ

What system version have you got installed on your device?

I had troubles after testing 0.7.0-rc.2.

I did have 0.7.0-rc.2 on for a while but reverted back to 0.6.2.

That might well be the reason.
Downgrading to 0.6.2 from 0.7.0-rc.2 requires youto downgrade the bootloader too - see release notes

Particle Device OS Updates Thread - #48 by BDub

1 Like

I guess I should have read the fine print.

1 Like

Where do I get the 0.6.2 bootloader binary?
I do not see it at the link you provided

Just scroll down a bit in that post and you'll find

This is where you'll get the binaries from (when scrolling down again - this time to Downloads ;-))

2 Likes

I flashed over USB system-part2 -> bootloader (v0.6.2) -> system-part1 and it still does not accept new programs over the WEB IDE. New programs load correctly using CLI and DFU.

@tjtrolinger Could you put your device in Listening Mode and run particle serial inspect and paste the data here? You’ll want to see v11 bootloader, and v108 for system parts if you have successfully downgraded to 0.6.2.

1 Like

Thanks for the reply
The bootloader is version 100. How do I get it to V11?
Thanks,
TJ

Platform: 6 - Photon
Modules
Bootloader module #0 - version 100, main location, 16384 bytes max size
Integrity: PASS
Address Range: PASS
Platform: PASS
Dependencies: PASS
System module #1 - version 108, main location, 262144 bytes max size
Integrity: PASS
Address Range: PASS
Platform: PASS
Dependencies: PASS
System module #2 - version 108, main location, 262144 bytes max size
Integrity: PASS
Address Range: PASS
Platform: PASS
Dependencies: PASS
System module #1 - version 108
User module #1 - version 4, main location, 131072 bytes max size
UUID: 07918D94C65CB7CDD13CBEDADB4692DF15B6A25FDBAF952D7F5A85956C53E57E
Integrity: PASS
Address Range: PASS
Platform: PASS
Dependencies: PASS
System module #2 - version 108
empty - factory location, 131072 bytes max size

I’ll have to make the notes clearer about which method doesn’t work for the bootloader, i.e., USB/DFU :slight_smile:
You can only flash the bootloader OTA or YModem over USB.

Try this, put your Photon in Listening Mode and run:

particle flash --serial bootloader-0.6.2-photon.bin
1 Like

That WORKED!
I can now flash again from the WEB IDE.
Thank You for your help.
TJ

1 Like

Thanks for the assist!

1 Like

Suffered a similar situation to @tjtrolinger with Web IDE + 0.7.0.rc2.

Had a case where all things looked normal from a development point of view, but out of the blue, updated application on the Web IDE would not actually update a device, even though we see the normal flashing magenta and all that. (Hence my post Web IDE - macro to provide build number? to assist with know what is on the device has been actually updated.)

I could DFU okay to the device, so DFU'd Tinker, then tried OTA again to no avail. Updated public cloud key. Still no go.

Good news is that this thread cured my woes as I took the advice to:

particle flash --serial bootloader-0.6.2-photon.bin

Question now arises - does anyone know what kicks off this condition? Specifically worried about this issue being a problem with devices in the field.

I have a similar situation where OTA updates are not working for Particle Core running 0.5.4 on an old prototype - am really worried now that we are headed to production with the Photon that we will encounter this issue. Obviously DFU flashing will not work in this case, meaning we would have to rely on OTA updates to fix this or the whole unit will be bricked…

Symptoms: when upgrading firmware target, fails to flash OTA (request timed out). When leaving firmware target unchanged, does not error out but does not update the device with new code. In both cases, after initiating the flash it instantly “freezes” with a breathing green that requires restarting the device - no updates actually occur.

Any suggestions?

@nh43de, try downloading the bootloader. I believe that this can be done over the air (but there could be a catch 22 here!)