4.1.2 BDB Commissioning

The system executes BDB commissioning based on the specified mode in the parameter. When calling this API, the user must set only one of the following commissioning modes to start the corresponding procedure:
  • Touchlink commissioning
  • Network steering
  • Network formation
  • Finding and binding
The application can invoke commissioning using the following public API:
bool BDB_InvokeCommissioning (BDB_InvokeCommissioningReq_t *req);

Parameters:

The user must ensure to fill the following elements in the BDB_InvokeCommissioningReq_t request structure:

  • Mode - Selected commissioning procedure to execute
  • initiatorReq – Use parameters in finding and binding (f&b) and Touchlink. If the mode does not have Touchlink or finding and binding set, ignore these parameters.
  • Confirm – Parameters of the confirm being returned in BDB_InvokeCommissioningConf()
  • BDB_InvokeCommissioningConf – Commissioning completion callback with commissioning status
The application invokes the Touchlink commissioning by using the BDB_InvokeCommissioning() public API. The following example code provides details of 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);

Touchlink Commissioning

Touchlink commissioning is a process that allows for an easy and secure addition of devices to a Zigbee network. During this procedure:
  • Initiator – The initiating node, known as the initiator, scans for other nodes that support the Touchlink feature.
  • Target – Upon discovering a target node, the initiator either forms a new network with the target (if it is not part of a network) or adds the target to its existing network (if it is already connected to one).

Network Steering

Network steering facilitates the joining of new devices to an existing network and is divided into two distinct scenarios:
  • Node 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.
  • 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. On a final note, if a Trust Center is present in the network, the node, then, exchanges its preconfigured link key for one generated by the Trust Center.

Network Formation

Network formation is the initial step in setting up the network’s structure and security:
  • Zigbee coordinator node – This node creates a centralized security network and activates its Trust Center functionality.
  • Zigbee router node – A router node establishes a distributed security network that does not rely on a centralized Trust Center.

Finding and Binding (F&B)

Finding and binding are processes that enable devices to discover each other’s capabilities and create direct links for communication:

  • Initiator endpoint – In this procedure, the initiator endpoint first searches to identify target endpoints. Upon finding one, the initiator requests the target’s simple descriptor. The initiator, then, looks for matching clusters between itself and the target endpoint. For each match, the initiator creates a corresponding entry in its binding table. If a group binding is necessary, the initiator configures the group membership for the target endpoint.
  • Target endpoint – In this procedure, the target endpoint identifies itself for a finite duration, then handles subsequent finding and binding requests from an initiator endpoint.