Zigbee_FindBind_OnOff_Router Application Description

How to use the Finding and Binding feature on a device acting as a Client with Router role within a Centralized Zigbee network.

The purpose of this application is to show how Finding and Binding (F&B) works on a Zigbee centralized network. It will demonstrate how F&B initiator will automatically create bindings to bindable clusters on the F&B target. Once clusters are bound, they will be able to communicate through bindings which will toggle LEDs and output messages through the serial interface.

For this specific application:

Keywords

Connectivity, Zigbee, Zigbee protocol, 802.15.4 protocol, OnOff cluster, Scenes cluster, Messaging cluster, IAS Warning Device cluster, Identify cluster, Finding and Binding

Hardware Requirements

For this application it is requested to have:

 
            Router IAS                                      Coordinator

             ---------                                      ---------
             |       |       ZCL commands                   |       |
      PushB=>|Client | <----------------------------------> |Server | =>LED
             |       |                  |                   |       | =>UART
             |       |                  |                   |       |
              --------                  |                   ---------
                                        |
            Router OnOff                |
                                        |
             ---------                  |
             |       |                  |
      PushB=>|Client |<-----------------
             |       |
             |       |
              --------


 ---------------------------------      ------------------------------    ------------------------
 | Zigbee_Find_Bind_OnOff_Router |      |Zigbee_Find_Bind_IAS_Router |    |Zigbee_Find_Bind_Coord |
 ---------------------------------      ------------------------------    ------------------------
             |                                       |                             | 
             |                                       |                 Power up  =>|
             |                                       |                             |Allocate 
             |                                       |                             | -OnOff
             |                                       |                             | -IdentifyServer, 
             |                                       |                             | -ScenesServer,
             |                                       |                             | -IasWdServer,
             |                                       |                             | -MsgServer, 
             |                                       |                             |Clusters
             |                                       |                             |
             |                                       |                             |Creation of the network
             |                                       |                             |(Blue LED goes On)
             |                                       |                             |
             |                                       |                      SW1  =>|Turn on the                                                       
             |                                       |                             |Identify Mode 
             |                                       |                             |(valid during 30 Seconds)
             |                                       |                             |
             |                           Power up  =>|                             |
             |                                       |                             |
             |                                       |Allocate                     |
             |                                       | -MsgClient                  |
             |                                       | -IdentifyClient             |
             |                                       |Clusters.                    |
             |                                       |                             |           
 Power up  =>|                                       |                             |
             |Allocate                               |                             |
             |-OnOffClient                           |                             |
             |-IdentifyClient                        |                             |
             |-ScenesClient                          |                             |
             |Clusters                               |                             |
             |                                       |                             |
             |After a few seconds,                   |After a few seconds,         |
             |the blue LED should light on           |the blue LED should light on |
             |(The network is now established)       |(The network is now establ.) |
             |                                       |                             |
             |Once the find and bind procedure       |                             |
             |is completed, the green LED goes On    |                             | 
             |(Binding entries created = 3)          |                             |
             |                                       |                             | 
             |(Note : On ZR1, the find and bind is   |                             |
             |initiated automatically)               |                             |
             |                                       |                             |
             |                                       |                             |
             |                                SW1 => |Initiate the                 |
             |                                       |find and bind procedure      |
             |                                       |                             |
             |                                       |Once the find and bind       |
             |                                       |procedure is completed,      |
             |                                       |the green LED goes On        |
             |                                       |(Binding entries created = 2)|    
             |                                       |                             |
             |                                       |Allocate                     |
             |                                       |-IAS_client cluster          |
             |                                       |Clusters                     |
             |                                       |once the first find          |
             |                                       |and bind as been done        |
             |                                       |                             |
             |                                       |                             |
             |                            Display msg|<----------------------------|<= SW2
             |                      (refer to traces)|                             |
             |                                       |                             |
             |                                       |                             |
             |                                 SW1 =>|Initiate a new               |
             |                                       |find and bind (adding IAS)   |
             |                                       |(Binding entries created = 3)|
             |                                       |                             |
             |                                       |                             |
             |                                       |                             |
             |                                       |    Sending Warning command  |
             |                                 SW2 =>|---------------------------->|
             |                                       |                             |Red LED
             |                                       |                             |goes on 
             |                                       |                             |for 3 sec
             |                                       |                             |
       SW1 =>|---------------------------------------------------onOff togle------>|Green LED
             |                                       |                             |toggles
             |                                       |                             |
             |                                       |                             |
       SW2 =>|---------------------------------------------------Store Scene------>| Store Green LED status
             |                                       |                             | (either on or off)
             |                                       |                             |
       SW1 =>|---------------------------------------------------onOff togle------>|Green LED
             |                                       |                             |toggles
             |                                       |                             |
             |                                       |                             |
       SW3 =>|---------------------------------------------------Recall Scene----->| If the Green LED status
             |                                       |                             | stored previously via the 
             |                                       |                             | store scene command was on,
             |                                       |                             | the green LED will go back 
             |                                       |                             | to on
             |                                       |                             |
             

Application Setup

Note: When LED Red, Green and Blue are toggling it is indicating an error has occurred on application.

Hardware and Software environment

Traces

Note

By default, this application runs with Zigbee PRO stack R23.
If you want to run this application using Zigbee PRO stack R22, you should replace ZigBeeProR23_FFD.a by ZigBeeProR22_FFD.a and ZigBeeProR23_RFD.a by ZigBeeProR22_RFD.a and ZigBeeClusters.a by ZigBeeClustersR22.a in the build environment.
Also, set in the project setup compilation flag CONFIG_ZB_REV=22.