The tree-based routing mechanism includes configuring a tree-based address and a tree-based address route.
When the Coordinator establishes a new network, it will allocate the network address 0 and the network depth d = 0 to itself. The network depth indicates the minimum number of hops transmitted from one transmission frame to the ZigBee coordinator in a parent-child relationship network. If "node A" is added to the network and connected to the coordinator, the network depth of "node A" is 1, and "Node B" is added to the network and connected to "node, the network depth of "Node B" is 2, and so on.
In a tree cluster network, the coordinator and router can connect N route nodes and terminal nodes as their own subnodes to form a "cluster ". But is the number of subnodes that the Coordinator and the router can connect unlimited?
In the protocol stack, the following parameters affect the network topology:
Cm (nwkMaxChildren): Total number of child nodes that each parent node can connect;
Rm (nwkMaxRouters): In Cm, it can be the number of Route nodes, Rm <= Cm;
Lm: maximum network depth. The depth of the Coordinator is 0.
The values of these three parameters are determined by the CskipChldrn, CskipRtrs, and MAX_NODE_DEPTH variables in Z-stack. These three variables can be found in the nwk_globals.c and nwk_globals.h files in NWK.
Address Allocation:
Each node is assigned 16 bits when it joins the network.
(To be continued)