Firmware upgrade

This function allows client firmware to be upgraded.

The flow below specifies the server interaction:

It is assumed that upon successful download and installation of the new firmware, the client will initiate a re-boot and send a ‘Register Update’.

Firmware update uses HTTP and CoAP protocols. It supports both In-band push and pull delivery methods.

Custom messages in Firmware script

During Firmware upgrade process, the Firmware script can add custom messages about the status of the download. The LWM2M server then saves the custom message in the command queue for the specific job which is running on the device.

The same custom message can be viewed on the IMPACT IoT Console on the device Job details page under the Sub-status. This way Firmware download status can be known and also about the script running in the background.

A context message can be set like this "informationReportingContext.setMessage("Firmware state "+state);"

Where, state can be: INIT, DOWNLOADING, UPGRADING. Only DOWNLOADING and UPGRADING can be noticed during the Firmware upgrade. An INIT execution passes quickly and cannot be noticed.

A sample screenshot below shows a Job Sub-Status that displays an ongoing firmware download.