Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

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
titleNew in RapidHA v1.7

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
TOC
TOC

Table of Contents
maxLevel2
minLevel2

...

This section describes a wide range of command functionality that works on a system-wide level under the Primary Header 0x55.

Frame NameSecondary Header ByteAllowed ContextSent By Host/Module
Reset0x00All ContextsHost
Module Info Request0x02All ContextsHost
Module Info Response0x03N/AModule
Bootloader Version Request0x04All ContextsHost
Bootloader Version Response0x05N/AModule
Application Version Count Request0x06All ContextsHost
Application Version Count Response0x07N/AModule
Application Version Request0x08All ContextsHost
Application Version Response0x09N/AModule
Restore Defaults0x10All ContextsHost
Host Startup Ready0x20All ContextsHost
Startup Sync Request0x21All ContextsModule
Startup Sync Complete0x22Startup Config OnlyHost
Antenna Configuration Request0x23All ContextsHost
Antenna Configuration Response0x24N/AModule
Antenna Configuration Write0x25All ContextsHost
LED Configuration Request0x26All ContextsHost
LED Configuration Response0x27N/AModule
LED Configuration Write0x28All ContextsHost
Serial ACK Config Write0x30All ContextsHost
Serial ACK Config Request0x31All ContextsHost
Serial ACK Config Response0x32N/AModule
Manufacturer ID Request0x40All ContextsHost
Manufacturer ID Response0x41N/AModule
Manufacturer ID Write0x42Startup Config OnlyHost
Sleepy Parameters Request CMD0x50All ContextsHost
Sleepy Parameters Response CMD0x51N/AModule
Sleepy Parameters Write CMD0x52All ContextsHost
Sleepy Hibernate Duration Request CMD0x53All ContextsHost
Sleepy Hibernate Duration Response CMD0x54N/AModule
Sleepy Hibernate Duration Write CMD0x55All ContextsHost
Sleep Control Stay Awake Duration Write0x58All ContextsHost
Sleep Control Stay Awake Duration Read0x59All ContextsHost
Sleep Control Stay Awake Duration Response0x5AAll ContextsModule
Status Response0x80N/AHost or Module
Sleep Control Wakeup0xA0All ContextsHost
Error0xE0All ContextsHost

Anchor
Reset
Reset
Reset Command - ( PH:0x55 SH:0x00 )

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
Application Version Request
Application Version Request
Application Version Request - ( PH:0x55, SH:0x08 )

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
0x01 - Retrieve RapidHA Version
0x02 - 0xFF - Retrieve Virtual Host Version 

Effect on Receipt

The Module will respond with an Application Version Response.

Anchor
Application Version Response
Application Version Response
Application Version Response - ( PH:0x55, SH:0x09 )

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. 

1Version TypeThe type of version string returned. See Version Types.
2..(n + 3)VersionThe 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
 

Type ID

Type Name

Length (Octets)

0x00

LSB Binary Type

4

0x01MSB Binary Type4
0x02String TypeVariable
0x03LSB Binary Type2
0x04 - 0xFEReservedN/A
0xFFInvalidN/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
Restore Defaults
Restore Defaults
Restore Defaults Command - ( PH:0x55, SH:0x10 )

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
Host Startup Ready
Host Startup Ready
Host Startup Ready Command - ( PH:0x55, SH:0x20 )

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
Startup Sync Request
Startup Sync Request
Startup Sync Request Command - ( PH:0x55, SH:0x21 )

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
0x01 = Already Running

1

Configuration State

0x00 = Factory Default
0x01 = Needs Endpoint Configuration
0x02 = Fully Configured

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
Startup Sync Complete
Startup Sync Complete
Startup Sync Complete Command - ( PH:0x55, SH:0x22 )

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.


Anchor
Antenna Configuration Request
Antenna Configuration Request
Antenna Configuration Request Command - ( PH:0x55, SH:0x23 )

...


Anchor
Status Response
Status Response
Status Response Command - ( PH:0x55, SH:0x80 )

The Status Response command may be issued either by the Module to the Host, or by the Host to the Module, in order to acknowledge the reception of a command.

Payload for Status Response Command

Byte Index

Field Name

Notes

0

Status

0x00 = Success
0x01 = Invalid Call
0x02 = Invalid Data
0x03 = Unsupported
0x04 = Storage Full
0x05 = No Entry Found
0x06 = Invalid Data Type
0x07 = Incorrect Length
0x08 = Endpoint Not Found
0x09 = Cluster Not Found
0x0C = Out of Memory
0x0D = Send Failure
0x0E = APS Ack Timeout
0x0F = Endpoint Configuration Locked
0x10 = Duplicate Data
0x11 = Busy
0xFF = Unknown Failure

Anchor
Sleep Control Wakeup
Sleep Control Wakeup
Sleep Control Wakeup - ( PH:0x55, SH:0xA0 )

...

The Host may then either send a serial message within the 50ms wake window or issue the Sleepy Control Stay Awake Duration Write command to force the application stay awake for a longer specified duration.


Byte Index

Field Name

Notes

0.. 18Filler BytesStuff all payload bytes with 0xFF

Anchor
Error
Error
Error Command - ( PH:0x55, SH:0xE0 )

The Error frame is sent by the Module to the Host to report an application error.

Payload for Error Command

Byte Index

Field Name

Notes

0

Error Condition

An enumeration of Error Conditions:

Network Error Conditions:

0x00 – Reserved
0x01 – Scanning Error
0x02 – Key Establishment Error
0x03 – Service Discovery and Binding Error
0x04 – Forming Network Error
0x05..0x0F – Reserved

Reset Error Conditions:

0x10 – Reset Error
0x11..0x1F – Reserved

Synchronization Error Conditions:

0x20 – Synchronization Error
0x21..0x2F – Reserved

Bootload Error Conditions:

0xB0 – Local Bootload Error
0xB1 – OTA Client Bootload Error
0xB2..0xBF – Reserved

1

Sub-Error

Sub-Errors associated with the given Error Condition.

Associated with FORMING_NETWORK_ERROR (0x04)
    0xAB – SUBERR_NO_BEACON  // usually means that a
                                                       // conflicting PAN ID exists

Associated with LOCAL_BOOTLOAD_ERROR (0xB0)
    0x00 – SUBERR_INVALID_MANUFACTURER_ID
    0x01 – SUBERR_INVALID_TARGET_EUI64
    0x02 – SUBERR_OUT_OF_ORDER_TRANSMISSION
    0x03 – SUBERR_INVALID_LOCAL_IMAGE
    0x04 – SUBERR_NO_APP_BOOTLOADER

Associated with OTA_BOOTLOAD_ERROR (0xB1)
    0x00 – SUBERR_DOWNLOAD_TIMEOUT
    0x01 – SUBERR_INVALID_OTA_IMAGE
    0x02 – SUBERR_SERVER_ABORTED
    0x03 – SUBERR_CLIENT_ABORTED
    0x04 – SUBERR_MAX_ERRORS_EXCEEDED
    0x05 – SUBERR_STORAGE_FAILURE

Expected Host Action 

Error conditions are reported for diagnostic purposes. Depending on the given error received, there may or may not be an expected action for the Host to take in response.


...

 Back to Top

Network Commissioning Frames (0x01)

The Network Commissioning command set allows the Host to prompt the Module to either form a network or join an existing network. A third option exists for performing HA 1.2 EZ-Mode Commissioning, defined as an automated process that prompts the application to join an existing network and, failing to find one, to form its own.

Frame NameSecondary Header ByteAllowed ContextSent By Host/Module
Join Network0x00Network Down OnlyHost
Form Network0x01Network Down OnlyHost
Permit Join0x03Network Up OnlyHost
Leave Network0x04All ContextsHost
Rejoin Network0x05Network Up OnlyHost
Network Status Request0x08All ContextsHost
Network Status Response0x09N/AModule
Trust Center Device Update0x10Network Up OnlyModule
Network Auto Join0x11Network Down OnlyHost
Network Reset Auto Join0x12All ContextsHost


Anchor
Join Network
Join Network
Join Network Command - ( PH:0x01, SH:0x00 )

...

Payload for Join Network Command

Byte Index

Field Name

Notes

0..3

Channel Mask

Four-byte channel mask. Each bit represents channels 0 – 31.
The least significant bit, bit 0, corresponds to channel 0, bit 1 to channel 1, etc.

Example: Channel 11 = 0x00000800 or interpreted as a 32-bit bitmap - 0000 0000 0000 0000 0000 1000 0000 0000 - bit 11 would be flipped

Channel 13 = 0x00002000 or interpreted as a 32-bit bitmap - 0000 0000 0000 0000 0010 0000 0000 0000 - bit 13 would be flipped

ZigBee HA and SE operate on only channels 11 through 26.
Module will scan all selected channels for the one with the strongest signal strength/lowest noise ratio.

It should be noted that channel 26 is restricted.
Networks formed on this channel are in violation of FCC rules and regulations. 

4

Auto Options

Bit 0 = 1 – Auto PAN ID
Bit 1 = 1 – Auto Extended PAN ID

If both bits are “1” and multiple networks exist on the channel,
the Module will join the first viable network that responds.

5,6

Short PAN ID

The Short PAN ID of the network that the Module must join.

7..14

Extended PAN ID

The Extended PAN ID of the network Module must join to.

Effect on Receipt

The Module will sequentially scan all channels defined by the Channel Mask. The Module will attempt to join any network with an open Permit Join window and matching the PAN IDs as specified in the command payload. If a join attempt fails, the Module will resume scanning until it has tried all available and applicable networks. The possible Status Responses generated by the Module in response to this command are listed in the following table.

Anchor
Status Responses to Join Network Command
Status Responses to Join Network Command
Status Responses to Join Network Command

Status Response

Enum

Description

Success

0x00

The Module successfully processed the command, and shall start the scan and join sequence.

Invalid Call

0x01

The Module is already on a network. The command is only valid when the application’s network state is Network Down.

Invalid Data

0x02

No channels have been selected in the Channel Mask defined in the command.

Anchor
Form Network
Form Network
Form Network Command - ( PH:0x01, SH:0x01 )

...

This section describes commands that set and report on security keys.

Frame NameSecondary Header ByteAllowed ContextSent By Host/Module
Preconfigured Key Option Write0x00Network Down OnlyHost
Preconfigured Key Option Request0x01All ContextsHost
Preconfigured Key Option Response 0x02N/AModule
Install Code Request0x03All Contexts Host
Install Code Response0x04N/AModule
Link Key Write0x05Network Down OnlyHost
Link Key Request0x06All Contexts Host
Link Key Response0x07N/AModule
Network Key Write0x08Network Down OnlyHost
Network Key Request0x09All Contexts Host
Network Key Response0x0AN/AModule


Anchor
Preconfigured Key Option Write
Preconfigured Key Option Write
Preconfigured Key Option Write Command - ( PH:0x02, SH:0x00 )

...

This section describes the commands used to configure RapidHA’s IEEE functional device type, as well as the endpoints, clusters and attributes that will logically exist on that device.

Frame NameSecondary Header ByteAllowed ContextSent By Host/Module
Device Type Write0x00Startup Config Only
Device Type Request0x01All Contexts
Device Type Response0x02All Contexts
Add Endpoint0x10Startup Config Only
Endpoint List Request0x11All Contexts
Endpoint List Response0x12All Contexts
Endpoint Descriptor Request0x13All Contexts
Endpoint Descriptor Response 0x14All Contexts
Add Attributes to Cluster0x20Startup Config Only
Attribute List Request0x21All Contexts
Attribute List Response0x22All Contexts
Attribute Request0x23All Contexts
Attribute Response0x24All Contexts
Attribute Write0x25All Contexts
Attribute Report Passthrough Control0x26All Contexts
Clear Endpoint Config0x30Startup Config Only
Register Commands Passthrough0x80Startup Config Only


Anchor
Device Type Write
Device Type Write
Device Type Write Command - ( PH:0x03, SH:0x00 )

...

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
0x01 = Enabled 

...

This section describes the two ways, unicast and broadcast, for the Host to send a ZDO command. It also describes the commands sent by the Module to communicate ZDO-level information to the Host.

Frame NameSecondary Header ByteAllowed ContextSent By Host/Module
Send ZDO Unicast0x01Network Up OnlyHost
Send ZDO Broadcast0x02Network Up OnlyHost
ZDO Send Status0x03All ContextsModule
ZDO APS Ack0x04All ContextsModule
ZDO Response Received0x05All ContextsModule
ZDO Response Timeout0x06All ContextsModule
ZDO Device Announce Received0x1EAll ContextsModule


Anchor
Send ZDO Unicast
Send ZDO Unicast
Send ZDO Unicast Command - ( PH:0x04, SH:0x01 )

...

This section describes the three ways, unicast, multicast and broadcast, available to the Host to send a ZCL command. In addition, it describes the commands used by the Host to read and write attributes that were previously configured using the ZigBee Support Configurations commands. This section also includes commands sent from the Module to convey responses and statuses from commands previously sent by the Host. It also describes the command used by the Module to pass through ZCL commands that have been registered by the Host using the Register Commands Passthru command.

Frame NameSecondary Header ByteAllowed ContextSent By Host/Module
Send ZCL Unicast0x00Network Up OnlyHost
Send ZCL Multicast0x01Network Up OnlyHost
Send ZCL Broadcast0x02Network Up OnlyHost
ZCL Send Status0x03All ContextsModule
ZCL APS Ack0x10All ContextsModule
ZCL Response Received 0x11All ContextsModule
ZCL Response Timeout0x12All ContextsModule
Received Attribute Write0x14All ContextsModule
ZCL Passthru Message0x20All ContextsModule
ZCL Read Attribute Request0x30Network Up OnlyHost
ZCL Read Attribute Response0x31All ContextsModule
ZCL Write Attribute Request0x32Network Up OnlyHost
ZCL Write Attribute Response0x33All ContextsModule


Anchor
Send ZCL Unicast
Send ZCL Unicast
Send ZCL Unicast Command - ( PH:0x05, SH:0x00 )

...

The mandatory commands associated with a given General Cluster are made available only if that cluster is first appended to the application endpoint configuration. For example, the Identify Start and Identify Stop commands will become available to the Host only after it configures an application endpoint with the Identify server cluster.


Frame NameSecondary Header ByteAllowed ContextSent By Host/Module
Received Reset to Factory Default0x00All ContextsModule
Identify Start0x10All ContextsModule
Identify Stop0x11All ContextsModule
Time Client Get Time0x40All ContextsHost
Time Client Get Time Response0x41All ContextsModule
Time Client Time Changed0x42All ContextsModule
Network Time Sync Period Write0x43All ContextsHost
Network Time Sync Period Request0x44All ContextsHost
Network Time Sync Period Response0x45All ContextsModule


Anchor
Received Reset to Factory Default
Received Reset to Factory Default
Received Reset to Factory Default Command - ( PH:0x011, SH:0x00 )

...

The mandatory commands associated with a given HA cluster are only made available if that cluster is first appended to the application endpoint configuration. For example, the On/Off State Update command will only become available to the Host after it configures an application endpoint with the On/Off server cluster.

Frame NameSecondary Header ByteAllowed ContextSent By Host/Module
On Off State Update0x00Network Up OnlyModule
Move to Level0x20Network Up OnlyModule
Level Move0x21Network Up OnlyModule
Level Step0x22Network Up OnlyModule
Level Stop0x23Network Up OnlyModule
Check Battery Attribute0x24Network Up OnlyHost
Move to level with On/Off Status0x25Network Up OnlyModule
Lock Door0x60Network Up OnlyModule
Unlock Door0x61Network Up OnlyModule
Lock Confirm0x63Network Up OnlyHost

Anchor
On Off State Update
On Off State Update
On/Off State Update Command - ( PH:0x012, SH:0x00 )

...

Payload for Level Stop Command

Byte Index

Field Name

Notes

0

Endpoint ID

Endpoint ID of the application Level Control server cluster.

Expected Host Action

The Host shall stop all Level Control movement on the specified hardware endpoint.

...

  • (Indicating Level 100, Transition Time 0, On/Off Status ON) F1 12 25 BB 05 16 64 00 00 01 72 01 [RHAMoveToLevel]


Anchor
Lock Door
Lock Door
Lock Door Command  - ( PH:0x012, SH:0x60 )

...

Payload for Lock Confirm Command


Byte Index

Field Name

Notes

0

Lock State

0x00 = Unlocked
0x01 = Locked


Effect on Receipt


The Module will update the value of the application Lock State attribute and report the success of the Lock or Unlock action to the network device that issued the original command.

...

The commands in this section facilitate serial bootload upgrade of the application operating on the Module. These commands have been implemented per HA 1.2 guidelines.

Frame NameSecondary Header ByteAllowed ContextSent By Host/Module
Query Next Image Response0x02All ContextsHost
Image Block Request0x03All ContextsModule
Image Block Response0x05All Contexts

Host

Upgrade End Request0x06All ContextsModule
Upgrade End Response0x07All ContextsHost


Anchor
Query Next Image Response
Query Next Image Response
Query Next Image Response Command - ( PH:0x0B, SH:0x02 )

...