3.2.18. Firmware Update Meta Data Command Class, version 4¶
The Firmware Update Meta Data Command Class may be used to transfer a firmware image to a Z-Wave device.
3.2.18.1. Compatibility considerations¶
All commands and fields not described in this version remain unchanged from version 3.
\requirement{CC:007A.04.00.21.001}{0}
A device implementing Firmware Update Meta Data Command Class, version 4 MUST also implement Firmware Update Meta Data Command Class, versions 3.
\requirement{CC:007A.04.00.21.002}{0}
While support for version 1 has been deprecated, a controlling device implementing Firmware Update Meta Data Command Class, version 2 MUST also be able to control Firmware Update Meta Data Command Class, version 1 based devices.
3.2.18.1.1. New commands, fields and values¶
The Firmware Update Meta Data Command Class version 4 supports delaying and scheduling a firmware update after downloading the image.
Version 4 updates the Firmware Update Meta Data Request Get Command and introduces the following commands:
New Firmware Update Activation Set Command
New Firmware Update Activation Status Report
After downloading an image, a device may use the Firmware Update Meta Data Status Report Command to indicate to the controlling device that the device is waiting for an activation command.
3.2.18.2. Interoperability considerations¶
3.2.18.2.1. Interoperability with v1 devices¶
Version 2 of the Firmware Update Meta Data Report command introduces a 16-bit Checksum field to follow the variable-length Data field. No fields follow the variable-length Data field in Version 1 of the Firmware Update Meta Data Report command. Version 4 of the Firmware Update Meta Data Report command uses the v2 format.
At the same time, the specified method for determining the length of the variable-length Data field is that the length must be calculated from the length of the received frame.
The unintended consequence is that a version 1 implementation receiving a Firmware Update Meta Data Report v2 command will consider the 16-bit Checksum field to be the last two bytes of the Data field.
Similarly, a version 2 implementation receiving a Firmware Update Meta Data Report v1 command will consider the last two bytes of the Data field to be the 16-bit Checksum field.
In either case, the transfer will fail.
\requirement{CC:007A.04.00.31.001}{4}
Therefore, a controlling device implementing the Firmware Update Meta Data Command Class, version 2 MUST do the following when initiating the transfer of a firmware image:
Request the version of the Firmware Update Meta Data Command Class from the target device
Use the version of the Firmware Update Meta Data Report implemented by the target device
Determine the number of Data bytes that can fit into the Firmware Update Meta Data Report command so that the complete command can still fit into the payload field of the transport frame. The number of available payload bytes in the frame depends on the actual bit rate, the use of security encapsulation as well as the presence of Checksum bytes in the Firmware Update Meta Data Report
3.2.18.2.2. Checksum calculation¶
Version 1 of the Firmware Update Meta Data Command Class introduced a 16-bit Checksum field used to verify firmware image integrity. It has been a recommendation to use the CRC-CCITT polynomial for calculating checksums. Nodes having implemented another method for calculating the checksum will find a non-matching checksum.
From Version 5 onwards, the checksum calculation method is mandatory.
For more details about the checksum calculation, refer to CRC-CCITT Source Code.
3.2.18.3. Firmware Update Meta Data Request Get Command¶
7 |
6 |
5 |
4 |
3 |
2 |
1 |
0 |
|---|---|---|---|---|---|---|---|
Command Class = COMMAND_CLASS_FIRMWARE_UPDATE_MD (0x7A) |
|||||||
Command = FIRMWARE_UPDATE_MD_REQUEST_GET (0x03) |
|||||||
Manufacturer ID 1 |
|||||||
Manufacturer ID 2 |
|||||||
Firmware ID 1 |
|||||||
Firmware ID 2 |
|||||||
Checksum 1 |
|||||||
Checksum 2 |
|||||||
Firmware Target |
|||||||
Fragment Size 1 |
|||||||
Fragment Size 2 |
|||||||
Reserved |
Activation |
||||||
All fields not described below remain unchanged from version 3.
Activation (1 bit)
The Activation field is used to advertise if the receiving node may delay the actual firmware update.
\requirement{CC:007A.04.03.11.001}{0}
The field MUST be interpreted as:
\requirement{CC:007A.04.03.13.001}{0} \requirement{CC:007A.04.03.11.002}{4}
’1’: The receiving device MAY delay the actual firmware update.
If the receiving node delays the firmware update, the delay MUST be advertised via the Status code 0xFD in the Firmware Update Meta data Status Report Command.
\requirement{CC:007A.04.03.11.003}{0}
’0’: The receiving device MUST NOT delay the firmware update.
3.2.18.4. Firmware Update Meta Data Status Report Command¶
This command is used to advertise the firmware update status.
\requirement{CC:007A.04.07.11.001}{0}
The command MUST be issued when the firmware update is completed or aborted by the device receiving the firmware.
\requirement{CC:007A.04.07.11.002}{0}
A node MUST NOT issue the Firmware Update Meta Data Get Command after receiving a Firmware Update Meta Data Status Report.
7 |
6 |
5 |
4 |
3 |
2 |
1 |
0 |
|---|---|---|---|---|---|---|---|
Command Class = COMMAND_CLASS_FIRMWARE_UPDATE_MD (0x7A) |
|||||||
Command = FIRMWARE_UPDATE_MD_STATUS_REPORT (0x07) |
|||||||
Status |
|||||||
WaitTime MSB |
|||||||
WaitTime LSB |
|||||||
All fields not described below remain unchanged from version 3.
Status (8 bits)
\requirement{CC:007A.04.07.11.003}{0}
This field MUST comply with Table 3.71.
\requirement{CC:007A.04.07.13.001}{0}
The status code 0xFD MAY be used by a version 4 device for confirming that an image has been successfully transferred but that the actual firmware update will not be performed until a Firmware Update Activation Set Command is received.
\requirement{CC:007A.04.07.13.002}{0}
The Firmware Update Activation Set Command MAY be delayed for any period of time. The delay may be controlled via the Schedule Command Class.
\requirement{CC:007A.04.07.13.003}{0}
The status code 0xFE MAY be used for confirming the successful transfer of an image which does not necessitate a restart, e.g. security a certificate.
\requirement{CC:007A.04.07.11.004}{0}
The status code 0xFE MUST NOT be advertised after the transfer of an image for the Firmware ID 0 target (the “Z-Wave chip” image).
\requirement{CC:007A.04.07.11.005}{8}
Controlling nodes implementing earlier versions of the Firmware Update Meta Data CC do not support status codes defined for newer versions. Therefore, a node returning the Firmware Update Meta Data Status Report Command MUST comply with the version implemented on the controlling device (device sending the image). The device returning the Firmware Update Meta Data Status Report can identify the version of the controlling device based on the Firmware Update Meta Data Request Get. This may be done as follows:
If the Firmware Update Meta Data Request Get does not include Firmware Target and Fragment Size (8 bytes), the controller is version 1 or 2
If the Firmware Update Meta Data Request Get includes Firmware Target and Fragment Size but not Activation (11 bytes), the controller is version 3
If the Firmware Update Meta Data Request Get includes Activation (12 bytes), the controller is version 4
3.2.18.5. Firmware Update Activation Set Command¶
This command is used to initiate the programming of a previously transferred firmware image. Refer to the Firmware Update Meta Data Status Report Command Status code 0xFD.
\requirement{CC:007A.04.08.13.001}{0}
This command MAY be issued directly by a controlling node or MAY be scheduled for later execution via the Schedule Command Class.
\requirement{CC:007A.04.08.11.001}{0}
The Firmware Update Activation Status Report Command MUST be returned in response to this command.
7 |
6 |
5 |
4 |
3 |
2 |
1 |
0 |
|---|---|---|---|---|---|---|---|
Command Class = COMMAND_CLASS_FIRMWARE_UPDATE_MD (0x7A) |
|||||||
Command = FIRMWARE_UPDATE_ACTIVATION_SET (0x08) |
|||||||
Manufacturer ID 1 |
|||||||
Manufacturer ID 2 |
|||||||
Firmware ID 1 |
|||||||
Firmware ID 2 |
|||||||
Checksum 1 |
|||||||
Checksum 2 |
|||||||
Firmware Target |
|||||||
For fields’ description, refer to the Firmware Update Meta Data Request Get Command.
3.2.18.6. Firmware Update Activation Status Report¶
This command is used to advertise the result of a firmware update operation initiated by the Firmware Update Activation Set Command.
\requirement{CC:007A.04.09.11.001}{0}
The Firmware Update Activation Status Report fields MUST reflect the values specified in the Firmware Update Activation Set Command.
7 |
6 |
5 |
4 |
3 |
2 |
1 |
0 |
|---|---|---|---|---|---|---|---|
Command Class = COMMAND_CLASS_FIRMWARE_UPDATE_MD (0x7A) |
|||||||
Command = FIRMWARE_UPDATE_ACTIVATION_STATUS_REPORT (0x09) |
|||||||
Manufacturer ID 1 |
|||||||
Manufacturer ID 2 |
|||||||
Firmware ID 1 |
|||||||
Firmware ID 2 |
|||||||
Checksum 1 |
|||||||
Checksum 2 |
|||||||
Firmware Target |
|||||||
Firmware Update Status |
|||||||
For fields not described below, refer to the Firmware Update Meta Data Request Get Command.
Firmware Update Status (8 bits)
\requirement{CC:007A.04.09.11.002}{0}
This field MUST comply with Table 3.74.