So, today my Electron developed a strange problem. I have spent the past 6 hours trying to remedy it to no avail.
Beginning of the day: Electron 2G with firmware version 0.5.3 running.
My Electron started experiencing a “hard fault” (one red blink after an SOS) while trying to connect to particle server with my application code running (was working fine this morning). It resets after showing the SOS message, and proceeds to encounter another hard fault next time it tries to connect to the Particle Cloud. This loop repeats itself indefinitely.
I tried entering Listening Mode, but that didn’t work (no response from Electron).
I successfuly entered DFU mode, and issued “particle update” and “particle flash --usb tinker”.
This resulted in the same SOS loop again.
Manually downloaded tinker from the Web IDE (after checking that the firmware build it was targeting was correct), and manually flashed it using DFU utility. Same symptoms.
Added SYSTEM_MODE(SEMI_AUTOMATIC);
to the top of the Tinker file so that the Electron wouldn’t try to connect to the Particle cloud.
This cleared the hard fault condition, and allowed me to enter Listening Mode.
While Electron is in Listening Mode, I am able to use Particle-CLI to issue particle serial list
, which shows the Electron as a serial device.
I then issued particle flash --serial tinker.bin
and was successfully able to re-flash the same (currently running) application to the Electron.
Put the device back in Listening Mode and issue particle serial identify
which results in the blue blinking on the Electron to be suspended. After a few seconds the CLI command returns ! serial: Serial timed out
. Same thing happens if I issue particle identify
(without “serial”).
Exasperated, I tried simply flashing an empty program that blinks the on-board LED on and off with no Particle Cloud connection. Same result as with the tinker app (can’t use particle identify
or particle serial identify
in Listening Mode).
It would appear that no matter how complex the app is that I upload to the Electron, it will work without a hard fault unless it tries to connect to the Particle Cloud. I have verified this by running an SDFAT example program that outputs to the Serial monitor (all is good as long as I include SYSTEM_MODE(SEMI_AUTOMATIC);
at the beginning.
I kept trying everything I could think of and one time randomly the Electron successfully connected to the particle cloud without encountering a hard fault while it was running Tinker. A minute later it encountered a hard fault and resumed its cranky behavior.
Even more exasperated, I then tried rolling back to 0.5.2 using the dfu utility to revert to the older firmware (part 1 and part 2 dfu upload method). Same exact symptoms as before (btw yes I ensured I was now building the apps for 0.5.2).
I then tried to uninstall and re-install the entire particle-cli, node, npm, dfu utility, windows driver, etc etc etc (more time wasted).
I even took a crack at using the Particle Keys Doctor via the Particle CLI as per the instructions here (by the way, the “guide” on this page doesn’t mention that you need openSSL… this would definitely be a good oversight to fix!!!), but unfortunately was unable to get anywhere with that because the command prompt complains that it doesn’t know what “openSSL” is (even though I installed it). I chased my tail trying to get that to work for a while, but couldn’t figure out how to get it to work
At this point, I have reverted the system firmware version to 0.5.3 via the dfu utility and flashed the Electron with Tinker both via CLI (particle flash --usb tinker
) and by manually downloading the binary from the Web IDE.
At the present moment (after hours of trying different things and pouring over forum posts) it would seem that I have done all that can be done from a troubleshooting perspective. Is there some way for me to get more information about the nature of the issue I’m facing (i.e. get the Electron to output debug messages while it is connecting to the cloud?). If not, should I just double down and buy a new Electron and hope for the best?
This is very frustrating as my company has a deadline quickly approaching and I really needed to get some app development done today but couldn’t as a result of this ongoing Particle SNAFU.
FYI here is the CLI output when I re-upped to 0.5.3 and flashed tinker:
C:\Users\Tom\Dropbox\Jaza Energy\Technical\Electron\Old Firmware>particle update
> Your device is ready for a system update.
> This process should take about 30 seconds. Here goes!
! System firmware update successfully completed!
> Your device should now restart automatically.
> You may need to re-flash your application to the device.
C:\Users\Tom\Dropbox\Jaza Energy\Technical\Electron\Old Firmware>particle flash --usb tinker
Found DFU device 2b04:d00a
checking file C:\Users\Tom\AppData\Roaming\npm\node_modules\particle-cli\binaries\electron_tinker.bin
spawning dfu-util -d 2b04:d00a -a 0 -i 0 -s 0x08080000:leave -D C:\Users\Tom\AppData\Roaming\npm\node_modules\particle-cli\binaries\electron_tinker.bin
dfu-util 0.8
Copyright 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.org
Opening 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 = 0x08080000, size = 5776
Download [ ] 0% 0 bytes
Download [ ] 0% 0 bytes
Download [================= ] 70% 4096 bytes
Download [=========================] 100% 5776 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!