14.2.3.1.2 BDB Commissioning
Commissioning is executed based on the option specified in mode (parameter). The different commissioning modes are touchlink commissioning , network steering, network formation and finding & binding. Only one of these modes shall be set while calling this API, and that particular commisioning procedure will be started.
Commissioning is invoked by application using the below Public API
bool BDB_InvokeCommissioning (BDB_InvokeCommissioningReq_t *req);
Parameters:
BDB_InvokeCommissioningReq_t is request structure has the following elements to be filled
- mode - selected commissioning procedure to execute.
- initiatorReq -
Parameters used in f&b and touchlink. Ignore if touchlink or finding and binding is
not set in mode
- confirm - Parameters of the confirm being returned in BDB_InvokeCommissioningConf()
- BDB_InvokeCommissioningConf - Commissioning completion callback with commissioning status
Touchlink Commissioning is invoked by application using the Public API BDB_InvokeCommissioning() The following example illustrates the touchlink process:
// parameters for commissioning request BDB_InvokeCommissioningReq_t AppbdbCommissioningreq; //BDB invoke commissioning callback static void touchlinkCallback(BDB_InvokeCommissioningConf_t *conf) { ... } // Fill the commissioning request with mode, endpoint, clutser details and a // callback to be called after commissioning. //#define BDB_COMMISSIONING_TOUCHLINK 0 //#define BDB_COMMISSIONING_NWK_STEERING 1 //#define BDB_COMMISSIONING_NWK_FORMATION 2 //#define BDB_COMMISSIONING_FINDING_BINDING 3 AppbdbCommissioningreq.mode = BDB_COMMISSIONING_TOUCHLINK; // select one of the above list AppbdbCommissioningreq.initiatorReq->initiatorEndpoint = srcEndpoint; AppbdbCommissioningreq.initiatorReq->clientClustersCount = remoteServersCnt; AppbdbCommissioningreq.initiatorReq->serverClustersCount = remoteClientsCnt; AppbdbCommissioningreq.initiatorReq->clientClustersList= deviceServers; AppbdbCommissioningreq.initiatorReq->serverClustersList= deviceClients; AppbdbCommissioningreq.BDB_InvokeCommissioningConf = commissioningDoneCallback; // Start commissioning procedure BDB_InvokeCommissioning(&AppbdbCommissioningreq);
1. Touchlink commissioning
In this procedure, the node that initiates the touchlink operation is called the initiator and the node that responds is called the target. The initiator scans for nodes also supporting touchlink and if one is found establishes a new network with the target (if the initiator is not on a network) or adds the target to the network (if the initiator is already on a network)
2. Network Steering
There are two procedures in Network Steering.
- i. Network Steering when node is on a network
- A node that is already on a network opens up the network for a finite duration to allow other nodes to join
- ii. Network Steering when node is not on a network
- A node that is not already on a network scans for open networks and if a suitable one is found attempts to join. After joining the node is authenticated and receives the network key. Finally, if a Trust Center is present in the network, the node then exchanges its preconfigured link key for one generated by the Trust Center.
3. Network Formation
Zigbee coordinator node forms a centralized security network and activates its Trust Center functionality whereas a Zigbee router node forms a distributed security network.
4. Finding and Binding
There are two procedures in Finding and binding.
- Finding and binding for a initiator endpoint: In this procedure, the initiator endpoint first searches for identifying target endpoints and if one is found, its simple descriptor is requested. The initiator endpoint then searches for any matching clusters between itself and the target endpoint and for each match found, it creates a corresponding entry in its binding table. If a group binding is requested, the initiator endpoint configures group membership of the target endpoint
- Finding and binding for a target endpoint: In this procedure, the target endpoint identifies itself for a finite duration and then handles subsequent finding & binding requests from an initiator endpoint