In each case, when a firmware update is triggered, the cloud sends a message to the remote product.
If you are using the STC Connector, based on the MQTT protocol, here is an example of an update message.
"command" : "UPDATE_FIRMWARE",
Once the message is received, the connected product must:
- Download the file from the given download URL.
- Verify the MD5 checksum.
- Apply the update and reboot.
- Publish the metric with the new version of the firmware, informing the cloud the firmware update has completed.
Supported IoT Connectors
The firmware update also works with other bidirectional IoT Connector, for instance:
- AWS IoT Core: if configured in the plugin, a request is made to AWS IoT Jobs to schedule the firmware update
- Azure Service Bus: the message is published on the remote queue.
- HTTP Connector: the message is sent to the remote control endpoint configured in the plugin.
External API invocation throttling
In case of external API invocation (e.g. AWS IoT Core, HTTP Connector), firmware update messages are sent with a maximum of 2 parallel requests at a time. This means that if 1000 devices are to be updated, and each API request takes 1 second to complete, the entire update process will take 500 seconds.