[Solved]- Flash to Photon successful but then overwritten by older code

I built and flashed binary to Photon with CLI
Code gets uploaded ok and it runs for a short while - I get a few messages over into Particle console.
But afterwards Photon restarts and old code starts running - this code was previously uploaded via web base Particle Build.

The same thing is happening even if I try default tinker app (particle flash --usb tinker).

Only warning I am getting is: Invalid DFU suffix signature

This is the output of tinker flash command:
C:\>particle flash --usb tinker
Found DFU device 2b04:d006
checking file C:\Users\ZzZzZz\AppData\Roaming\npm\node_modules\particle-cli\bina
spawning dfu-util -d 2b04:d006 -a 0 -i 0 -s 0x080A0000:leave -D C:\Users\ZzZzZz\
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 = 0x080a0000, size = 3952
Download        [=========================] 100%         3952 bytes
Download done.
File downloaded successfully
Invalid DFU suffix signature
A valid DFU suffix will be required in a future dfu-util release!!!

Flash success!

Could it be that you had that device once set as a product with a PRODUCT_ID?
In that case that behaviour is to be expected, since products will always be reflashed with the official code provided by the product creators.

If you want to stop that, you need to remove that device from the product’s devices list.


Yes, that was it!
I removed Photon from the product and flashing now works as expected.


1 Like