By GRL Team on October 12, 2023

Exploring Zigbee Network Topology and How to Join A Mesh Network

Granite River Labs, GRL
Stanislas Charles

Zigbee is a robust and energy efficient wireless communication platform with a versatile network topology that allows devices to easily join, making it suitable for home automation, industrial control systems, and a wide variety of other applications. To gain a better understanding of Zigbee network device compatibility, we’ll be taking a closer look at the various roles of Zigbee’s network topology as well as the process through which devices join Zigbee networks.

 

Components of a Zigbee network topology

Designed for flexibility and scalability, Zigbee networks can take on different shapes and sizes depending on application needs. Roles within a Zigbee network are defined by the Connectivity Standards Alliance (CSA) as follows:

1. Coordinator (PAN Coordinator)

As the heart of the Zigbee network, there can only be one Coordinator in a single Zigbee network. The Coordinator initiates processes and is responsible for setting up parameters, security settings, and routing tables. Communication between network connected devices is also facilitated by the Coordinator.

2. Router

Routers extend network coverage area by forwarding data packets between devices. These extensions help create mesh networks, allowing connected devices to communicate via multiple routes for increased reliability and coverage. In other words, routers help to maintain network stability and resilience by acting as intermediaries for data transmission.

3. End Device

End devices are typically battery-operated, and are therefore resource constrained and consume minimal power. They don’t often play major roles outside of sending and receiving data, relying on Routers or the Coordinator for routing and network management tasks instead.

Zigbee network topology component diagram

Figure 1: Zigbee network topology

 

Joining a Zigbee Network: The packet exchange

The following process involving packet exchange is kickstarted whenever a new device wishes to join an existing Zigbee network:

Step 1: Device Discovery

  • Channel Scanning: The process begins with the new device scanning multiple Zigbee channels (frequencies) to discover nearby Zigbee networks. Zigbee operates on multiple channels in the 2.4 GHz ISM (Industrial, Scientific, and Medical) band, and the new device must determine which channel the target Zigbee network is operating on.
  • Beacon Frame Reception: The device listens for beacon frames transmitted by Coordinator devices. These beacon frames contain critical information, including the PAN ID (Personal Area Network Identifier), the channel number, and the Extended PAN ID. The Extended PAN ID uniquely identifies the Zigbee network.
  • Selecting a Network: Once the device receives beacon frames from different networks, it selects the one with the PAN ID and Extended PAN ID that matches its criteria. This selection is based on factors like network availability and security settings.

Step 2: Association Request

  • Device Initialization: After selecting a target Zigbee network, the new device initializes its association process by creating an Association Request packet.
  • Association Request Packet Contents: The Association Request packet includes essential information such as:
    • The device's 64-bit IEEE address, which uniquely identifies it.
    • The device's capabilities, specifying its role within the network (End Device or Router).
    • Requesting device's desired PAN ID, if applicable.
    • Desired channel to operate on, if different from the currently selected channel.
  • Transmission: The new device sends the Association Request packet to the Coordinator of the target Zigbee network.

Step 3: Coordinator Response

  • Processing the Association Request: Upon receiving the Association Request packet, the Coordinator processes it to determine whether to accept or reject the device's request to join the network.
  • Association Response Packet: If the Coordinator accepts the request, it creates an Association Response packet containing crucial details:
    • A 16-bit short address assigned to the joining device. This short address is used for addressing within the network.
    • A status code indicating the outcome of the association request (successful or unsuccessful).
    • Network security settings and keys (if security is enabled).
  • Transmission: The Coordinator sends the Association Response packet back to the new device.

Step 4: Network Integration

  • Device Initialization: Upon receiving the Association Response packet, the joining device initializes itself to become part of the Zigbee network officially.
  • Short Address Assignment: The device uses the assigned short address for future communication within the network. This short address is essential for routing and addressing purposes.
    Role Assignment: Depending on its capabilities, the device takes on the role of either an End Device or a
  • Router within the network. End Devices are typically resource-constrained and rely on Routers for routing, while Routers assist in data routing and extend network coverage.

Step 5: Updating Routing Tables

  • Routing Table Updates: In the case of a Router joining the network, the Coordinator and existing Routers update their routing tables.
  • Mesh Network Establishment: Zigbee networks often employ mesh topology, which means that devices can communicate via multiple routes, increasing reliability. The updated routing tables ensure that data can be routed efficiently through the network.

Step 6: Security Establishment

  • Key Exchange: Security is a paramount concern in Zigbee networks. After joining the network, devices establish secure communication channels using cryptographic keys. These keys are essential for encrypting and decrypting data.
  • Trust Center Role: The Trust Center, often the Coordinator, plays a crucial role in key management. It oversees the exchange of encryption keys and ensures that only authorized devices can access the network.
  • Security Measures: Security mechanisms include the exchange of pre-shared keys, security certificates, or other authentication methods to secure communication within the network, making it resistant to eavesdropping and unauthorized access.

Zigbee device joining network process diagram

zigbee arrow

Figure 2: Diagram of a Zigbee 3.0 network allowing a device to join

1: network layer

2: application support sublayer

 

Zigbee's network topology is both versatile and adaptable, making it suitable for a wide array of applications. The roles of Coordinator, Router, and End Device contribute to the network's stability and scalability. When a new device wishes to join a Zigbee network, it undergoes a carefully orchestrated packet exchange process, enabling seamless integration into the existing network. This ensures that Zigbee networks are not only reliable but also secure, making them an ideal choice for IoT and home automation applications.

 

About the author

Stanislas Charles
With more than 7 years of experience in wireless and RF testing, Charles is familiar with various protocols: Bluetooth, Zigbee, Thread, Matter. He is always willing to help customers to clarify doubts and questions about Matter and Thread testing requirements. 

Published by GRL Team October 12, 2023