Overview
The Xyte platform supports a secure delivery of Firmware files to Devices. The recommended method is to create a Custom Command that requires a file as parameter and sets the file type to "firmware" (or similar).
This setup will allow a manufacturer to Upload firmware files, making them available to be used in the firmware upgrade command from above, to all end customers.
Upgrade Flow
Once setup, the following flow is enabled:
- End Customers can schedule a firmware upgrade command, select one of the manufacturer uploaded files (or upload a custom firmware).
- Next Telemetry API from the device, will set the command pending flag to true.
- The device will use Get Command API to retrieve the command details and the link to the new firmware file.
- The device notifies the server via Update Command API that the upgrade is in progress.
- The device downloads the provided file and performs a local firmware upgrade.
- The device notifies the server of the updated firmware version via Update Device API
- The device notifies the server via Update Command API that the upgrade command was successfully done.
Since the firmware upgrade process might cause the device to reboot, it is important to mark that this process was initiated, so once the device comes online after a reboot. It knows to update the server of the firmware upgrade process completion (both command completed, firmware version changed and any other side effects).
Upgrade Side Effects
Firmware upgrades can cause changes to the way data is stored on the device and might require additional steps
Configuration object change
In case the firmware upgrade, changes the structure of the configuration object. It is important for the firmware upgrade process to translate the previous configuration object to the new format and call the Set Config API to update the server with the new configuration object.
Telemetries change
In case the result of the upgrade changes the type of telemetries being sent (specifically old telemetries being deprecated). It is recommended to do a full Send Telemetry API update with the override
flag set to true
. This will clear the old keys from the Device's state object on the server.