Mastering IOT
上QQ阅读APP看书,第一时间看更新

Zigbee overview

Zigbee is based on 802.15.4 but layers on network services similar to TCP/IP. It can form networks, discover devices, provide security, and manage the network. It does not provide data transport services or an application execution environment. Because it is essentially a mesh network, it is self-healing and ad hoc in form. Additionally, Zigbee prides itself on simplicity and claims a 50% reduction in software support by using a lightweight protocol stack. 

There are three principal components in a Zigbee network. 

  • Zigbee controller (ZC): Highly capable device on a Zigbee network that is used to form and initiate network functions. Each Zigbee network will have a single ZC that fulfills the role of an 802.15.4 2003 PAN coordinator (FFD). After the network is formed, the ZC can behave as a ZR (Zigbee router). It can assign logical network addresses and permit nodes to join or leave the mesh. 
  • Zigbee router (ZR): This component is optional but handles some of a load of mesh network hopping and routing coordination. It too can fulfill the role of an FFD and has an association with the ZC. A ZR participates in multi-hop routing of messages and can assign logical network addresses and permit nodes to join or leave the mesh. 
  • Zigbee end device (ZED): This is usually a simple endpoint device such as a light switch or thermostat. It contains enough functionality to communicate with the coordinator. It has no routing logic; therefore, any messages arriving at a ZED that are not targeted to that end device are simply relayed. It also can not perform associations (detailed later).

Zigbee targets three different types of data traffic. Periodic data is delivered or transmitted at a rate defined by the applications (for example, sensors periodically transmitting). Intermittent data occurs when an application or external stimulus occurs at a random rate. A good example of intermittent data suitable for Zigbee is a light switch. The final traffic type Zigbee serves is repetitive low latency data. Zigbee allocates time slots for transmission and can have very low latency, which is suitable for a computer mouse or keyboard. 

Zigbee supports three basic topologies:

  • Star network: A single ZC with one or more ZEDs. Only extends two hops and is therefore limited in node distance. It also requires a reliable link with a single point of failure at the ZC. 
  • Cluster tree: A multi-hop network that employs beaconing and extends the network coverage and range over a star network. ZC and ZR nodes can have children, but ZEDs remain true endpoints. Child nodes only communicate with their parent (like a small star network). Parents can communicate downstream to its children or upstream to its parent. The problem still exists with a single point of failure at the center.
  • Mesh network: Dynamic path formation and morphing. Routing can occur from any source device to any destination device. Uses tree and table-driven routing algorithms. ZC and ZR radios must be powered at all times to perform routing duties, consuming battery life. Additionally, calculating the latency in a mesh network can be difficult if not non-deterministic. Some rules are relaxed; however, routers within a certain range of each other can communicate directly with one another. The main advantage is the network can grow beyond the line of sight and has multiple redundant paths. 
Zigbee, in theory, can deploy up to 65,536 Zigbee End Devices ( ZED).
Three forms of Zigbee network topologies from the simplest star network, to the cluster tree, to a true mesh.