Electron stuck in safe mode after flashing


#1

I’ve got an Electron with v0.5.2b that stays in safe mode (breathing magenta) after flashing via particle flash --serial electron_firmware...bin on Windows 10. I’m seeing spark/status/safe-mode events in the console so it appears it’s connected to the cloud. I’ve tried resetting as well as disconnecting and reconnecting the battery. It just doesn’t seem to want to run my image.

I’ve flashed this board successfully before; this issue started this morning. I recompiled and flashed a v0.5.2b Photon with the same code and it ran as expected. Any guesses what’s up?

Thanks!


#2

Try particle flash --usb ... instead - that will provide more info
And how did you build that binary - against what system firmware version?

Dev and CLI 1.17.0 build for 0.5.3 now (unless CLI is instructed to --target another version)
So you Electron needs to be 0.5.3 too.


#3

Thank you, updating the firmware to 0.5.3 appears to have worked. I have been using Particle Dev and was unaware there was a new release; will note the --target option and build with CLI in the future.

FWIW: I had been using the firmware manager, the version currently available for download is v0.5.2b. I used zadig to install the WinUSB driver and particle update to get the board up to 0.5.3.


#4

Yup, we too noticed that the usual Firmware Update Thread was not updated, which usually poses as the (temporarily pinned) announcement of a new release.
And the lag of the firmware updater doesn’t help either :blush:


#5

It’s kind of a soft release at this point… we’re working out some issues we’re having with releasing the 0.5.3 Firmware Manager, supporting docs with links, then the Github release notes will make their way to the Firmware Update Thread :smile:


#6

I’ve run into this same problem. I can flash OTA and everything works fine. If I flash the same code using Particle Dev, I end up stuck in Safe Mode.

I’ve tried
particle compile electron --target 0.5.3 directory-name
followed by
particle flash --target 0.5.3 juliet --serial directory-name/electron_firmware_1479918207111.bin
but still end up in Safe Mode.

Any ideas?

Running Particle Cli v1.18.0 on OS X.
Particle Dev doesn’t have any updates available.


#7

I’ve never had to use the --target parameter with particle flash. I compile the same way you do:

particle compile electron --target 0.5.3 directory-name

then flash via:

particle flash --serial directory-name/electron_firmware_1479918207111.bin

#8

I just tried that with the same result. Still stuck in Safe Mode.


#9

This issue just started today. As of yesterday I was able to flash with the cli with no problems. At first I thought it was related to my code, but I’ve stripped it down to a blink example for troubleshooting. Still no luck.


#10

What system firmware version do you have on your Electron? Put it in listening mode (blinking blue) by holding down the MODE button until it blinks blue then issue the command:

particle identify

#11

0.5.3


#12

Did you try the syntax that Wat used? That’s normally how you call particle flash. Also, you might want to try the --usb option instead. It has better error reporting if the flash fails, which I think is might be what’s happening.

Also, you might want to also try:

particle flash --usb tinker

as a baseline for something that should always work. If you get a dfu-util not found error you should install it, but you could also use --serial. The error reporting for a failed flash is better with --usb.


#13

particle flash --usb tinker
Flashing tinker worked fine.

Tried this…

Code:
void setup() {} void loop() {}

Commands:
particle compile electron index.ino
particle flash --target 0.5.3 --usb electron_firmware_1479930275812.bin

Ended up in Safe Mode again.


#14

Getting close! The options should be:

particle compile electron --target 0.5.3 index.ino
particle flash  --usb electron_firmware_1479930275812.bin

Compile needs both the device type (electron) and optionally the version, which, as of this morning, if not specified, builds for 0.6.0.

Flash doesn’t need a --target because the .bin file is already built, it’s just uploading it.


#15

You are the man, thank you!