Firmware Approval
Optional firmware approval download for battery powered LoRa SmartReaders
Often it can be inconvenient for the user when firmware updates are applied without their approval. This is particularly true during the initial set-up phase, and also potentially for LoRa, ZigBee or other limited bandwidth devices which can take a significant amount of time to complete the firmware download. The firmware (Over-The-Air OTA) approval feature makes it possible for the user to specify a time window (typically overnight) when updates should take place. It also allows the user to give approval for an immediate upgrade if this happens to be convenient.
Process Flow
Control is via a single boolean attribute OTA Approved
. Each time a new firmware version is downloaded the OTA Approved
attribute is set to false
. Customer approval is set using a ZCL API call. If this happens when an upgrade is stored in the OTA buffer the new version is immediately offered/applied. This process is managed only on the gateway side (i.e. the device which connects to the firmware server via HTTPS). So the firmware binary is always downloaded and stored on the gateway. The customer approval flag just determines if and when the firmware file is used to upgrade an OTA client. The OTA client can be the gateway itself, or possibly another device like the SRLR4302 which upgrades over LoRA.
Firmware updates can also be applied using a configurable time window. By default this will be set to 2am - 5am. The platform can change this configuration using a ZCL API call. A random delay of [0 - 900] seconds is applied to prevent a large number of devices trying to upgrade at the beginning of the default time window.
API Request
Adjusting and using the functionality of this functionality is done with a ZCL request.
Approve Firmware Over-the-Air Update Installation
When written to true
then the stored firmware is immediately approved for upgrade. Is automatically cleared to false
after the update. Setting for a specific device can be found in the management portal on attribute 0xF012
.
{
"cmd": "8A",
"profile": "0104",
"endpoint": "01",
"cluster": "0000",
"clientCmd": false,
"clusterSpecific": true,
"manufacturerId": "4e47",
"payload": "1/0"
}
Set Time Window
The start and end time of the upgrade window measured in 10 minute intervals starting at 00:00. For example: an update window from 00:30 - 04:00 gives a start value of 3, and an end value of 16. Start time can of a device can be found in attribute 0xF013
, and stop time in attribute 0xF014
.
Setting both start and stop to 0 means that the entire 24 hour period is a valid update slot. Setting both start and stop to 255 (0xFF) means that there is no valid slot and explicit customer approval is always required.
{
"cmd": "8B",
"profile": "0104",
"endpoint": "01",
"cluster": "0000",
"clientCmd": false,
"clusterSpecific": true,
"manufacturerId": "4e47",
"payload": "XXYY" //START&STOP
}
Updated 10 months ago