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.


Table of Contents
maxLevel2
minLevel2

...

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 ContextsModule

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
0x04MSB Binary Type2
0x05 - 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.


...

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.  in order to comply with FCC regulations, a MMB Networks device on channel 26 will operate in a reduced power mode.

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.

...

Byte Index

Field Name

Notes

0..3

Channel Mask

4-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 only operate on channels 11-26 (inclusive). If multiple channels are selected, the Module will form a network on the channel with the least interference.

Please note: In order to comply with FCC regulations, MMB Networks devices operate at a reduced power level on channel 26 is restricted. Networks formed on this channel are in violation of FCC rules and regulations.   26 to stay within FCC regulations. It's not recommended to form a network on this channel as it will have a reduced range.

4

Auto Options

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

5,6

Short PAN ID

The Short PAN ID of the new network.

7..14

Extended PAN ID

The Extended PAN ID of the new network.

...

Byte Index

Field Name

Notes

0

Network State

0x00 = Network Down
0x01 = Network Up
0x02 = Joining
0x03 = Forming
0x04 = Rejoining
0x10 = Waiting to Rejoin
0x20 = Waiting Between Join Attempts (only received when Network Auto Join enabled)
0xFF = Unknown (During Initialization)

1

ZigBee Device Type

0x00 = Coordinator
0x01 = Router
0x02 = End Device
0x03 = Sleepy End Device
0xFF = Unknown

2

Channel

0xFF = Unknown

3,4

Node ID

0xFFFF = Unknown

5,6

PAN ID

0xFFFF = Unknown

7..14

Extended PAN ID

All 0’s = Unknown

15

Permit Join Time

The remaining Permit Join Duration at the time of issuance.

...

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


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

...

Byte IndexField NameNotes

0

Endpoint ID

Valid range 1 - 240

1,2

Profile ID

0x0104

3,4

Device ID

See /wiki/spaces/SPRHA17/pages/37093556   this page for a list of Device IDs used in the HA profile.

5

Device Version


6

Number of Server Clusters

The number of server clusters, n

7..6+2n

List of Server Clusters

List of 2-byte Cluster IDs, LSB first

7+2n

Number of Client Clusters

The number of client clusters, m

8+2n..7+2(n+m)

List of Client Clusters

List of 2-byte Cluster IDs, LSB first

...

The Module will verify that the Endpoint ID is valid and that there is sufficient memory for the new endpoint and its associated clusters. Likewise, the application will automatically configure all mandatory attributes for specified known clusters. The following table  lists the possible Status Responses on reception of the command.

...

Byte Index

Field Name

Notes

0

Endpoint ID

Valid range 1 - 240

1,2

Profile ID


3,4

Device ID

See /wiki/spaces/SPRHA17/pages/37093556 this page for a list of Device IDs used in the HA profile.

5

Device Version


6

Number of Server Clusters

The number of server clusters, n

7..6+2n

List of Server Clusters

List of 2-byte Cluster IDs, LSB first

7+2n

Number of Client Clusters

The number of client clusters, m

8+2n..7+2n+2m

List of Client Clusters

List of 2-byte Cluster IDs, LSB first

...

Byte Index

Field Name

Notes

0

Endpoint ID


1,2

Cluster ID


3

Cluster Server/Client

0x00 = Client
0x01 = Server

4

Number of Attributes to Add


5..n

Attribute Definition Records

Record format is shown in the following table.

Anchor
Attribute Definition Record Format
Attribute Definition Record Format
Attribute Definition Record Format

Byte Index

Field Name

Notes

0,1

Attribute ID


2

Attribute Type

See the ZCL Data TypesSpecification References page for possible values.

3

Attribute Property Bitmask

Bit   Description

0       0 = Not Readable
         1 = Readable
1       0 = Not Writable
         1 = Writable
2       0 = Not Reportable
         1 = Reportable (i.e., may be configured for Attribute Reporting)
3-7     Reserved

...

Byte Index

Field Name

Notes

0

Endpoint ID


1,2

Cluster ID


3

Cluster Server/Client

0x00 = Client
0x01 = Server

4,5

Attribute ID


6

Attribute Property Bitmask

Bit   Description

0       0 = Not Readable
         1 = Readable
1        0 = Not Writable
          1 = Writable
2        0 = Not Reportable
          1 = Reportable (i.e., may be configured for Attribute Reporting)
3-7     Reserved

7

Attribute Type

See the ZCL Data TypesSpecification References page for possible values.

8..n

Attribute Value

Size dependent on Attribute Type.

For strings, the length of the string will immediately precede the string itself.

...

Byte Index

Field Name

Notes

0

Endpoint ID


1,2

Cluster ID


3

Cluster Server/Client

0x00 = Client
0x01 = Server

4,5

Attribute ID


6

Attribute Type

See the /wiki/spaces/SPRC2/pages/110563209 ZCL Specification References page for possible values.

7..n

Attribute Value

Size dependent on Attribute Type.

For strings, the length of the string must immediately precede the string itself.

...

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 

...

The Received Attribute Write command is sent by the Module to the Host on reception of a Attribute Write command from the source node on the network. The command serves to inform the Host of a change to the value of an attribute along with source of the change and the value itself.

Payload for Received Attribute Write Command

Byte Index

Field Name

Notes

0,1

Source Node ID

The Source Node ID of the received Attribute Write command.

2

Source Endpoint ID

The source Endpoint ID of the received Attribute Write command.

3

Local Endpoint ID

The target local Endpoint ID to which the received Attribute Write command was directed.

4,5

Cluster ID


6

Cluster Client/Server

0x00 = Client
0x01 = Server

7,8

Attribute ID


9

Attribute Type

See the ZCL Data TypesSpecification References page for possible values.

10..n

New Attribute Value

The new value of the target attribute, as modified by the received Attribute Write command.

For strings, the length of the string will immediately precede the string itself.

...

Payload for ZCL Passthru Message Command

...


Byte Index

Field Name

Notes

0,1

Source Node ID


2

Source Endpoint ID


3

Local Endpoint ID


4,5

Cluster ID


6

Encryption Level

0x00 = Network Encryption Only
0x01 = Network + APS Encryption

7

Frame Control

8-bit Bitmap:

Bits 0-1: 00 = ZCL General Command
              01 = Cluster-Specific Command
Bit 2:        1 = Manufacturer-Specific Command
Bit 3:        0 = Client to Server
                1 = Server to Client
Bit 4:        1 = Disable Default Response
Bit 5-7:      Reserved

8,9

Manufacturer Code

Applicable if Bit 2 of Frame Control is enabled.

10

Transaction Sequence Number

The Transaction Sequence Number of the original request.

11

Command ID


12

Payload Length


13..n

Payload



...

Byte Index

Field Name

Notes

0

Source Node ID

Address of the responding device

2

Source Endpoint ID

Endpoint where attribute is hosted

3,4

Source Cluster ID

Cluster of the attribute

5

Client/Server Cluster

0x00 = Client
0x01 = Server

6,7

Attribute ID

Corresponds to Attribute ID in request

8

ZCL Status

0x00 = Success
0x86 = Unsupported attribute

See /wiki/spaces/SPRHA17/pages/37093554 this page for ZCL Status values

9

Attribute Data Type

See this page for valid values

10..n

Attribute Value

Byte length of the Value dependent on Attribute Data Type.

For strings, the length of the string will immediately precede the string itself.

...

Byte Index

Field Name

Notes

0,1

Attribute ID

The target attribute to write to

2

Attribute Data Type

See this page for details on the ZCL Data Types used in this field

3..2 + m

Attribute Value

Byte length of the Attribute Value where m ≥ 1 is dependent on Attribute Data Type.

For strings, the length of the string will immediately precede the string itself.

...

  • (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 )

...

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.

NOTE: Allow a wait time of 5000ms for the Image Notification Command Frame

Payload for OTA Image Notification Command

...

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
Bit 0 : Request node’s IEEE address
           0=unavailable
           1=present
Bits 1-7 : Reserved

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

Expected Host Action

The Host must process and respond to Image Block Request messages until the Module sends a Upgrade End Request

The  Host must set status to MALFORMED_COMMAND (0x80) and return a 0 length data block if the Image Offset is outside the range of the file length.

Anchor
OTA Image Block Response
OTA Image Block Response
OTA Image Block Response Command - ( PH:0xB0, SH:0x05 )

...

There are three possible return values for the OTA Image Block Response: Success, Wait for Data, and Abort. The payload differs for each one.

NOTE: Allow a wait time of 250ms for the Image Block Response Frame(except for last reponse in the sequence!)

Allow a wait time of 15000ms for the Last Image Block Response Frame

Payload for OTA Image Block Response Command on Success

...

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.

NOTE: Allow a wait time of 30000ms for the Upgrade End Request Command Frame

Payload for OTA Upgrade End Request Command

...