Revision as of 09:45, 13 December 2021 by Registered User (Copied from Zigbee Overview, revision 17359)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

1. Introduction

ZigBee is an IEEE 802.15.4-based communication protocol used to create wireless personal area (WPAN) networks. The aim is to provide a simple networking layer and standard application profiles that can be used to create interoperable solutions, with low-power and low-bandwidth constraints.

ZigBee is used in many application areas:

  • Home automation
  • Industrial control systems
  • Building automation
  • Medical data collection & monitoring
  • HVAC control
  • Wireless sensor networks

The data throughput is 250 kbps in 2.4 GHz band and the typical range is 10-20 meters.

2. ZigBee network

2.1. Topology

ZigBee supports 3 types of network topologies as shown on the figure.

ZigBee network topologies

2.2. Type of devices

In ZigBee, there are 3 logical device types:

  • Coordinator (ZC): This is the first node to be started. The coordinator is responsible for forming the network by allowing other nodes to join the network through it. The coordinator is responsible for starting the network and for choosing certain key network parameters. Once the network is established, the coordinator has a routing role. In a centralized network, every ZigBee mesh network must have one and only one coordinator.
  • Router (ZR): This is a node with a routing capability which is also able to send and receive data. It also allows other nodes to join the network through it. A ZigBee mesh network can have multiple routers.
  • End Device (ZED): This is a node which is only capable of sending and receiving data. It has no routing capability. A ZigBee mesh network can have multiple end devices. End device can also be sleepy end device (SED) allowing very low power consumption.

The figure below gives an overview of a ZigBee Mesh network with the different device types.

ZigBee mesh network example with device roles

2.3. Type of network

To satisfy a wide range of applications and to ensure the optimal balance of security, ZigBee offers two types of networks: distributed and centralized.

  • In a distributed network, there are no coordinator. In this configuration, any router can issue network security keys. As more routers and end devices join the network, a router that is already on the network securely sends the network key. All devices on the network use the same network key to encrypt messages.
  • In a centralized network, there is an entity named Trust Center (TC), which is typically the coordinator. The TC forms a centralized network and allows routers and end devices to join the network if they have proper credentials. In a centralized network, only the TC can issue encryption keys. The TC also establishes a unique TC Link Key for each device on the network as they join and link keys for each pair of devices as requested.

For obvious reasons, the centralized network is much more secure than the distributed one. Most of the ZigBee examples provided inside the STM32WB firmware package are using a centralized network.

3. Architecture

As described before, ZigBee is built on top of the IEEE 802.15.4 standard. ZigBee provides routing and multi-hop functions to the packet-based radio protocol. It is built on top of two layers specified by 802.15.4: the physical (PHY) and MAC layers. The figure describes the main components of a ZigBee stack and its articulation with IEEE 802.15.4 and general application layer.

ZigBee stack overview

4. ZigBee Profiles

4.1. ZigBee Application Profiles

A profile is a message-handling agreement between applications on different devices. It describes the logical components and their interfaces. The aim of profiles is to provide interoperability between different manufacturers. There are 3 types of profiles:

  • public (standard), managed by the ZigBee Alliance.
  • private, defined by ZigBee vendors for restricted use.
  • published, this concerns previously private profiles that became published ones the owner profile decided to publish it.

All profiles must have a unique profile identifier.

A profile uses a defined language for data exchange and a defined set of processing actions. Indeed, an application profile will specify the following:

  • set of devices required in the application area
  • functional description for each device
  • set of clusters to implement the functionality
  • which clusters are required by which devices

Each information that can be transferred between devices is called an attribute. Attributes are grouped into clusters. All clusters and attributes are given unique identifiers. There are input cluster identifiers and output cluster identifiers. It is linked to client/server cluster architecture.

4.2. ZigBee Device Profiles

The ZigBee Device Profile is a collection of device descriptions and clusters run directly by the ZDO. It applies to all ZigBee devices. The ZigBee Device Profile is a template that show of how to write an application profile. It is defined in the ZigBee Application Level Specification.

5. Acronyms and definitions

Term Definition
API Application Programming Interface
APS Application support sub-layer
BDB Base device behavior
HAL Hardware Abstraction Layer
IPCC Inter-Processor Communication Controller IP
MAC Media Access Control
PAN Personal Area Network
SED Sleepy end device
ZCL ZigBee Cluster Library
ZDO ZigBee Device Object