"Error writing firmware...RangeError: Index out of range"

Just got a few photons. WiFi, deploying apps via website all works. Now playing with the command-line tools on the Mac.

particle flash --usb play1.ino

says first that it found “DFU device xxx”, and then prints the error message from the title. Any ideas?

dfu-util is installed. I executed the command while the LED was flashing yellow.

AFAIK particle flash --usb only works for .bin files.

To turn your code into a DFU flashable binary you’d need to build first via

particle compile photon play1.ino --saveTo firmware.bin

Which will result in a firmware.bin that can be --usb flashed.

1 Like

Or, simply running particle compile photon play1.ini will compile to photon_firmware_xxxxxxx.bin.