Unable to flash system binary on photon

Hello All!

I’ve got my new photon and I was trying to flash binary using particle-cli. I’ve installed all dependencies for Windows. But, I get the following error message when I try to flash system firmware binary in DFU mode:

particle flash --usb system-part1-0.6.2-photon.bin
Found DFU device 2b04:d006
spawning dfu-util -d 2b04:d006 -a 0 -i 0 -s 0x08020000 -D system-part1-0.6.2-photon.bin
dfu-util 0.8

Copyright 2005-2009 Weston Schmidt, Harald Welte and OpenMoko Inc.
Copyright 2010-2014 Tormod Volden and Stefan Schmidt
This program is Free Software and has ABSOLUTELY NO WARRANTY
Please report bugs to dfu-util@lists.gnumonks.org

Opening DFU capable USB device...
ID 2b04:d006
Run-time device DFU version 011a
Claiming USB DFU Interface...
Setting Alternate Setting #0 ...
Determining device status: state = dfuIDLE, status = 0
dfuIDLE, continuing
DFU mode device DFU version 011a
Device returned transfer size 4096
DfuSe interface name: "Internal Flash   "
Downloading to address = 0x08020000, size = 256040
Download        [=========================] 100%       256040 bytes
Download done.
File downloaded successfully
Invalid DFU suffix signature
A valid DFU suffix will be required in a future dfu-util release!!!
Error sending dfu abort request

Error writing firmware...Invalid DFU suffix signature
A valid DFU suffix will be required in a future dfu-util release!!!
Error sending dfu abort request

Please help!

This message can just be ignored - it’s more a warning than an actual error.
Just proceede with part 2 and your own binary or Tinker.

But to update a Photon via USB this would be the easier way

particle update

That should do it all (providing you have CLI v1.22.0 or later)

@ScruffR, I’ve tried updating using particle update, but it showed this error:

particle update

> Your device is ready for a system update.
> This process should take about 30 seconds. Here it goes!


! An error occurred while attempting to update the system firmware of your device:

Invalid DFU suffix signature
A valid DFU suffix will be required in a future dfu-util release!!!
Error sending dfu abort request

I’m using the latest version of particle CLI. How can I solve this error?
Also, I’ve encountered another issue that after setting up the photon using LM to my wifi network, it started breathing magenta and got stuck there only.To be more precise, it flashes green, then rapid blinking cyan and breathe magenta.

EDIT: However, I was able to flash photon_tinker.bin without any issue and photon was breathing cyan.

1 Like

@ScruffR, I am not able to solve the issue; the photon still breaths magenta in every case except “Tinker”. Any solution?

So after particle flash --usb tinker the device reaches breathing cyan?

Yes, it does. But then, how can I flash my .ino file while photon has tinker.bin ?

@ScruffR So, ideally it should be able to run .ino?

What is the exact command you build your binary and how do you flash that binary?
What version CLI do you use?

@ScruffR, I’ve used the command particle flash --usb [firmware].bin to flash binary. The CLI version is 1.24.0. Few minutes before, it wasn’t working. Suddenly started working.
But, commands like particle update, particle keys server, particle keys doctor are still not working.
I’m using dfu-util version 0.8.

Where did you get the [firmware].bin from?
Hence the question

I’ve got the binaries from https://github.com/spark/firmware/releases and the version is 0.6.2. I’ve build it by putting them under ..\firmware\modules\photon\system-part1/2 respectively & compiled them using particle compile photon command which was successful.

I was actually asking where you got your own application binary from?
I'd suspect your device is already updated to 0.6.2, so you won't need the system binaries anymore, but your application binary is breaking the device.

Put you device in Listening Mode and post the output of

particle identify
particle serial inspect

And

that's probably due to the lack of OpenSSL being installed on your machine or the system being unable to locate it on your drive.
And the "Invalid DFU suffix" messages can be ignored completely.

1 Like

This is what I’m getting! And it’s surprising because before a day, it was showing the device id:

particle identify

Your device id is undefined
Your system firmware version is 0.6.2

particle serial inspect

! serial: SyntaxError: Unexpected token .

This is what you get with Tinker installed and the device breathing cyan before entering Listening Mode?
That’s a surprise, some area seems to be corrupted here.
This smells like a case for @rickkas7 :wink:

I’m not understanding what’s happening! I hope I haven’t bricked it. How can it not show my device id but run the application code perfectly. This is getting confusing for me! :neutral_face:

@ScruffR, today again my photon was misbehaving! I was not able to enter either Listening Mode or Safe Mode! If I try to go into LM, it was flashing Red LED (9 continuous including short & long & then 1 more red). Then I flashed tinker using DFU mode. Now I am able to enter LM, and I tried again these commands in cmd:

particle identify

Your device id is 32001c000747353138383138
Your system firmware version is 0.6.2

particle serial inspect
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 2, main location, 131072 bytes max size
    UUID: 2BA4E71E840F596B812003882AAE7CA6496F1590CA4A049310AF76EAF11C943A
    Integrity: PASS
    Address Range: PASS
    Platform: PASS
    Dependencies: PASS
      System module #2 - version 1
  empty - factory location, 131072 bytes max size

It worked, but still can’t enter safe mode.
Thanks.

@ScruffR @rickkas7 I’m still facing the same issues:

  1. Commands like particle update, particle keys server, particle keys doctor are still not working.
  2. I am able to flash my application firmware binary successfully, but then it doesn’t show device id when I write Particle Serial Identify.
  3. Still unable to enter Safe mode.

Please help me solving this!

You have a 0.7.0 boot loader (version 100), but 0.6.2 system firmware (108). This is not a supported combination. You’ll either need to update the device to 0.7.0rc3, or downgrade the boot loader.

To downgrade the boot loader, as long as you can get into listening mode:

Go to the 0.7.0rc3 release page and download bootloader-0.6.2-photon.bin.

Then flash it using:

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

Note that the boot loader must be flashed in --serial mode (listening mode, blinking blue). You cannot flash a boot loader in DFU mode.

There’s more information here.

1 Like

@rickkas7,

I’m facing this issue:

particle flash --serial bootloader-0.6.2-photon.bin
! PROTIP: Hold the SETUP button on your device until it blinks blue!
? Press ENTER when your device is blinking BLUE

! serial:
Error writing firmware...Timed out waiting for initial response from device
undefined

particle serial identify

Your device id is undefined
Your system firmware version is 0.6.2

particle serial inspect

! serial: SyntaxError: Unexpected token .

In that case you need to do the steps in this order:

In DFU mode (blinking yellow):

particle flash --usb system-part1-0.7.0-rc.3-photon.bin
particle flash --usb system-part2-0.7.0-rc.3-photon.bin

The 0.7.0rc3 binaries are here.

See if you can use the device normally again.

If you want to downgrade back to 0.6.2, you need to:

In listening mode (blinking blue):

particle flash --serial system-part2-0.6.2-photon.bin
particle flash --serial bootloader-0.6.2-photon.bin
particle flash --serial system-part1-0.6.2-photon.bin

The 0.6.2 system binaries are here, except for the boot loader, which is with the 0.7.0rc3 binaries.

You can flash the system parts in DFU mode (blinking yellow) using --usb if preferred, but you have to downgrade the boot loader using --serial mode. Also, the order is critical, you need to do it in exactly that order and you can’t use particle update instead.

1 Like