Wireless solutions part 4: ZigBee
In October 2002, the ZigBee Alliance was formed to create global standards to connect the widest range of devices into secure, low-cost, low-power and easy-to-use wireless sensor and control networks. Its underlying 802.15.4 specification was ratified by the IEEE in 2003, and the first ZigBee-based products launched in 2006.
In the 15 years since then, ZigBee has found applications in the smart home (lighting, closures, HVAC), commercial buildings (offices, workers, conference-goers, hotel chains), manufacturing (industrial, factory), smart cities (municipalities large and small, civic services, emergency services), larger grid-based operations and intermodal transportation.
ZigBee in IoT edge applications
Although its inception predates the rise of the IoT, the standard’s properties make it ideal for IoT applications, specifically connectivity between edge sensors, actuators, and gateways. Its current revision level, introduced in early 2016 and known as ZigBee 3.0 or just ZigBee, is aimed directly at IoT applications. It allows product designers and eco-system owners to implement robust networks and choose the right balance of security policies and ease of deployment.
Part of ZigBee’s suitability for IoT applications arises because it is an open standard . Single products can be deployed globally, giving consumers a choice. Product competition is fostered as manufacturers compete on innovation, quality and choice. Multiple sources for building interoperable ecosystems exist, without vendor lock-in to particular silicon manufacturers.
Compatibility is also promoted because ZigBee 3.0 brings together all the various ZigBee environments into a single unified standard . Over the years, ZigBee has encompassed applications from industrial and business to home use, which has led to the development of separate strands to the service. ZigBee 3.0 pulls these various applications under the same umbrella. This eliminates the need for a bridge device mediating between different sets of ZigBee-enabled devices – they will all be able to communicate directly, regardless of type.
The network also meets IoT edge requirements well at a technical level. ZigBee is easy to install and maintain as it is based on a self-organising, self-healing mesh. Its mesh topology, along with multiple channels and demonstrated interference tolerance, also make it reliable. It is low-cost and scalable to thousands of nodes, with many suppliers on an open standard.
With a maximum data rate of 250 kbps at 2.4 GHz, it’s slower than other popular wireless standards such as Wi-Fi and Bluetooth, but this is irrelevant in typical edge sensor applications. ZigBee is designed to carry small packets of data at relatively infrequent intervals, which is quite sufficient for collecting data from temperature probes, security sensors, air quality monitors or similar types of sensor. Meanwhile, the low data rate contributes to low power operation, so ZigBee nodes can typically operate for many years from a single AAA battery. See Fig. 2 shows how ZigBee power consumption compares with that of Wi-Fi.
Being low power, ZigBee products tend to have a short transmission range of typically 10 – 15 metres, with a signal that’s easily affected by obstructions and environmental variances. However, the beauty of ZigBee devices is their operation as part of a mesh network, using each other to relay signals over a distance. The mesh topology also means that a single device malfunction won’t cause a network failure, as signals can be re-routed.
ZigBee 3.0 also reflects considerable development in security measures, through use of 128-bit AES‐CCM for message encryption, authentication and integrity and other security algorithms. The standard provides several technology and security solutions to meet a broad set of market requirements. Some of these technologies have been proven in ZigBee Smart Energy, a well-established standard for advanced metering infrastructure (AMI) around the world. This has seen hundreds of millions of revenue-grade utility meters installed word-wide with no known security breaches.
ZigBee for large-scale applications
In June this year, the ZigBee Alliance announced the availability of ZigBee PRO 2017 . ZigBee PRO is the underlying network technology that supports full-stack interoperable devices certified under ZigBee 3.0.
With PRO 2017, ZigBee is the first mesh network capable of operating in two ISM frequency bands simultaneously: sub-GHz 800-900 MHz for regional requirements and 2.4 GHz for global acceptance. This dual-band option enables flexibility and design choice for manufacturers, municipalities and consumers wanting to connect products across buildings, cities and homes.
“PRO 2017 is the ideal wireless solution to cast large IoT networks across buildings, business parks, large facilities, cities and venues challenged by connectivity issues such as reinforced concrete and steel studs,” said Victor Berrios, vice president of technology, ZigBee Alliance. “The deployment potential is tremendous for smart homes, smart buildings and smart cities.”
ZigBee PRO 2017 allows product manufacturers to build devices that utilize a single network operating on multiple bands to address the challenges of surrounding physical environments. The inclusion of sub-GHz capabilities supports IoT networks for multiple use cases, including smart outdoor lighting, monitoring broad ambient conditions in facilities such as retail and data centres, and deployment across harsh environments. The ZigBee PRO 2017 network specification provides key advantages including longer range, reduced power consumption and lower operating costs for low-data-rate applications ranging from home security and automation to smart metering and connected lighting.
A closer look – ZigBee 3.0’s building blocks
So far we have looked at the benefits offered by ZigBee to developers and users, and why it provides a good solution for IoT sensor connectivity. Now, we will focus on the technology that drives ZigBee – the software architecture stack, base device, commissioning, devices and application clusters. We’ll also be reviewing the steps taken by the ZigBee 3.0 revision to deliver robust, up to date security. This information is based on the NXP ZigBee 3.0 Devices User Guide.
Device types: The nodes of a ZigBee wireless network are based on device types defined by the ZigBee Alliance; these are software entities that determine a node’s functionality. They have previously been collected together in market-specific application profiles such as Home Automation, however ZigBee 3.0 allows devices from different market sectors to exist in the same network.
A device type defines a collection of clusters, which are basic building blocks that make up its functionality. Some clusters are mandatory while others are optional. For example, the Thermostat Device uses the Basic and Temperature Measurement clusters, and can also use a further one or more optional clusters.
A device is an instance of a device type. A network node can support more than one device type. The application for device type runs on a software entity called an endpoint, and each node can have up to 240 endpoints, numbered from 1.
Device types are classified as:
- ZigBee Green Power Device - energy harvesting or life-long batteries
- ZigBee End Device – Sleepy, battery powered
- ZigBee Router – Mains-powered
- ZigBee Trust Center – A router dedicated to managing security credentials and performing other network management tasks in a centralised manner
In addition, every ZigBee 3.0 node must employ the following devices:
- ZigBee Base Device (ZBD): This is a standard device type which handles fundamental operations such as commissioning; it does not need an endpoint.
- ZigBee Device Objects (ZDO): This represents the ZigBee node type (Co-ordinator, Router or End Device) and has a number of communication roles. This device occupies Endpoint 0.
The basic ZigBee 3.0 software architecture is shown in Fig.3 below, which illustrates the ZigBee devices’ locations.
The ZigBee Cluster Library (ZCL) for ZigBee 3.0 is defined by NXP as a container for standard clusters, as specified by the ZigBee Alliance, for use in ZigBee 3.0 applications over a diverse range of market sectors. Each cluster corresponds to a specific functionality, through a set of attributes and/or commands. Clusters can be selected from the ZCL to give an application its required set of capabilities.
The ZCL also provides a common means for applications to communicate. It defines a header and a payload that sit inside the Protocol Data Unit (PDU) used for messages. It also defines integer, string and other attribute types, common commands (e.g. for reading attributes) and default responses for indicating success or failure. Client/server cluster instances are interoperable ‘right out of the box’.
Examples include On/Off, level control, colour control, groups, scenes, window covering, occupancy sensing, thermostats and many others.
The basic operations in a ZigBee 3.0 network are concerned with reading and setting the attribute values of the clusters of a device. In each device, attribute values are exchanged between the application and the ZCL by means of a shared structure.
Network commissioning covers the following areas:
- Creating a network
- Allowing devices to join a network
- Joining a network
- Binding a local endpoint to an endpoint on a remote node
- Adding a remote node to a group
The commissioning activities that can be performed by a single node depend on the ZigBee node type – Co-ordinator, router or End Device, and the commissioning modes that are enabled for the node. A number of different commissioning modes are available through the ZigBee base device. These are summarised in Fig.4 below, along with the commissioning activities that they support.
Touchlink commissioning can be used to form a new network and/or join a node to an existing network. Touchlink is initiated on a node called the ‘initiator’ which will either be a member of an existing network or, if not, will create a new network. In both cases, the initiator will join a second node to the network, called the ‘target’ node. Touchlink is provided as a cluster in the ZCL.
Network steering can be used to join the local node to an existing network or allow other nodes to join a network via the local node. The path taken depends on whether the local node is already a member of a network.
- A node already in a network opens the network for other nodes to join for a fixed time period by broadcasting a Management Permit Joining Request, lasting for 180 seconds by default.
- When the node is not in a network, and is a Router or End Device, it searches for a suitable network to join, and attempts to join it if successful.
Network formation allows a new network to be created by a Co-ordinator or Router. A Co-ordinator will form a centralised security network and activate its Trust Center functionality, while a Router will form a distributed security network.
The Finding and Binding mode allows a node in the network to be paired with another network node – for example a new lamp may need to be paired with a controller device, to allow control of the lamp. This commissioning mode is intended to bind an endpoint on a new node to a compatible endpoint on a remote node in the network, depending on the supported clusters. Alternatively, the new node may be added to a group of nodes that are collectively controlled.
In Finding and Binding, a node can have one of two roles:
- Initiator: This mode can either create a (local) binding with a remote endpoint or request that the remote endpoint is added to a group
- Target: This node identifies itself, and receives and responds to requests from the initiator
The intended outcome is a pairing between the initiator and the target. Usually, the initiator is a controller device. The path followed by the Finding and Binding process depends on whether the local endpoint is an initiator or target.
ZigBee’s security strategy
ZigBee 3.0 introduces an advanced toolbox that allows designers to implement robust networks with the right balance of security policies and ease of deployment. Offerings will be continually updated to stay ahead of emerging threats.
The security solution is based on the ZigBee PRO mesh-networking protocol, which was originally developed for ZigBee Smart Energy. It is used by hundreds of millions of revenue-grade utility meters worldwide with no known security breaches.
Updated features include:
- Device-unique authentication at joining
- Runtime key updates during operation
- Secure over-the-air (OTA) firmware upgrades
- Logical link-based encryption
Security models: to satisfy a wide range of applications and to ensure the optimal balance of security, ease of use, cost and battery life, ZigBee offers two network architectures and corresponding security models; distributed and centralised. These differ in how they address the basic requirements of IoT networks; admitting new devices into the network and protecting messages on the network
- For easier to configure systems, a distributed security model comprises two device types; routers and end devices. If a ZigBee router does not detect an existing network when it powers up, it can form a distributed security network. In a distributed network, any router can issue network security keys.
- For higher security, centralised systems include a third device type; the Trust Center (TC), which is typically also the Network Co-ordinator. The TC forms a centralised network and allows routers and end devices to join the network if they have proper credentials. In a centralised network, only the TC can issue encryption keys.
ZigBee product examples
Below are some examples of products supplied by Farnell that reduce time and effort for ZigBee system developers.
XBee ZigBee Mesh Development Kit provides a hands-on way to learn how to use XBee RF modules for device connectivity and mesh networking. This is a powerful way to route data; range is extended by allowing data to hop from node to node, and reliability is increased by ‘self-healing, the ability to create alternative paths when a node fails, or a connection is lost.
The kit is based on the Silicon Labs EM357 SoC transceiver chipset, RF 250Kbps, with a serial data rate of up to 1 Mbps.
IoT sensor communications: The SIP-KITNXB001 from Samsung Artik is an ARTIK 520 BLE WIFI ZIGBEE thread kit, designed to facilitate development of products for the IoT. It is based on Samsung's ARTIK™ 520 Module; a highly-integrated System-in-Module that utilizes a dual core ARM® Cortex®-A7 processor with packaged DRAM and Flash memories, a secure element and a wide range of wireless communication options such as 802.11a/b/g/n/ac, Bluetooth® 4.1, Bluetooth Low Energy (BLE) and 802.15.4/ZigBee® communications all within a 30 x 25mm footprint. It is used in IoT sensors and end devices for commercial and retail, health and wellness, industrial, home and building automation, smart phone, tablet and PC applications.
ZigBee occupancy Sensor Design Kit: The RD-0078-0201 from Silicon Labs is a ZigBee occupancy sensor reference design kit. It features an ultra-low power design encompassing both hardware and software, and yields an estimated battery life of more than 5 years. It also features the Silicon Labs ZigBee stack, so it is proven to scale with the most demanding building automation systems. The software is implemented on an ARM Cortex-M4, Mighty Gecko SoC providing an upgrade path for dual protocol or an entirely different protocol. The kit is based on the ZigBee HA 1.2 standard, which focuses on sensors that can be used for occupancy and motion sensing.
RF Module, IEEE802.15.4, High Power, U.Fl Connector: The JN5168-001-Myy family is a range of ultra-low power, high performance surface mount modules targeted at IEEE 802.15.4, JenNet-IP, ZigBee Light Link, ZigBee Smart Energy and RF4CE networking applications, enabling users to realize products with minimum time to market and at the lowest cost.
These modules facilitate robust and secure low power wireless solutions on ZigBee or JenNet-IP networks for home and commercial building automation, utilities metering, asset tracking, toys and gaming peripherals, industrial systems, telemetry and remote control applications.
SMARTRF06EBK - Evaluation Board, IEEE 802.15.4, ZigBee, SmartRF06EB, CC2538: The SMARTRF06EBK is a SmartRF06 Evaluation Board Kit intended to be used with CC2538EM for radio performance testing and software development. The board has integrated the XDS100v3 debug probe, enabling downloading and debugging of software running on the CC2538 device. The debugger is supported by the IAR embedded workbench for ARM and code composer studio (CCS). Other IDEs and debugger agents will also be supported.
XKB2-A2T-WWC - Development Kit, Wireless Connectivity Kit, 2x XBee 802.15.4, 3x XBee ZigBee: The XKB2-A2T-WWC from Digi International is a wireless connectivity kit with XBee S2C 802.15.4 modules. It provides hands-on tuition in using XBee® RF modules for device connectivity and sensor networking in fast point-to-multipoint or peer-to-peer topologies.
Multiprotocol wireless mesh module: The MGM12P22F1024GA-V2 from Silicon Labs is a MGM12P Mighty Gecko multi-protocol wireless mesh module. The EFR32MG12 mesh module is a fully integrated, certified module, enabling rapid development of wireless mesh networking solutions. Based on the Silicon Labs EFR32MG12 Mighty Gecko SoC, the MGM12P combines an energy efficient, multi-protocol wireless SoC with a proven RF/antenna design and industry leading wireless software stacks.
This article has shown, through both explanation of the network standard and examples of currently-available development and production devices, that ZigBee provides robust, low-cost, low-power and secure network connectivity for devices such as IoT sensors that depend on these properties.
Designers can benefit, reducing development effort and time-to-market, not only from the development kits available but also the pool of applications expertise made accessible through the ZigBee Cluster Library.
Wireless solutions part 4: ZigBee. Date published: 15th December 2017 by Farnell element14