Firmware Upgrade
The firmware upgrade object makes it possible for users to manage the firmware upgrade. The firmware upgrade objects include installing the firmware package, updating the firmware, and other actions. After the firmware is successfully upgraded, the corresponding device must be restarted to make the new firmware take effect.
Before the device is restarted, values related to the upgrade results must be saved.
After the device is restarted, if the Packet resource contains a valid but uninstalled firmware package, the State resource must be in the downloaded state. Otherwise, it must be in the idle state.
Object Definition
Name |
Object ID |
Instance |
Mandatory |
Object URN |
---|---|---|---|---|
Firmware Update |
5 |
Single |
Optional |
rn:oma:LwM2M:oma:5 |
Resource Definition
ID |
Name |
Operation |
Instance |
Mandatory |
Type |
Range or Enumeration |
Description |
---|---|---|---|---|---|---|---|
0 |
Package |
W |
Single |
Mandatory |
Opaque |
Firmware package. |
|
1 |
Package URI |
W |
Single |
Mandatory |
String |
0-255 bytes |
URI for downloading the firmware package. |
2 |
Update |
E |
Single |
Mandatory |
none |
no argument |
Updating the firmware. The resource is executable only when the State resource is in the downloaded state. |
3 |
State |
R |
Single |
Mandatory |
Integer |
0-3 |
Firmware upgrade status. The value is set by the LWM2M Client. 0: Four statuses of the firmware are as follows: Idle, Downloading, Downloaded, and Updating. If the Resource Update command is executed, the status changes from Downloaded to Updating. If the upgrade is successful, the status changes to Idle. If the upgrade fails, the status changes to Downloaded. |
4 |
Update Supported Objects |
RW |
Single |
Optional |
Boolean |
The default value is false. If the value is set to true, the LWM2M Client must notify the LWM2M Server of the Object parameter value change by sending the upgrade message or registration message after the firmware is successfully upgraded. If the upgrade fails, the Object parameter value change is reported by sending the upgrade message in the next phase. |
|
5 |
Update Result |
R |
Single |
Mandatory |
Integer |
0-8 |
The results of downloading or upgrading the firmware are as follows:0: Initial value. When upgrade or downloading starts, the resource value must be set to 0. 1: The firmware is successfully upgraded; 2: The space for storing the new firmware package is insufficient; 3: The memory is insufficient in the downloading process; 4: The connection breaks in the downloading process; 5: Failed to check the integrity of the newly downloaded package; 6: Unsupported package types; 7: Invalid URI; 8: The firmware upgrade fails, and this resource can be reported by executing the Observe command. |
6 |
PkgName |
R |
Single |
Optional |
String |
0-255 bytes |
Name of the firmware package. |
7 |
PkgVersion |
R |
Single |
Optional |
String |
0-255 bytes |
Version of the firmware package. |
Status Mechanism
The following figure shows the firmware upgrade status mechanism.
Flowchart
The following figure shows the firmware upgrade flowchart.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot