Note to self for when I forgot how to flash my Particle Photon firmware over USB. Maybe it is useful information for someone else too.

  1. 1. Enable DFU mode
  2. 2. Compile firmware binary
  3. 3. Flash the device
  4. Error: no DFU device found
  5. Related stuff

1. Enable DFU mode

Briefly hold both buttons and release only Reset.

Wait till led blinks yellow, then release Mode.

2. Compile firmware binary

cd my-firmware; particle compile photon . --saveTo firmware.bin

Replace photon with core to flash a core. ?

3. Flash the device

particle flash --usb firmware.bin

Replace --usb with the device name to flash over the Particle cloud.

Error: no DFU device found

“Error writing firmware…No DFU device found”

Make sure the USB cable is good and data-capable (not limited to charging or messed up by using with cheap power banks). Regular use erodes the data pins. So even a once upon a time good working cable may seem like it is working as it can power the Photon, but it won’t transfer data.

If the cable is absolutely good put the device in DFU mode and call the Doctor:

particle doctor

Make sure particle-cli is installed:

npm i particle-cli -g

Categories: Code

Leave a Reply

Your email address will not be published. Required fields are marked *