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. Enable DFU mode
- 2. Compile firmware binary
- 3. Flash the device
- Error: no DFU device found
- 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
core to flash a core. 😉
3. Flash the device
particle flash --usb firmware.bin
--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:
Make sure particle-cli is installed:
npm i particle-cli -g