In addition to 3G/4G/5G, Bluetooth, WIFI, and RFID, the Zigbee protocol also supports the Internet of Things (IoT)! Now, let’s take a closer look at how many layers the Zigbee technology protocol consists of.
1. The Zigbee protocol stack is a key element in supporting IoT applications. The Zigbee protocol stack can be divided into four main layers (PHY, MAC, Network & Security, and Application). In the IoT environment, its architecture is typically described as consisting of seven different layers. These layers work together to achieve reliable and efficient wireless communication between devices; among them:
-
The PHY/MAC layer is developed and managed by the IEEE 802.15.4 WPAN group.
-
The Network & Security and Application layers are developed by the Zigbee Alliance.
2. The Seven Layers of Zigbee Protocol Stack
1. Physical Layer (PHY)
Function: The PHY layer is the foundation of wireless communication, responsible for the actual transmission and reception of raw data bits wirelessly.
Responsibilities:
-
Modulation and demodulation of signals;
-
Frequency selection—typically operating in the 2.4 GHz ISM band (but also supports other regional bands);
-
Ensuring bit-level data integrity;
-
Managing the hardware of the radio transceiver.
2. Medium Access Control (MAC) Layer
Function: The MAC layer manages access to the shared wireless medium, preventing collisions and ensuring fair communication between devices.
Responsibilities:
-
Framing and addressing data;
-
Error detection and correction;
-
Coordinating data transmission using mechanisms such as Carrier Sense Multiple Access with Collision Avoidance (CSMA/CA). This helps devices “listen” before transmitting to avoid interfering with others.
3. Network (NWK) Layer
Function: The network layer is responsible for the overall structure and maintenance of the Zigbee network.
Responsibilities:
-
Network formation and management;
-
Routing data packets between devices;
-
Network addressing;
-
Device discovery;
-
Establishing network topologies, such as star, mesh, or tree.
4. Application Support Sublayer (APS)
Function: The APS layer acts as a bridge between the network layer and the application layer, providing necessary support functions.
Responsibilities:
-
Data formatting and parsing;
-
Endpoint addressing;
-
Security functions (encryption, authentication, etc.);
-
Binding: associating devices with specific application functions.
5. Application Framework (AF)
Function: The AF provides a framework for developing and organizing application-specific functions within the Zigbee network.
Responsibilities:
-
Organizing application objects into clusters, which are collections of attributes and commands related to specific functions (e.g., lighting control or sensor monitoring);
-
Ensuring interoperability between devices by standardizing clusters for similar device types.
6. Zigbee Device Object (ZDO)
Function: The ZDO is responsible for the overall management of devices within the Zigbee network.
Responsibilities:
-
Network management tasks (e.g., device joining and leaving);
-
Device discovery;
-
Security services;
-
Defining device roles (coordinator, router, end device).
-
Initiating and configuring network operations.
7. Application Layer
Function: The application layer is where user-defined applications and profiles reside, used to define the specific behavior of Zigbee devices.
Responsibilities:
-
Hosting application logic (e.g., controlling lights, monitoring sensor data);
-
Defining specific services provided by devices;
-
Ensuring interoperability between devices from different manufacturers through standardized application profiles.