Electron: Error writing firmware - unknown message undefined

So after a good 4 hours today trying to get my Electron unbricked - I thought best to share my painful learning.

I was getting the below message over and over, no matter what I tried, firmware updates, code version changes, DFU updates.

Error writing firmware - unknown message undefined

In the end… the magic fix was via the particle-cli

Step 1:

  • Go to DFU mode (hold mode & reset, then release reset, and hold mode until the LED flashes yellow)

Step 2:

  • Run the command in terminal:
    particle update
    Wait for it to complete

Step 3:
Validate you have the latest version of the firmware by running
particle identify
At the time of writing this post, version 0.6.1 was the latest

Step 4:
Force tinker onto it - I found that even the default setup firmware or my own firmware was not working.
particle flash --usb tinker

Step 5:
You should notice the device will now come online. If you are using a 3rd party SIM, remember to re-flash with the correct APN after doing the tinker install.

No idea why it happened, if anyone could shed some light on it - that would be appreciated, I want to avoid this from occurring again. I suspect a failed firmware update via the MacOS Firmware app was to blame - but can’t confirm timing as whether it was that or some bad user app code we were testing from a 3rd party library.

Sadly, I’m a bit skeptical of this unit now - so it will become a test unit and wont be making its way to a customer which is a shame :frowning:

1 Like

Glad you got it fixed! That’s a mighty strange behavior, definitely let me know if you have more problems with this Electron or if you (accidentally) reproduce the bug. Thanks for telling us about it!

1 Like

Thank you for the feedback @Cameron, and our apologies you had to spend much time investigating this, but we appreciate the insight gained!

The firmware update process relies on serial communication, which can be disrupted if your application also uses serial. Flashing tinker will address this directly since tinker does not have any serial serial communication. I will add this to the troubleshooting steps in our documentation so future users don’t experience the same problem.

1 Like

I have the same problem but unfortunately the fix didnt work for me.

Press ENTER when your device is blinking BLUE
sending file: electron_0.7.0_firmware_1523966336308.bin
! serial:
Error writing firmware…unknown message

I tried to firmware updates, code changes, app flash, unclaim/claim the device, etc, still the same problem.

What is strange is that sometimes it does work when it shouldn’t, for example by mistake I pushed the firmware while it was booting before it is in flash mode (not in blue flashing mode) and it flashed ok.
I tried to reproduce it but I can’t seem to get consistent results, sometimes I push it twice without blue flashing and it works, most times all will fail.

Once the firmware is on it, the device works, including the serial port so it seems it may not be a hardware fault.

Any ideas how to fix it ?



It seems now it fixed itself.

I think the unit may be a bit dodgy, let’s wait and see.