Remote OTA Firmware Update

Searched the forums and didn’t see anything, having issues with libraries now that apparently the firmware on my Electrons are too old (or that’s what seems to prevent me from using the Ubidots library at the moment).

Trying to figure out how to OTA flash my Electron that’s sitting at home (while I am at work) and coming up empty.

This can’t be a unique request, it must be possible because not everyone has local access to their devices I imagine… Right?

Current FW 0.4.8

Hello,

Let me ping someone that might be able to help, @tylercpeacock are you able to assist?

Kyle

OTA system update currently is only available for Customer Product Electrons (assigned as such via https://console.particle.io/products ) and not for “mere” development Electrons.
These devices need to be updated via USB.
Or you could use a previous version of the library that’s still compatible with system 0.4.8 (but that’s the least desirable option).

1 Like

Is there a cost associated with setting up my stuff as a project? I noticed signing up for it came with a Terms of Service, though I haven't actually gone through and read it yet, I will do that though, thanks for the help!

You can create a product in console with up to 25 devices for free.
The only extra limitation that comes with this is that Particle.publish() gets another limit imposed.
In addition to the 1 event/sec max rate you also need to keep your publishes within the 250K per month quota.
This would mean a constant rate of 1 event per ~11sec.

1 Like

Is it expected that we should be able to do an OTA upgrades of system firmware on Electrons yet? Using the CLI to attempt upgrades seems to have about a 50% success rate for me. I’m a little confused regarding the comments about devices needing to be customer product electrons. I’ve successfully and unsuccessfully attempted upgrades on customer devices and development devices. Hadn’t noticed a difference.

In general, the ‘particle flash’ CLI commands always completes successfully but once I’ve completed the 3 (or 2) system file uploads, the device often continues to report its old firmware version.

I guess my main question is: Are there tricks or tips to either increase the odds of a successful OTA upgrade of system firmware, or at least provide solid information on whether the upgrade was successful or which files successfully loaded and which didn’t so I can build some sort of automated mechanism? I appreciate that the documentation does say that OTA system firmware upgrade is not recommended for the Electron, but as many people here have said, upgrade over USB is just not always an option.

My comment about needing to be a product device was aimed at the implicit system firmware update when OTA flashing a new application firmware targeted at a higher version than the one one the device - the way how Safe Mode Healer does this for Photons by default.

Failing OTA updates are often caused by application code that somehow interferes with the cloud tasks (e.g. blocking code, long delays, too infrequent call to Particle.process() in MANUAL mode, …)

I generally push the device to safe mode before upgrading. Shouldn’t be application code

I’m using the Product section for an Electron to push the new code but it doesn’t seem to be updating…

I requested via the Products page to flash firmware of v.0.6.2 to a v.0.6.0 device, the Electron recognises the flash - but gets stuck and the LED goes 1/2 red 1/2 blue and breaths on that. Not sure what is going on, but it isn’t updating…

I also tried to update via the WebIDE - but get the message saying ‘please update via USB to the latest version’.

I can also flash new application code during this time while it is breathing red/blue.

Humm…

That breathing red/blue is what we call magenta and it indicates Safe Mode.
This is the normal behaviour for non-product devices after flashing an app firmware targeted at a higher version than the system on the device. But for product devices Safe Mode Healer should auto update the system - at least that’s what I thought (@rickkas7?)

However, if that doesn’t work and you can’t update the system via USB, you should be able to send the three system parts OTA via CLI too.
For that download the three binaries from here
https://github.com/spark/firmware/releases/tag/v0.6.2

and flash via

particle flash <yourDeviceName> <systemPartInOrder.bin>

(three times)

Thanks - yes, I did end up flashing via USB the new version with the command:

particle update

I thought we could do OTA updates via Product portal though? Alas, recalling products to flash over USB isn’t practical :expressionless:

It’s not and it shouldn’t be required - I know of some members I helped where the auto-update did kick in correctly.

Just to provide the needed info for Rick to chime in:
Did your app firmware contain a valid PRODUCT_ID()/PRODUCT_VERSION() tag?
Could it be that the device didn’t have 0.6.0 on but something pre 0.5.3?
Maybe PM Rick the device ID and product ID to check the logs.

1 Like

I did double check it was on 0.6.0 to start with and it did have the right ProductID/Version in the code.

Will message @rickkas7 - thanks :slight_smile:

There was a problem with the safe mode healer service. It has been resolved. You’ll probably need to either reset the device or flash your code again and it will immediately begin the update now.

2 Likes

Did the triple flash to update to 0.6.2, but my electron is still on 0.6.0. :frowning:

Can you try the most recent CLI 1.24.0 and do

particle update

I have 1.24.0, but my Electron is sitting at a remote location now set as a product.

particle update gives me I was unable to detect any devices in DFU mode.

Doh’ sorry, I missed the remote part of your issue :blush: