Last Updated on : 2024-07-31 03:40:01download
The MCU can send this command to the module to initiate an update download. This OTA command differs from the OTA firmware update, which is initiated by the module.
The MCU sends the following data.
Field | Bytes | Description |
---|---|---|
Header | 2 | 0x55aa |
Version | 1 | 0x00 |
Command | 1 | 0x1e |
Data length | 2 | N |
Data | 52 |
|
Checksum | 1 | Start from the header, add up all the bytes, and then divide the sum by 256 to get the remainder. |
Example:
The MCU sends the subcommand 0x00
to request the firmware update information:
55 aa 00 1e 00xx 00 xxxxxxxxxxxxxxxx XX
The MCU sends the subcommand 0x01
to resume a download:
55 aa 00 1e 0001 01 XX
The MCU sends the subcommand 0x02
to stop a download:
55 aa 00 1e 0001 02 XX
The module returns the following data.
Field | Bytes | Description |
---|---|---|
Header | 2 | 0x55aa |
Version | 1 | 0x00 |
Command | 1 | 0x1e |
Data length | 2 | 0x0009 |
Data | 9 |
|
Checksum | 1 | Start from the header, add up all the bytes, and then divide the sum by 256 to get the remainder. |
Example:
The module returns 0x10
to indicate the firmware update information is obtained successfully:
55 aa 00 1e 0001 10 XX
The module returns 0x11
to indicate obtaining the firmware update information failed and the update download is stopped.
55 aa 00 1e 0001 11 XX
The module sends the following data.
Field | Bytes | Description |
---|---|---|
Header | 2 | 0x55aa |
Version | 1 | 0x00 |
Command | 1 | 0x1f |
Data length | 2 | 0x0044 (offset and data length) |
Data | 4 |
|
Checksum | 1 | Start from the header, add up all the bytes, and then divide the sum by 256 to get the remainder. |
Example
Assume that the firmware update is 530 bytes and each packet is fixed to 256 bytes in size.
The middle packet:
55 AA 00 1f 01 04 00000000 xxx...xxx XX
55 AA 00 1f 01 04 00000100 xxx...xxx XX
For the last packet, the packet offset is 0x00000212
, and the packet length is 0 bytes.
55 AA 00 1f 00 04 00000212 XX
The MCU returns the following data.
Field | Bytes | Description |
---|---|---|
Header | 2 | 0x55aa |
Version | 1 | 0x00 |
Command | 1 | 0x1f |
Data length | 2 | 0x0000/0x0001 |
Data | 1 | Data[0]:
|
Checksum | 1 | Start from the header, add up all the bytes, and then divide the sum by 256 to get the remainder. |
Example
The MCU responds to the middle packet:
55 AA 00 1f 0000 0C // The packet is received successfully.
The MCU responds to the last packet:
55 AA 00 1f 0001 00 0D // CRC32 check succeeds.
55 AA 00 1f 0001 01 0E // CRC32 check fails.
The MCU can send this command to request the progress of downloading the MCU updates or the NB-IoT updates.
The MCU sends the following data.
Field | Bytes | Description |
---|---|---|
Header | 2 | 0x55aa |
Version | 1 | 0x00 |
Command | 1 | 0xC3 |
Data length | 2 | 0x0000 |
Data | 0 | None |
Checksum | 1 | Start from the header, add up all the bytes, and then divide the sum by 256 to get the remainder. |
Example:
55 AA 00 C3 00 00 C2
The module returns the following data.
Field | Bytes | Description |
---|---|---|
Header | 2 | 0x55aa |
Version | 1 | 0x00 |
Command | 1 | 0xC3 |
Data length | 2 | 0x0002 |
Data | 2 | The download status and progress. |
BYTE[0] | 1 |
|
BYTE[1] | 1 | The download progress in percentage (0 to 100). |
Checksum | 1 | Start from the header, add up all the bytes, and then divide the sum by 256 to get the remainder. |
Example:
55 aa 00 c3 00 01 01 18 dc
Is this page helpful?
YesFeedbackIs this page helpful?
YesFeedback