This section provides examples of Host application implementations for various device types, with a focus on the Startup Sequence to initialize and configure the Module.
Table of Contents |
---|
Basic Gateway Startup Sequence
This section details the basic recommended startup sequence for a Host application serving as a gateway. A gateway is typically a network coordinator with facilities for forming a Home Area Network (HAN) and managing devices on that network.
The sequence is described as a series of serial transactions between the Host and the Module. The hexadecimal byte payloads of the frames sent or received by the Host are shown inside square brackets, e.g., [F1 55 20 00 00 75 00].
...
- Write to Application Version of Basic cluster [F1 03 25 05 08 01 00 00 01 01 00 20 03 C7 00]
Endpoint ID = 1
Cluster ID = 0x0000
Cluster Side = Server (0x01)
Attribute ID = 0x0001 (Application Version)
Attribute Type = 0x20 (Unsigned 8-bit Integer)
Attribute Value = 0x03 - Write to UTC Time of Time cluster [F1 03 25 06 0B 01 0A 00 01 00 00 E2 29 DA 63 13 A0 02]
Endpoint ID = 1
Cluster ID = 0x000A
Cluster Side = Server (0x01)
Attribute ID = 0x0000 (UTC Time)
Attribute Type = 0xE2 (UTC Time)
Attribute Value = 0x1363DA29
...
At this point, both the Host and Module have been fully initialized. The next steps illustrate how the Host may prompt the Module to form a network and commission a device onto that network.
- Send Form Network
[F1 01 01 08 0F 00 F8 FF 03 03 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 16 02]
Channel Mask = Any channel between 11-25 (0x03FFF800)
Auto Options = Auto-select PAN ID and Auto-select Extended PAN ID (0x03)
Short PAN ID = 0x0000 (N/A as auto-select is enabled)
Extended PAN ID = 0x0000000000000000 (N/A as auto-select is enabled) - Wait for Network Status
- Receive Network Status [F1 01 09 82 0A 01 0F 00 00 CD AB 34 12 34 12 34 12 34 12 36 03]
Network State = Network Up (0x01)
ZigBee Device Type = Coordinator (0x00)
Channel = 15 (0x0F)
Node ID = 0x0000
PAN ID = 0xABCD
Extended PAN ID = 0x1234123412341234
Permit Join Time = 0x00 - Open permit join window for 60s by sending Permit Join [F1 01 03 09 01 3C 4A 00]
- Wait for device to join
- When device joins, receive Trust Center Update [F1 01 10 83 0E 0B 1A 45 23 01 00 00 46 24 00 00 00 00 9A 01]
Node ID = 0x1A0B
EUI64 = 0x0024460000012345
Device Update Event = MAC Association (0x00)
Parent Node ID = 0x0000
The device is now on the network and the Host may send ZDO and ZCL messages to it.
Basic HA Outlet Startup Sequence
Below is the basic recommended startup sequence for a Host application serving as an HA Outlet with support for the On/Off cluster on two separate endpoints and a third manufacturer-specific endpoint.
The sequence is described as a series of serial transactions between the Host and the Module. The hexadecimal byte payloads of the frames sent or received by the Host are shown inside square brackets, e.g., [F1 55 20 00 00 75 00].
...
i. Configure the first On/Off endpoint by sending Add Endpoint with following parameters:
[F1 03 10 04 12 01 04 01 02 00 01 05 00 00 03 00 04 00 05 00 06 00 00 49 00]
Endpoint ID = 1
Profile ID = 0x0104 (HA Application Profile)
Device ID = 0x0002 (On/Off Output)
Device Version = 0x01
Number of Server Clusters = 5
Server Clusters = Basic (0x0000), Identify (0x0003), Groups (0x0004), Scenes (0x0005), On/Off (0x0006)
Number of Client Clusters = 0
...
If the Module has a previous network in memory, it will work to automatically rejoin that network. In this case the Module has no previous network and as such is in the Network Down state.
At this point, both the Host and Module have been fully initialized. The next steps explains how the Host prompts the Module to join a network.
...
The Module is now joined to the network and may transmit ZCL and ZDO messages. When an external device modifies the application On/Off State value on either Endpoint 1 or Endpoint 2, the Host receives the command On/Off State Update informing it of the update. Any other attribute value change (i.e. against the MSE Endpoint 3 and its custom cluster) is reported to the Host via the Received Attribute Write command.
Include Page | ||||
---|---|---|---|---|
|