Can't Flash Old Photon


#1

I have an older photon that hasn’t been used in a while. I’m not sure how old it is but it’s more than a year, probably closer to two. I don’t know what version of the device FW is installed.

I was able to get it connected to the cloud using the particle app, and it shows up in Particle Console, and I can ping it. Console lists system firmware as unknown. When I use “particle list” on the CLI (v1.29.0), it’s showing as offline. The device is in safe mode. I changed the account it was registered to during the setup process.

Things I have tried:

  • Flashing Tinker via cloud on CLI --> Flash device failed. Timed Out.
  • Flashing Tinker via DFU on CLI --> TYPICAL DFU SUFFIX MESSAGE “Error during download get_status”
  • Particle Device Doctor on CLI --> Same error as flashing tinker via DFU
  • Flashing Tinker via Serial on CLI --> “Flash success”, however device is still breathing magenta
  • Flashing a simple Blink app via Particle Build --> “Flash unsuccessful” using multiple versions of target FW.
  • Particle Update on CLI --> same as other DFU errors plus “Cannot read property ‘code’ of undefined”

Any suggestions for further things to try before I pitch this thing?

Thanks!


#2

Could you try ‘particle doctor’ in the CLI?


#3

Was this device ever set to be part of a PRODUCT?


#4

@Moors7 I’ve tried device doctor with no luck

@ScruffR There’s a good chance this device was part of a product on the previous account


#5

Update:
Particle Identify via the CLI -->

Your device id is XXXXXXXXX
Your system firmware version is 0.7.0


#6

Partially Solved:

I did a manual DFU-UTIL update with version 0.4.7 thanks to this post by @ScruffR. However, when I try to update to version 0.7.0 using either “Particle Update” on CLI or manual DFU-UTIL update, I am stuck in safe mode again.

Interestingly, Particle Console says the System Firmware is 0.4.7 but Particle Identify says it’s 0.7.0.


#7

Are you able to get into listening mode (blinking dark blue) by holding down SETUP? If so, try:

particle serial inspect

That will show exactly what modules are installed on the device. I suspect your boot loader is too old and needs to be manually upgraded.


#8

Here’s what I get from Particle Serial Inspect

Platform: 6 - Photon
Modules
  Bootloader module #0 - version 4, main location, 16384 bytes max size
    Integrity: PASS
    Address Range: PASS
    Platform: PASS
    Dependencies: PASS
  System module #1 - version 207, main location, 262144 bytes max size
    Integrity: PASS
    Address Range: PASS
    Platform: PASS
    Dependencies: PASS
  System module #2 - version 207, main location, 262144 bytes max size
    Integrity: PASS
    Address Range: PASS
    Platform: PASS
    Dependencies: FAIL
      System module #1 - version 207
      Bootloader module #0 - version 101
  User module #1 - version 2, main location, 131072 bytes max size
    UUID: XXXXXXXXXX
    Integrity: PASS
    Address Range: PASS
    Platform: PASS
    Dependencies: PASS
      System module #2 - version 1
  User module #1 - version 2, factory location, 131072 bytes max size
    UUID: XXXXXXXXX
    Integrity: PASS
    Address Range: PASS
    Platform: PASS
    Dependencies: PASS
      System module #2 - version 1

#9

Yes, that’s the problem. Download the bootloader for Photon here:

Then with the Photon in listening mode (blinking dark blue):

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

Note that the boot loader can only be flashed in --serial mode, not in --usb (DFU blinking yellow) mode.


#10

SOLVED:

Awesome! that worked. thanks for the help @rickkas7


#11

Amazing! this had me stumped for hours!!! :slight_smile:


#12

Oh my god, thank you!! I had been stuck on this for days, and had almost given up until I tried this and it all worked. Thank you!!!

For anyone else reading, if you have a super old photon that you never used up until now, you will most likely run into this problem due to super outdated firmware. Need to manually update the firmware.


#13

SIMILAR ISSUE - BUT THAT FIX DID NOT WORK…

I had an old photon still in the box.

The photon registered fine
and connected to my WIFI and was Online and
Cyan-Breathing/Cnected to the Internet
I could see it on web and cli.
I could identify flash the led.
BUT could not flash any code (flash failed including tinker).
In the web interface it does not dispaly an “On Device Version”.
I can get to Listening Mode and DFU Mode.
I have tried RESET and SAFE MODE.

I Connected to CLI via USB serial with photon in listening mode…
particle serial identify
Your device id is 2a002a000747343232363230
Unable to determine system firmware version

particle serial inspect
d:\Users\mg\Downloads>particle serial inspect
Could not get inspect device:
Unexpected token m in JSON at position 0

I tried loading several bootloaders in Listening Mode:

particle flash --serial bootloader-0.7.0-photon.bin
sending file: bootloader-0.7.0-photon.bin
Error writing firmware: Transfer cancelled

particle flash --serial bootloader-0.7.0-RC.1-photon.bin
sending file: bootloader-0.7.0-RC.1-photon.bin
Error writing firmware: Transfer cancelled

particle flash --serial bootloader-0.6.2-photon.bin
sending file: bootloader-0.6.2-photon.bin
Error writing firmware: Transfer cancelled

In DFU mode I tried flashing tinker
Also tried this from the iOS App:

Particle flash --usb tinker
Error writing firmware: Invalid DFU suffix signature
A valid DFU suffix will be required in a future dfu-util release!!!
Error during download get_status

Not sure what else to try.


#14

If you haven’t already…
Update your CLI.

In DFU mode:

  • Particle update
  • Particle flash --usb tinker

Try Particle identify in listening mode afterwards, it should then list your deviceOS correctly.
See if that does anything?


#15

to add to @Moors7

particle update-cli

from your PC/Mac command line


#16

I guess after you did do as previous posters suggested it won’t be relevant anymore, but I guess your device OS was predating the introduction of version display via particle identify and particle serial inspect.
However, in Listening Mode connecting via a serial terminal (not particle serial monitor) you can send the letter v to get the installed version.

With your particle flash ... commands it may be helpful to add the -v (verbose) switch to see some more info.

This is an old, ignorable message.


#17

THANKS!

I had already updated my CLI and drivers…

The particle update got an error…but seemed to fix my problem anyway:

In DFU mode:
particle update
! An error occurred while attempting to update the system firmware of your device:
Error: VError: Error writing firmware: Invalid DFU suffix signature
A valid DFU suffix will be required in a future dfu-util release!!!
Error during download get_status

Please visit our community forums for help with this error:
https://community.particle.io/
Cannot read property ‘code’ of undefined

I was then able to identify and flash the new bootloader then I could flash my software.

particle identify
Your device id is 2a002a000747343232363230
Your system firmware version is 1.4.4

particle flash --serial bootloader-0.7.0-photon.bin
sending file: bootloader-0.7.0-photon.bin
Flash success!

THANKS AGAIN!