Zigbee Ad hoc Network Address Allocation and Routing Protocol Description

1. ZigbeeIntroduction

Based on IEEE802.15.4, Zigbee is a lowpower consumption LAN protocol. According to the International standard, Zigbeeis a wireless communication technology featuring short distance and low powerconsumption.

Zigbee protocal is divided into PHY, MAC,TL, NWK, APL etc., in which the PHY and MAC abide by the IEEE802.15.4 standard.

The E18 series Zigbee module manufacturedby Chengdu Ebyte Electronic Technology Co.,Ltd adopts TI CC2530 ZigBee network stack Zstack 2.5.1a for ZigBee networkdevelopment.

2. ZigbeeDevice Type

 ZigBee network including:

2.1 Coordinator

The main function of coordinator is to develop and maintain network,also the authentication center of whole network.

2.2 Router

The main fuction of Router is the expansion of network. It can bedynamic routing around obstacles and provide information channels for remotenodes and certral nodes.

2.3 TerminalDevice

It’s simply a ZigBee device with receiving information andtransmitting information function only. And it only be at the end of ZigBeenetwork and just communicate to parent nodes, supporting low power consumptionfunction, without the routing and network maintenance capability.

3. ZigBeeNetwork Structure

  Itcontains star network, tree network and mesh network.

 (Note: star network and tree network are suitable for one point tomultipoint and short distance application. )

3.1 StarNetwork

ZigBee Star network topology is as below.As the simplest toopology, the star network contains one Coordinator node and aseries of End Device nodes. Each End Device node can only communicate withcoordinator node, or it need to transmit information by coordinator node tocommunicate each other.

The disadvantage of this kind of topologyis that there’s only one path for data routing between nodes, and the Coordinatormay be the bottleneck of whole network. Implementing a star network topologydoes not require the use of zigbee's network layer protocol because the IEEE802.15.4 protocol layer itself has implemented a star topology, but it needsdeveloper to handle more in the application layer, including the informationtransmission.

ZigBee star network topology

3.2 TreeNetwork

ZigBee tree network topology is as below.It contains a Coordinator and a series of Routers and End Device nodes.Coordinator connects a series of Router and End Device. The Router of childnode also can connect to a series of Router and End Device. In thus, it canrepeat multi layers.

Here is some notice:

-Coordinator and Router nodes can containtheir child node.

-End Device cannot have its’ own childnode.

-Nodes with the same father node are calledbrother node.

-Nodes with the same grandfather node arecalled cousin nodes.

-Each node can only communicate with it’sfather node or child node.

If users need to send data from one node toanother, then the information is passed up the path of the tree to the nearestancestor node and then down to the destination node.

The disadvantage of such topology is thatthe information has only one routing channel. Besides, the routing of informationis handled by the protocol stack layer. The entire routing process iscompletely transparent to the application layer.

3.3 MeshNetwork

ZigBee mesh network topology is as below.It contains one Coordinator and a series of Router and End Device. It’s similarto Tree topology, so please refer to above mentioned tree network topology.But, the mesh network topology has more flexible information routing rules. Therouting nodes can communicate with each other directly in a possible way, whichmake the transmission more efficient, also it means once any error occured inone routing path, the information can transmit via other routing pathautomatically.

Usually in the implementations ofsupporting mesh network, network layer will provide routing exploring fuctionaccordingly, which ensures the most optimized path for information transmissionin network. But it need to note that all above features are realized by networklayer, the application layer won’t be involved in.

Mesh network has strong function thatadopts ”multi-layer jumping” to communicate, form very complicated network andit’s capable of Self-organizing and self-healing function.

4. ZigBeeAddress Distribution Mechanism

In ZigBee 2007 protocal, it’s tree networkdistribution mechanism, below is the realization:

Suppose the max. value of the number ofsubdevices is nwkMaxChildren(Cm), the maximum depth of network isnwkMaxDepth(Lm), the maximum number of father node taking the routing device asits child device is nwkMaxRouters(Rm), itself network depth is (d), then we cancalculate the function Cskip(d)m as below:

If the value of device Cskip(d) is 0, thenit’s not capable of routing function, it should be terminal device.

If the value of device Cskip(d) is over 0,then it’s capable of routing function, it should be router device.

The distribution address in network asbelow(n is the numbers of current allocated nodes):

Terminal: An=Ak+1+Cskip(d)*(n-1)

Router: An=Ak+Cskip(d)*Rm*(n-1)

The next distribution address of routerdevice will be the previous assigned router address plus Cskip offset.

CurNodeInfo.NextRouterAddr+ =CurNodeInfo.Cskip;

The next assigned address of the terminaldevice is the previous known assigned address +1


5. ZigBee TreeRouting Mechanism

Suppose that a router will send data packetto target address D. The network address of router and network depth are A andD. It will first determine whether the target address device is its childdevice and should satisfy below:

A < D < A+Cskip(d-1)

If the target device is its child device,the next jump address will be:

Or, router will send the data packet to itsfather node.