OTA updates for Products

Hey guys,

I have products with particle, and one thing i noticed with releasing firmware to my products, is that users wont receive the update until they reset the controller and then the update will begin.

Is there a way to identify that there is an update available, when i release it. My end goal is to alert users that there is an update, "would you like to flash now’ if yes then it system.reset, else continue with what you doing.

Your device needs to perform a full handshake in ordert to get the update sent.
You can read up on this thread for some background

By now the process has been made a bit smoother by means of sending a dedicated Particle.publish() event.

Thanks for the reply. My understanding from that post is that it to push an OTA, i need to reinitialize the handshake and i can do that with that process. Is there a way to identify that there is an update pending for products?

In other words, how do i identify this image .

Is there an api call to check if the firmware has been released? So, i can use the information to let users know that there is an update available. If they are ready to do the update then they can do it now otherwise they can do it later.

SOLVED!: For anyone stuck in same situation in the future:

in setup() call System.disableUpdates(); . This is will make sure that it does not automatically flash if the handshake is randomly reintialised (possibly due to bad connection) and it also allows System.updatespending() to be called.

From my testing, I noticed that System.updatespending() only works if a handshake is made. You can force handshakes by Particle.disconnect(), waiting a few seconds and then Particle.connect() (Thanks @ScruffR) . This will set your System.updatespending() to be true if update is pending. You can put that in a if statement and ask user to press yes or no if they choose to flash now. If they press yes then you System.enableupdate() and rehandshake with Particle.disconnect() and Particle.connect(). After a few seconds system should restart with new firmware.


Hey @Div_IoT — I would encourage you to check out our new improvements to Particle’s OTA solution which should help address the challenges you’ve encountered.

Here’s the announcement: https://blog.particle.io/2019/04/30/new-ota-firmware-capabilities-and-intelligent-releases-for-optimized-control/

And check out the docs on controlling OTA availability and Intelligent Firmware Releases.