Electron: Flashing via USB serial fails

OTA works fine but not flashing via USB when following Flash Electron over serial Guide.

Here is the cmd dialogue:

C:>particle serial identify

Your device id is xxxxxxxxxxxxxxxxxxxxxxxx
Your IMEI is yyyyyyyyyyyyyyyyy
Your ICCID is zzzzzzzzzzzzzzzzzzzzz

C:>particle serial list
Found 1 device connected via serial:
COM6 - Electron

C:>particle flash xxxxxxxxxxxxxxxxxxxx f.bin
Including:
f.bin
attempting to flash firmware to your device xxxxxxxxxxxxxxxxxxxxxxx
Flash device failed
Timed out.

I tried to put unit in DFU mode too with same result.

You need to use particle flash --serial xxx.bin for that and particle flash --usb xxx.bin for dfu mode.

The one you used is for OTA flashing

Ok, thanks but still no success…

C:>particle flash --serial f.bin
Including:
f.bin
attempting to flash firmware to your device --serial
Flash device failed
I didn’t recognize that device name or ID, try opening https://api.particle.io/v1/devices?access_token=xxxxxxxxxxxxxx

C:>particle flash --usb f.bin
Cannot open DFU device 2b04:d00a
Cannot open DFU device 1235:8006
Cannot open DFU device 1235:8006

Error writing firmware…Cannot open DFU device 2b04:d00a
Cannot open DFU device 1235:8006
Cannot open DFU device 1235:8006

Can you make sure the latest CLI is installed? try npm update -g particle-cli

I guess you are on Windows.
What version?
Have you got DFU and serial drivers installed? Default drivers will most likely not work.
How have you built the bin?
Was it targeted for Electron?

Done that and now it works fine. :smile: