How to push new firmware to customers?

Hey,
Does anyone have experience regarding pushing firmware updates to customers? What is the best way to do it?
Is it possible to build a firmware checker screen(similar to a smartphone)? How do people normally do it?

You might want to look into the Particle console, which has this built in.

yea I use the console to push updates. My product has a LCD which allows user to select different options. I was wondering if there was a way to check if an firmware update is available. Like a cloud call, so when user selects the update option it can call the function to see if an update is available and then ask if they want to update.

It’s like you say, the firmware is pushed from the cloud, so no manual interaction should be required and the update should go through when it’s connected to the cloud. Unless you’re asking for a way to stall updates and only allow them to go through upon user interaction?

Sorry if i was not clear enough. Ill try again …

Example:
User is on a older version of firmware.
I have a new firmware which adds new functionality /removes bugs.
the user can go to the settings on the product options (LCD connected to P1 and arrow buttons, that allows users to select things) and check if new version is available.
If they decide to update, it downloads new firmware and resets/loads new firmware.

Is there a function to see if a new firmware is available and ask for a update.

Unless you’ve taken steps to prevent the following, the cloud will push updates to devices. As such, there shouldn’t be a need to ask for updates on the devices themselves. You can read up on this here:
https://docs.particle.io/guide/tools-and-features/console/#rollout-firmware

In my application it is import that the device doesn’t turn off until it is suitable time (user decides this time). If i push a new update i dont want to ruin the user’s experience.

You can use System.disableUpdates() to do exactly that.
Then if your user wants to check for updates, you can use a webhook from the device (via Particle.publish() sending the current version number) to inquire about the changelog, which you need to provide via some “webhookable” server and display on your device.
Once the user has read the changelog and decided to “pull” the update (e.g. via a YES | NO button on your display), you can use System.enableUpdates() to allow the cloud to actually push the update while making sure in your code, that your application doesn’t interfere with the OTA update.
After that, you disable updates again.

Granted, it would be nice if System.updatesPending() would allow to check for pending updates, but due to this issue it’s (currently) not

4 Likes

I had a similar situation and the application calls disableUpdates() when it is unplugged from wall power (transitioning to battery power) and calls enableUpdates() when it is plugged into wall power, since the device is likely to be unused while it is charging.

1 Like