Can't flash sample code to new Electron

Just set up my electron for the first time (however it’s several months old.) CLI shows it connected. Signal button works.

Firmware updated successfully.

When I try to push one of the sample apps, while connected via USB, I get the following error.


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

! serial:
Error writing firmware…Transfer cancelled

What OS are you on?
If Windows pre 10, have you got the serial drivers installed?
If you got CLI installed via the installer they (and also the DFU drivers) should be there and I’d recommend to flash via DFU Mode (blinking yellow) and

particle flash --usb firmware.bin

With --serial, is your device blinking dark blue?

Thanks. Recent OSX. Just installed npm.

! System firmware update successfully completed!

Your device should now restart automatically.

Went into DFU mode (flashing yellow). Got this:

david:particle_electron david$ particle update
david:particle_electron david$ particle flash --usb firmware.bin
Found DFU device 2b04:d00a

Error writing firmware…Incorrect platform id (expected 10, parsed 6), use --force to override

Ok --force appears to have worked. Will test further.


You should not force a wrong platform code onto a device for which the binary is not ment.
If you have an Electron you need to flash a binary compiled for Electron.
Platform ID 6 is for Photons.

1 Like

Thanks, I had not selected the right device in the IDE. Now all is well.



Thanks for you help @ScruffR!