Pre-determined parents

It is possible to force a parent (Router or the Coordinator) to accept certain nodes as its (direct) children. The function zps_eAplZdoDirectJoinNetwork() can be used on this parent to register a potential child node (with specified IEEE/MAC and network addresses) by adding this node to the Neighbor table - never write to the Neighbor table directly. The parent then regards this node as an orphaned child. This function should only be called when the parent node is fully up and running - that is, the node has been started as described in Section 6.1.1 or Section 6.1.2.

When one of the designated children is started, its application should call the function zps_eAplZdoOrphanRejoinNetwork() in order to attempt to join the network as if it were a previously orphaned node. This function will start the ZigBee PRO stack and attempt to join the network whose EPID has been pre-configured on the node (using the ZPS Configuration Editor). The function will only allow the node to join a parent that already has knowledge of the node (in the parent’s Neighbor table).

Note:

  • Note 1: When zps_eAplZdoOrphanRejoinNetwork() is used, the start-up procedure described in Section 6.1.2 is not applicable to the joining node and the function zps_eAplZdoStartStack() must not be explicitly called on the node.

  • Note 2: When a node joins the network in this way, the ‘permit joining’ status on the parent is ignored.

If the node successfully joins the network (via the designated parent), the stack event zps_EVENT_NWK_NEW_NODE_HAS_JOINED is generated on the parent node and one of the following stack events is generated on the joined node:

  • zps_EVENT_NWK_JOINED_AS_ROUTER (if joined as a Router)

  • zps_EVENT_NWK_JOINED_AS_ENDDEVICE (if joined as an End Device)

These events contain the network address that the parent has allocated to the joined node.

If the join request is unsuccessful, the zps_EVENT_NWK_FAILED_TO_JOIN event is generated on the joining node.

Once the node has joined the pre-determined parent, the node is next likely to search for compatible endpoints on remote nodes with which it can communicate, as described in Section 6.2.2.

Parent topic:Forming and joining a network