I'm brand new to the Electron. Downloaded the CLI, DFU-UTIL, claimed the device, etc.
I flashed the Blink sketch (Sorry for Arduino terms) via OTA and it worked. So I changed from 1 second blink to 500ms blink and wanted to try flashing via USB. Put it in flashing blue mode and I ran:
particle flash --serial firmware.bin
And saw:
Including:
firmware.bin
attempting to flash firmware to your device --serial
Just kept blinking blue. Tried RESET, but it didn't update the device. So I tried:
particle flash --usb firmware.bin
and same thing.
So I put it in DFU mode thinking DFU is needed to flash via USB (probably a big mistake) and did the flash, and got:
Found DFU device 2b04:d00a
checking file electronflash500.bin
spawning dfu-util -d 2b04:d00a -a 0 -i 0 -s 0x08020000:leave -D electronflash500
.bin
dfu-util 0.8Copyright 2005-2009 Weston Schmidt, Harald Welte and OpenMoko Inc.
Copyright 2010-2014 Tormod Volden and Stefan Schmidt
This program is Free Software and has ABSOLUTELY NO WARRANTY
Please report bugs to dfu-util@lists.gnumonks.orgOpening DFU capable USB device...
ID 2b04:d00a
Run-time device DFU version 011a
Claiming USB DFU Interface...
Setting Alternate Setting #0 ...
Determining device status: state = dfuIDLE, status = 0
dfuIDLE, continuing
DFU mode device DFU version 011a
Device returned transfer size 4096
DfuSe interface name: "Internal Flash "
Downloading to address = 0x08020000, size = 4232Download [ ] 0% 0 bytes
Download [ ] 0% 0 bytes
Download [======================== ] 96% 4096 bytes
Download [=========================] 100% 4232 bytes
Download done.
File downloaded successfully
Invalid DFU suffix signature
A valid DFU suffix will be required in a future dfu-util release!!!Flash success!
But it is stuck in flashing green. I think I downloaded my blink sketch as device firmware instead of an application flash.
So two questions:
1-How do I get this back to normal?
2-How do I flash a sketch over USB instead of OTA?