Image Block Response command

(See ZCL Spec §11.13.8)

The Image Block Response is generated by the OTA server to send the data asked for in an Image Block Request.

ZCL command format

Offset Length Field Name Description
0 1 Frame control Should be set to 0x19 indicating a server-to-client command.
1 1 Sequence number

Must match the sequence number of the request that prompted this response.

2 1 Command ID 0x05 for Image Block Response.
3 1 Status

This field has one of two values, and determines the structure of the remaining fields:

  • 0x00 (SUCCESS): Image data is available. The remaining fields must be included.
  • 0x95 (ABORT): Instructs the client to abort the download. The remaining fields must not be included.

Note The 0x97 (WAIT_FOR_DATA) status (see ZCL Spec §11.13.8.1) is not supported.

4 2 Manufacturer code The Manufacturer code for the available image, parsed from the OTA file header. Must match the manufacturing code from the request that prompted this response.
6 2 Image type The Image for the available image, parsed from the OTA file header. Must match the manufacturing code from the request that prompted this response.
8 4 File version The version parsed from the available image's OTA file header. Must match the version number from the request that prompted this response.
12 4 File offset

The offset into the OTA file where the data begins. Must match the offset from the request that prompted this response.

Note This field is handled differently if the client has a firmware version older than 100A. See Does the download include the OTA header?

16 1 Data size

The number of bytes of data included in this block. This can be any number less than or equal to the maximum data size value in the request that prompted this response.

Note When using source routing, sending the maximum data size indicated by the client may result in a larger packet than the server can send—See Maximum RF payload size. Attempting to send a packet larger than the maximum payload size will result in the transmission not being sent and receiving a transmit status of 0x74: Message too long. In this case, the OTA server should either determine the maximum packet size and limit the image block to that, or retry with a smaller image block until transmit status 0x74 is no longer received.

17 n Image data Image data starting from the given offset. The length of this field is determined by the value in the preceding field (Data Size).

Example

An OTA server could respond to the Image Block Request example in the previous section using the following Explicit Addressing Command Request - 0x11:

7E 00 28 11 01 00 13 A2 00 11 22 33 44 FF FE E8 E8 00 19 C1 05 00 00 19 12 05 00 1E 10 00 00 0A 20 00 01 34 12 00 00 03 69 6D 67 D3

The payload portion of the API frame (starting at offset 23) is shown below:

  Frame control Sequence number Command ID Status Manufacturer code Image type File version File offset Data size Image data
Data 19 12 05 00 1E 10 00 00 0A 20 00 01 34 12 00 00 03 69 6d 67
Value 0x19 0x12 0x05 0x00 (SUCCESS) 0x101E 0x0000 0x0100200A 0x00001234 0x03

69 6d 67

Description

Image Block Response
Digi's manufacturer code Firmware upgrade

0x01: Software compatibility number

0x00200A: Application version




This response contains three bytes of data starting at offset 0x1234. The data size value in this example is very small—three bytes—for simplicity; since any size less than or equal to the client's requested maximum is allowed this is a valid frame, but smaller image blocks will increase the time the OTA upgrade takes.