Image Block Request command
(See ZCL Spec §11.13.6)
The client sends Image Block Request commands to the server to download the upgrade image data. The client will send requests until it has downloaded the entire image, as determined by the image size given in the Query Next Image Response from the server.
ZCL command format
Offset | Length | Field Name | Description |
---|---|---|---|
0 | 1 | Frame control | Will be set to 0x01, indicating a client to server command. |
1 | 1 | Sequence number |
Sequence number chosen by the client. |
2 | 1 | Command ID | 0x03 for Image Block Request. |
3 | 1 | Field control |
Indicates which optional fields are present. No optional fields are currently used by the XBee 3 Zigbee RF Module. |
4 | 2 | Manufacturer code | The manufacturer code of the image being downloaded. |
6 | 2 | Image type | The image type of the image being downloaded. |
8 | 4 | File version | The version number of the file being downloaded. |
12 | 4 | File offset |
The offset at which to begin the data, from the start of the OTA file. Note This field is handled differently if the client has a firmware version older than 100A. See Does the download include the OTA header? |
13 | 1 | Maximum data size | The maximum number of bytes of image data the server may include in its response. |
Note Optional fields have been omitted here as they are not used by the XBee 3 Zigbee RF Module.
Example
This is an example Explicit Receive Indicator - 0x91 containing an Image Block Request that could be received by a server:
7E 00 25 11 01 00 13 A2 00 11 22 33 44 FF FE E8 E8 00 19 C1 05 00 00 01 12 03 00 1E 10 00 00 0A 20 00 01 34 12 00 00 63 CA
The payload portion of the API frame (starting at offset 21) is shown below:
Frame control | Sequence number | Command ID | Field control | Manufacturer code | Image type | Current version | File offset | Maximum data size | |
---|---|---|---|---|---|---|---|---|---|
Data | 01 | 12 | 03 | 00 | 1E 10 | 00 00 | 0A 20 00 01 | 34 12 00 00 | 63 |
Value | 0x01 | 0x12 | 0x01 | 0x00 | 0x101E | 0x0000 | 0x0100200A | 0x00001234 | 0x63 |
Description |
|
|
Image Block Request | No optional fields present | Digi's manufacturer code | Firmware upgrade |
0x01: Software compatibility number 0x00200A: Application version |
|
|
The client is requesting up to 0x63 bytes of data, starting from offset 0x1234.