This page describes the commands supported by the RapidHA serial protocol. The payload byte values are detailed in the command descriptions. Some commands have no payloads.
...
Note | ||
---|---|---|
| ||
New sleep control frames under the Utility command group (PH: 0x55) provide the user with a wake-up handshaking scheme, as well as total and accurate control of application sleep cycles. |
Anchor | ||||
---|---|---|---|---|
|
Table of Contents | ||||
---|---|---|---|---|
|
...
Anchor | ||||
---|---|---|---|---|
|
The Reset command is sent from the Host to the Module, and prompts the Module to reboot. The command has no payload.
...
The Application Version Count Response is sent from the Module to the Host. The response payload length is 1 octet.
Payload for Application Version Count Response Command
Byte Index | Field Name | Notes |
---|---|---|
0 | Version String Count | A count of the total number of Application Version Strings available from the running application. |
Expected Host Action
None.
Anchor | ||||
---|---|---|---|---|
|
The Application Version Request is sent from the Host to the Module to query a given Application Version String describing either the Application Bootloader Version, the core RapidHA Version or the Virtual Host Application Version. The request payload length is 1 octet.
Payload for Application Version Request Command
Byte Index | Field Name | Notes |
---|---|---|
0 | Version Index | 0x00 - Retrieve Bootloader Version |
Effect on Receipt
The Module will respond with an Application Version Response.
Anchor | ||||
---|---|---|---|---|
|
The Application Version Response is sent from the Module to the Host. The response payload length is variable.
Payload of Application Version Response Command
Byte Index | Field Name | Notes |
---|---|---|
0 | Version String Index | The array index (0 based) that this command relates to. |
1 | Version Type | The type of version string returned. See Version Types. |
2..(n + 3) | Version | The version being returned. The length n is specified in the first octet of the field. A total of n bytes will follow this length byte containing data which shall be interpreted based on the Version Type. |
Expected Host Action
None.
Anchor Application Version Types Application Version Types
Version Types
Application Version Types | |
Application Version Types |
Type ID | Type Name | Length (Octets) |
---|---|---|
0x00 | LSB Binary Type | 4 |
0x01 | MSB Binary Type | 4 |
0x02 | String Type | Variable |
0x03 | LSB Binary Type | 2 |
0x04 - 0xFE | Reserved | N/A |
0xFF | Invalid | N/A |
LSB Binary Type
A type value of LSB Binary Type indicates that the version string is being provided as a series of binary encoded bytes that represent the version string in a dotted version format with the least significant byte provided first. For example, a binary value of 0x01,0x02,0x03,0x04 provided using this encoding would be translated to 4.3.2.1 (or possibly 4.3.2rc1) when displayed to the user. This is the default encoding for version numbers.
MSB Binary Type
A type value of MSB Binary Type indicates that the version string is being provided as a series of binary encoded bytes that represent the version string in a dotted version format with the most significant byte provided first. For example, a binary value of 0x05,0x06,0x07, 0x08 provided using this encoding would be translated to 5.6.7.8 (or possibly 5.6.7rc8) when displayed to the user.
String Type
A type value of String Type indicates that the version string is being provided as an ASCII encoded string of length n. The value will not be null terminated as the length is provided. For example, a binary value of 0x31,0x2e,0x32,0x2e,0x30,0x72,0x63,0x31 provided using this encoding would be translated to 1.2.0rc1.
Invalid
A type value of Invalid indicates that the requested element is invalid. Typically this indicates that a request was made for an index which lies outside of the valid range of version string indices.
Anchor | ||||
---|---|---|---|---|
|
The Restore Defaults frame is sent from the Host to the Module and serves to restore the Module to its factory default settings. The command has no payload.
Effect on Receipt
The Module restores all non-volatile elements to their factory default settings, leaves the network if it is joined to one or dissolves the network if it has formed one, and then reboots.
Anchor | ||||
---|---|---|---|---|
|
The Host shall send the Host Startup Ready command to the Module after it starts up and is ready for communication. The command has no payload.
Effect on Receipt
On receiving the command, the Module will respond with the Startup Sync Request command. If the Module is in the Already Running state (see payload for Startup Sync Request ), it signifies that this command was received due to an unexpected reset of the Host. In this case, the Module will have retained all its application cache and attribute values, but will suspend network operations and return to the Startup Synchronization phase.
Anchor | ||||
---|---|---|---|---|
|
The Startup Sync Request command is sent by the Module on startup or as a response to the Host Startup Ready command. Upon issuing this command, the Module suspends execution of the full application until the Host has completed all desired configuration and updates against it.
The Module resends this command every five seconds until the Host sends the Startup Sync Complete command in response, signaling the completion of the configuration and update process.
Payload for Startup Sync Request Command
Byte Index | Field Name | Notes |
---|---|---|
0 | Running State | 0x00 = Starting Up |
1 | Configuration State | 0x00 = Factory Default |
The Running State indicates whether the Module has just powered up or is already running. If the Running State indicates the latter, it signifies that the Host experienced a unilateral reset.
The Configuration State indicates the application configuration state of the Module. The Factory Default state indicates that the Module is operating for the first time post-production, or subsequent to the reception of the Restore to Default command from the Host. The Needs Endpoint Configuration state indicates that the Module has restored all default configurations (Manufacturer ID, etc.), but still requires the Host to configure application endpoints, clusters and attributes. This state will occur after a soft or hard reset of the Module, regardless of the amount of non-volatile memory available.
Expected Host Action
The Host may receive the Startup Sync Request either during a synchronized power up or after a unilateral reset of the Module. The Host shall process both scenarios in the same manner.
If the Running State of the Module is Already Running the Host is not required to configure endpoints, clusters and attributes and perform updates on the values of the latter. Instead, the Host should query attribute values and cached event data from the Module in order to synchronize its internal state with that of the application.
If the Configuration State of the Module is Factory Default, the Host shall perform a full configuration of the application, specifying the IEEE functional device type, security configuration, endpoints, etc. If the Configuration State is Needs Endpoint Configuration, the Host shall configure the application endpoints, clusters and attributes accordingly. If Configuration State is Fully Configured, no further configuration action is required of the Host.
Anchor | ||||
---|---|---|---|---|
|
The Host shall send the Startup Sync Complete command to the Module in response to a Startup Sync Request and upon completion of all startup configurations and updates to the latter. The command has no payload.
Effect on Receipt
The Module acknowledges reception of the command with a Status Response indicating Success, after which it runs the full application. If the Module was previously joined to a network it will rejoin that network. Additionally, application configurations are backed up to non-volatile memory for restoration on the next startup.
Please note that Host configurations for endpoints, clusters and attributes are not preserved in non-volatile memory; thus they must be reconfigured after any soft or hard reset of the Module.
Status Response to Startup Sync Complete Command
Status Response | Enum | Description |
---|---|---|
Success | 0x00 | Module received the command and will start the full application. |
...
The Attribute Report Passthrough Control message is sent from the Host to the Module. The payload length is 1 octet.
Payload for Attribute Report Passthrough Control
Byte Index | Field Name | Notes |
---|---|---|
0 | Attribute Passthrough Control | 0x00 = Disabled |
...
Frame Name | Secondary Header Byte | Allowed Context | Sent By Host/Module |
---|---|---|---|
Send ZDO Unicast | 0x01 | Network Up Only | Host |
Send ZDO Broadcast | 0x02 | Network Up Only | Host |
ZDO Send Status | 0x03 | All Contexts | Module |
ZDO APS Ack | 0x04 | All Contexts | Module |
ZDO Response Received | 0x05 | All Contexts | Module |
ZDO Response Timeout | 0x06 | All Contexts | Module |
ZDO Device Announce Received | 0x1E | All Contexts | Module |
Anchor | ||||
---|---|---|---|---|
|
...
If the withOnOff flag is “True” the Host must update the CurrentLevel attribute of the Level Control server cluster and the OnOff attribute of the On/Off cluster.
Anchor | ||||
---|---|---|---|---|
|
The Level Stop command is sent by the Module to the Host on reception of a Stop command from the network, targeted to an endpoint on which the application supports the Level Control server cluster.
...
- (Indicating Level 100, Transition Time 0, On/Off Status ON) F1 12 25 BB 05 16 64 00 00 01 72 01 [RHAMoveToLevel]
Anchor | ||||
---|---|---|---|---|
|
...
Byte Index | Field Name | Notes |
---|---|---|
0,1 | Node ID | Node ID of Module |
2..9 | EUI64 | EUI64 of Module |
10 | Endpoint ID | Endpoint of Module |
11,12 | Manufacturer Code | |
13,14 | Image Type | Unused - for backwards compatibility. Set to 0x0000 |
15..18 | File Version | Will contain the value initially set in the Query Next Image Response / OTA Query Next Image Response frames by the Host. |
19..22 | Current Time | UTC Time, where 0x00000000 = Now |
23..26 | Upgrade Time | UTC Time, where 0x00000000 = Now |
...
Back to Top
OTA Upgrade Client Frames (0x0B)
The commands in this section facilitate over-the-air (OTA) client of the application operating on the Module. These commands have been implemented per the ZigBee HA 1.2 guidelines.
Frame Name | Secondary |
---|
Header Byte | Allowed Context | Sent By Host/Module |
---|---|---|
OTA Query Configuration Request |
0x21 -
0x20 | All Contexts | Host | |
OTA Query Configuration Response |
0x22 -
0x21 | All Contexts | Module | |
OTA Query Configuration Write |
0x22 | All Contexts | Host |
Image Progress Notification |
0x23 |
No Restriction
-
All Contexts | Module |
OTA Version Configuration Request |
0x24 | All Contexts | Host |
OTA Version Configuration Response |
0x26 -
0x25 | All Contexts | Module | |
OTA Version Configuration Write |
0x26 |
All Contexts |
Host |
Anchor | ||||
---|---|---|---|---|
|
The OTA Query Configuration Request frame is sent from the Host to the Moduleto request the intervals at which the Modulequeries the OTA server for data. The Module will respond with an OTA Query Configuration Response frame. The command has no payload.
Anchor | ||||
---|---|---|---|---|
|
The OTA Query Configuration Response frame is sent from the Module to the Host in response to an OTA Query Configuration Request.
...
Byte Index | Field Name | Notes |
---|---|---|
0,1 | Discovery Retry Rate | The rate, in minutes, at which the Module performs discovery for an OTA server when it has knowledge of none. Default = 15 minutes |
2..5 | First Image Query Delay | The delay, in milliseconds, after discovery of an OTA server and prior to the first Next Image Request (i.e., querying the server to determine if a new image is available). Default = 1 minute. |
6..9 | Image Query Rate | The delay, in milliseconds, between consecutive Next Image Request queries (i.e., querying the server to determine if a new image is available). Default = 15 minutes. |
10..13 | Block Request Rate | The delay, in milliseconds, between Image Block Requests (i.e., the rate at which a new image will be retrieved from the server). Default = 1 millisecond. |
Anchor | ||||
---|---|---|---|---|
|
...
- ( PH:0x0B, SH:0x22 )
The OTA Query Configuration Write frame is sent from the Host to the Moduleto set the various intervals at which the Modulequeries the OTA server for data. These settings may not be modified during an OTA upgrade and will persist in non-volatilememory.
...
Byte Index | Field Name | Notes |
---|---|---|
0,1 | Discovery Retry Rate | The rate, in minutes, at which the Module performs discovery for an OTA server when it has knowledge of none. Set to 0xFFFF to retain default (15 minutes). |
2..5 | First Image Query Delay | The delay, in milliseconds, after discovery of an OTA server and prior to the first Next Image Request (i.e. querying the server to determine if a new image is available). Set to 0xFFFFFFFF to retain default (1 minute). |
6..9 | Image Query Rate | The delay, in milliseconds, between consecutive Next Image Request queries (i.e. querying the server to determine if a new image is available). Set to 0xFFFFFFFF to retain default (15 minutes). |
10..13 | Block Request Rate | The delay, in milliseconds, between Image Block Requests (i.e. the rate at which a new image will be retrieved from the server). Set to 0xFFFFFFFF to retain default (1 millisecond). |
Anchor |
---|
...
|
The Image Progress Notification frame is sent from the Module to the Host to the Moduleto query the version and image type information used to verify a new OTA image. The Module will respond with an OTA Version Configuration Response frame. The command has no payload.
...
notify the Host of the reception of every 512 bytes of firmware downloaded through the OTA Bootload cluster. The frame is also sent on completion of the download.
Payload for Image Progress Notification Command
Byte Index | Field Name | Notes |
---|---|---|
0 |
Image Type
Unused - for backwards compatibility. Set to 0x0000
2..5
Firmware Version
Status | Maps to ZCL Status codes: 0x00 = Success See /wiki/spaces/SPRHA17/pages/37093554 for all ZCL Status values. | |
1,2 | Manufacturer Code | |
3,4 | Image Type | Unused - for backwards compatibility. Set to 0x0000 |
5..8 | File Version | Will contain the value initially set in the Query Next Image Response / OTA Query Next Image Response frames by the Host. |
9..12 | File Offset | |
13..16 | File Size |
Anchor | ||||
---|---|---|---|---|
|
The OTA Version Configuration Request frame is sent from the Host to the Moduleto query the version and image type information used to verify a new OTA image. The Module will respond with an OTA Version Configuration Response frame. The command has no payload.
Anchor | ||||
---|---|---|---|---|
|
The OTA Version Configuration Response frame is sent from the Module to the Hostin response to an OTA Version Configuration Request.
Payload for OTA Version Configuration Response Command
Byte Index | Field Name | Notes |
---|---|---|
0,1 | Image Type | Unused - for backwards compatibility. Set to 0x0000 |
2..5 | Firmware Version | Default value corresponds to that of the Application Version attribute of the Basic cluster. |
6,7 | Hardware Version | 0x00 = Reserved |
8..15 | Signer EUI | Default 0x0024460000078074 |
Anchor | ||||
---|---|---|---|---|
|
...
Version Configuration Write Command - ( PH:0x0B, SH:0x26 )
The OTA Version Configuration Write frame is sent from the Host to the Moduleto configure the version and image type information used to verify an OTA image.
...
Byte Index | Field Name | Notes |
---|---|---|
0,1 | Image Type | Unused - for backwards compatibility. Set to 0x0000 |
2..5 | Firmware Version | Set to 0xFFFFFFFF to retain default. |
6,7 | Hardware Version |
Payload for Image Progress Notification Command
Byte Index | Field Name | Notes | |
---|---|---|---|
0 | Status | Maps to ZCL Status codes: 0x00 = Success See /wiki/spaces/SPRHA17/pages/37093554 for all ZCL Status values. | 1,2 | Manufacturer Code |
3,4 | Image Type | Unused - for backwards compatibility. Set to 0x0000 | |
5..8 | File Version | Will contain the value initially set in the Query Next Image Response / OTA Query Next Image Response frames by the Host. | |
9..12 | File Offset | 13..16 | Set to 0xFFFF to retain default (EM357) 0x00 = Reserved |
8..15 | Signer EUI | Set to 0xFFFFFFFF to retain default (0x0024460000078074). |
...
File SizeEM357) 0x00 = Reserved | ||
8..15 | Signer EUI | Set to 0xFFFFFFFF to retain default (0x0024460000078074). |
...
Back to Top
OTA Upgrade Server Frames (0xB0)
The commands in this section facilitate over the air (OTA) server of the application operating on the Module. These commands have been implemented per the ZigBee HA 1.2 guidelines.
Frame Name | Secondary Header Byte |
---|
Allowed Context | Sent By Host/Module |
---|---|
OTA Image Notification |
0x01 -
0x00 | All Contexts | ||
OTA Query Next Image Request |
0x02 -
0x01 | All Contexts | ||
OTA Query Next Image Response |
0x02 | All Contexts | |
OTA Image Block Request |
No Restriction
No Restriction
No Restriction
No Restriction
0x03 | All Contexts | |
OTA Image Block Response |
0x05 | All Contexts | |
OTA Upgrade End Request | 0x06 | All Contexts |
OTA Upgrade End Response |
No Restriction
No Restriction
0x07 | All Contexts |
Anchor | ||||
---|---|---|---|---|
|
The OTA Image Notification Command frame is sent from the Host to the Module. The Module will send an Image Notify ZCL command either broadcast or unicast depending on the received serial frame.
...
Byte Index | Field Name | Notes |
---|---|---|
0,1 | Node ID | Target Device Node ID |
2..9 | EUI64 Address | Target Device EUI64. All 0xFF indicates broadcast |
10 | Endpoint | 0xFF indicates a request on all endpoints. |
11 | Payload Type | 0x00 = Query jitter |
12 | Query Jitter | |
(13,14) | Manufacturer Code | Optional field, it is needed for payload type 0x01-0x03 |
(15,16) | Image Type | Unused - for backwards compatibility. Set to 0x0000 |
(17..20) | File Version | Will contain the value initially set in the Query Next Image Response / OTA Query Next Image Response frames by the Host. |
Anchor | ||||
---|---|---|---|---|
|
...
Request Command - ( PH:0xB0, SH:0x01 )
The OTA Query Next Image Request frame is sent from the Module to the Host. The Module expects to receive an OTA Query Next Image Response frame in return.
...
Byte Index | Field Name | Notes |
---|---|---|
0,1 | Node ID | Request OTA Device Node ID |
2..9 | EUI64 Address | Request OTA Device EUI64 |
10 | Endpoint | Request OTA Device Endpoint |
11 | Field Control | 8-bit Bitmap |
12,13 | Manufacturer Code | |
14,15 | Image Type | Unused - for backwards compatibility. Set to 0x0000 |
16..19 | File Version | Optional. Number used here will be echoed back in all subsequent frames for the transaction. For example, this field can be used by the Host to differentiate multiple concurrent updates, or for any other purpose the Host requires. |
(20,21) | Hardware Version | Optional. Bit 0 of "Field Control" must equal "1" to use this optional field. |
Anchor | ||||
---|---|---|---|---|
|
The OTA Query Next Image Response frame is sent from the Host to the Module. The Module relays the frame to the OTA target device. If the target EUI64 is the module’s own EUI64, the module will process it locally.
...
Byte Index | Field Name | Notes |
---|---|---|
0,1 | Node ID | Target Device Node ID. 0xFFFF indicates that the EUI64 is used |
2..9 | EUI64 Address | Target Device EUI64 |
10 | Endpoint | Target Device Endpoint |
11 | Status | 0x00 – Success |
12,13 | Manufacturer Code | |
14,15 | Image Type | Unused - for backwards compatibility. Set to 0x0000 |
16..19 | File Version | Will contain the value initially set in the Query Next Image Response / OTA Query Next Image Response frames by the Host. |
20..23 | Image Size |
Anchor | ||||
---|---|---|---|---|
|
The OTA Image Block Request frame is sent from the Module to the Host. The Module expects to receive an OTA Image Block Response frame in response.
...
Byte Index | Field Name | Notes |
---|---|---|
0,1 | Node ID | Request OTA Device Node ID |
2..9 | EUI64 Address | Request OTA Device EUI64 |
10 | Endpoint | Request OTA Device Endpoint |
11 | Field Control | 8-bit Bitmap |
12,13 | Manufacturer Code | |
14,15 | Image Type | Unused - for backwards compatibility. Set to 0x0000 |
16..19 | File Version | Will contain the value initially set in the Query Next Image Response / OTA Query Next Image Response frames by the Host. |
20..23 | File Offset | |
24 | Maximum Data Size | N < 50 |
Anchor | ||||
---|---|---|---|---|
|
The OTA Image Block Response frame is sent from the Host to the Module. The Module relays the frame to the OTA target device. If the target EUI64 is the module’s own EUI64, the module will process it locally.
...
Byte Index | Field Name | Notes |
---|---|---|
0,1 | Node ID | Target Device Node ID. 0xFFFF indicates that the EUI64 is used |
2..9 | EUI64 Address | Target Device EUI64 |
10 | Endpoint | Target Device Endpoint |
11 | Status | 0x95 = Abort |
Anchor | ||||
---|---|---|---|---|
|
The Upgrade End Request frame is sent from the Module to the Host. The Module expects to receive an Upgrade End Response frame in response.
...
Byte Index | Field Name | Notes |
---|---|---|
0,1 | Node ID | Request OTA Device Node ID |
2..9 | EUI64 Address | Request OTA Device EUI64 |
10 | Endpoint | Request OTA Device Endpoint |
11 | Status | 0x00 – Success |
12,13 | Manufacturer Code | |
14,15 | Image Type | Unused - for backwards compatibility. Set to 0x0000 |
16..19 | File Version | Will contain the value initially set in the Query Next Image Response / OTA Query Next Image Response frames by the Host. |
Anchor | ||||
---|---|---|---|---|
|
The OTA Upgrade End Response frame is sent from the Host to the Module in response to an OTA Upgrade End Request with success status. The Module relays the frame to the OTA target device. If the target EUI64 is the module’s own EUI64, the module will process it locally,
...
Byte Index | Field Name | Notes |
---|---|---|
0,1 | Node ID | Target Device Node ID. 0xFFFF indicates that the EUI64 is used. |
2..9 | EUI64 Address | Target Device EUI64. All 0xFF indicates broadcast |
10 | Endpoint | 0xFF indicates a request on all endpoints. |
11,12 | Manufacturer Code | |
13,14 | Image Type | Unused - for backwards compatibility. Set to 0x0000 |
15..18 | File Version | Will contain the value initially set in the Query Next Image Response / OTA Query Next Image Response frames by the Host. |
19..22 | Current Time | |
23..26 | Upgrade Time |
...
Back to Top
Diagnostic Frames (0xD1)
This section describes the commands that initiate and respond to network scans.
Frame Name | Secondary Header Byte |
---|
0x01 - Network Scan Response
0x02 -
Allowed Context | Sent By Host/Module | ||
---|---|---|---|
Network Scan Request | 0x00 | All Contexts | Host |
Network Scan Response | 0x01 | All Contexts | Module |
Network Scan Complete |
Network Down Only
-
-
0x11 - Latency Response
-
0x02 | All Contexts | Module | |
Latency Request | 0x10 | All Contexts | Host |
Latency Response | 0x11 | All Contexts | Module |
Anchor | ||||
---|---|---|---|---|
|
The Network Scan Request is sent by the Host to the Module and serves to initiate Network Discovery. This command may only be transmitted when the application is in the Network Down state. The Module will respond with a Network Scan Response for each available network discovered and will also respond with a Network Scan Complete command once the scan request is complete.
...
Error Status | Enum | Description |
---|---|---|
Success | 0x00 | Request successfully transmitted |
Invalid Call | 0x01 | Network down |
Invalid Data | 0x02 | The channel mask or scan duration value is invalid |
Anchor | ||||
---|---|---|---|---|
|
The Network Scan Response is sent by the Module to the Host for every response retrieved subsequent to the issuance of a Network Scan Request. Each response represents a beacon from a node within an active network that is in communications range of the Module.
...
Byte Index | Field Name | Notes |
---|---|---|
0 | Channel | 0x0B – 0x1A: channel of the responding network |
1,2 | Short PAN ID | |
3..10 | Extended PAN ID | |
11 | Permitting Joining | 0x00 = False - network does not permit joining |
12 | Stack Profile | 0x02 = ZigBee Pro |
13 | LQI | 0x00 – 0xFF LQI (Link Quality Indication) is a unit-less measurement range with the upper range (0xFF) representing the highest link quality. |
14 | RSSI | The RSSI (Received Signal Strength Indication) in dBm, represented as a signed integer. |
Anchor | ||||
---|---|---|---|---|
|
The Modulesends theNetwork Scan Completecommand to the Host on completion of a Network Scan Request. It should be noted that the issuance of the Network Scan Complete command does not necessarily indicate that all Network Scan Responses have yet been retrieved for the aforementioned request.
...
Byte Index | Field Name | Notes |
---|---|---|
0 | Status | 0x00 = scan completed successfully |
Anchor | ||||
---|---|---|---|---|
|
The Latency Request frame is sent from Host to Module to test the round-trip latency between the Module and a destination node on the network. Upon receipt of this frame, the Module will send a packet to the destination node, and measure the time it takes to receive the acknowledgement.
...
Byte Index | Field Name | Notes |
---|---|---|
0,1 | Destination Node ID | LSB first |
2 | Options Bitmask | Bit 0 = Enable Retry |
Anchor | ||||
---|---|---|---|---|
|
The Latency Response frame is sent from the Module to the Host with the result of the latency test initiated with a Latency Request.
...