7 B] Explain the protocol stack of Zigbee and describe the Zigbee network layer.
• The Zigbee radio communication is designed for enabling wireless personal area networks (WPANs).
• It uses the IEEE 802.15.4 standard for defining its physical and medium access control (layers 1 and 2 of the OSI stack). The PHY and MAC layers in this communication are designed to handle multiple low data rate operating devices.
• The frequencies of 2.4 GHz, 902–928 MHz or 868 MHz are commonly associated with Zigbee WPAN operations.
• Zigbee finds common usage in sensor and control networks. It was designed for low powered mesh networks at low cost, which can be broadly implemented for controlling and monitoring applications, typically in the range of 10–100 meters.
• Zigbee supports various network configurations such as master-to-master communication or master-to-slave communication. Several network topologies are supported in Zigbee, namely the star (Figure 4.4(a)), mesh (Figure 4.4(b)), and cluster tree (Figure 4.4(c)). Any of the supported topologies may consist of a single or multiple coordinators.
In star topology, a coordinator initiates and manages the other devices in the Zigbee network. The other devices which communicate with the coordinator are called end devices. As the star topology is easy to maintain and deploy, it finds widespread usage in applications where a single central controller manages multiple devices.
A network can be significantly extended in the Zigbee mesh and tree topologies by using multiple routers where the root of the topology is the coordinator. These configurations allow any Zigbee device or node to communicate with any other adjacent node. In case of the failure of one or more nodes, the information is automatically forwarded to other devices through other functional devices.
In a Zigbee cluster tree network, a coordinator is placed in the leaf node position of the cluster, which is, in turn, connected to a parent coordinator who initiates the entire network.

• A typical Zigbee network structure can consist of three different device types, namely the Zigbee coordinator, router, and end device, as shown in Figure 4.4. Every Zigbee network has a minimum of one coordinator device type who acts as the root; it also functions as the network bridge. The coordinator performs data handling and storing operations. The Zigbee routers play the role of intermediate nodes that connect two or more Zigbee devices, which may be of the same or different types. Finally, the end devices have restricted functionality; communication is limited to the parent nodes.
• Zigbee handles two-way data transfer using two operational modes: 1) Non beacon mode and 2) beacon mode. As the coordinators and routers monitor the active state of the received data continuously in the non-beacon mode, it is more power intensive. In this mode, there is no provision for the routers and coordinators to sleep. In contrast, a beacon mode allows the coordinators and routers to launch into a very low-power sleep state in the absence of data communication from end devices.
Zigbee coordinator is designed to periodically wake up and transmit beacons to the available routers in the network. These beacon networks are used when there is a need for lower duty cycles and more extended battery power consumption.
The PHY and MAC layers of the IEEE 802.15.4 standard are used to build the protocol for Zigbee architecture; the protocol is then accentuated by network and application layers designed especially for Zigbee. Figure 4.5 shows the Zigbee protocol stack. The various layer of the Zigbee stack are as follows.

Physical Layer: This layer is tasked with transmitting and receiving signals, and Performing modulation and demodulation operations on them, respectively. The Zigbee physical layer consists of 3 bands made up of 27 channels: the 2.4 GHz band has 16 channels at 250 kbps the 868.3 MHz has one channel at 20 kbps; and the 902-928 MHz has ten channels at 40 kbps.
MAC Layer: This layer ensures channel access and reliability of data transmission. CSMA CA is used for channel access and intra-channel interference avoidance. This layer handles communication synchronization using beacon frames.
Network Layer: This layer handles operations such as setting up the network, connecting and disconnecting the devices, configuring the devices, and routing. Application Support Sub-Layer: This layer handles the interfacing services, control services, bridge between network and other layers, and enables the necessary services to interface with the lower layers. This layer is primarily tasked with data management services and is responsible for service-based device matching.
Application Framework: Two types of data services are provided by the application framework: provision of a key-value pair and generation of generic messages. A key-value pair is used for getting attributes within the application objects, whereas a generic message is a developer-defined structure.