ZigBee Stack Software
This chapter introduces the NXP ZigBee 3.0 stack software.
Software overview
The NXP ZigBee 3.0 software provides all components of the ZigBee stack detailed in Section 2.7, Detailed architecture. In addition, it includes the JN51xx Core Utilities (JCU). The basic architecture of this software, in relation to the wireless network application, is illustrated in the figure below.
Overview of NXP ZigBee software architecture
The NXP ZigBee 3.0 software includes Application Programming Interfaces (APIs) to facilitate simplified application development for wireless networks. These APIs consist of C functions that can be incorporated directly in application code.
Two general categories of API are supplied:
ZigBee PRO APIs - see ZigBee PRO APIs
JCU APIs - see JCU APIs
The above figure also shows the Integrated Peripherals API that can be used to interact with the on-chip hardware peripherals of the device. This API is described in the MCUXpresso SDK API Reference Manual ((MCUXSDKJN5189APIRM or MCUXSDKK32W041APIRM).
In addition, the ZigBee Cluster Library (ZCL) provides APIs for the individual clusters, as well as more general ZCL functions. The ZCL is located within the stack block.
All the above APIs are supplied in the ZigBee 3.0 Software Developer’s Kit (SDK). For more details on the SDK, refer to Section 5.1, Development environment and resources).
ZigBee PRO APIs
The ZigBee PRO APIs are concerned with network-specific operations and easy interaction with the ZigBee PRO stack from the application code. These C-function APIs are supplied in the ZigBee 3.0 SDK (see Section 5.1, Development environment and resources).
There are three ZigBee PRO APIs:
ZigBee Device Objects (ZDO) API: Concerned with the management of the local device (for example, introducing the device into a network)
ZigBee Device Profile (ZDP) API: Concerned with the management of remote devices (for example, device discovery, service discovery, binding)
Application Framework (AF) API: Concerned with creating data frames for transmission and modifying device descriptors
The locations of these APIs, as well as the JCU and ZCL APIs, are illustrated in the figure below.
Locations of ZigBee 3.0 APIs
Note: The C functions of all the ZigBee PRO APIs are fully detailed in Part II: Reference Information of this manual.
Parent topic:Software overview
JCU APIs
The Core Utilities (JCU) provide an easy-to-use interface to simplify the programming of a range of non-network-specific operations. These utilities/modules each have a C function API, which allows a module to be used from a user application. The JCU is supplied in the ZigBee 3.0 SDK.
The JCU modules are outlined below:
Non-Volatile Memory Manager (NVM): This module handles the storage of context and application data in Non-Volatile Memory (NVM), and the retrieval of this data. It provides a mechanism by which the device can resume operation without loss of continuity following a power loss.
Low-Power: This module manages the transitions of the device into and out of low-power modes, such as sleep mode.
Protocol Data Unit Manager (PDUM): This module is concerned with managing memory, as well as inserting data into messages to be transmitted and extracting data from messages that have been received.
Note: The JCU modules are fully described in the DK6 Core Utilities User Guide (JNUG3133).
Parent topic:Software overview
Parent topic:ZigBee Stack Software
Summary of API functionality
This section summarizes the roles of the NXP ZigBee PRO and JCU APIs in an application. The table below indicates the APIs needed for the different functionality that might be required in your code:
Use of ZigBee PRO and JCU APIs
Functionality |
ZigBee PRO APIs |
JCU APIs |
---|---|---|
Essential functionality, including network formation and management |
ZDO API: Network formation and local network management ZDP API: Network discovery and remote network management |
- |
Basic data transfer |
AF API: Sending and receiving data messages |
PDUM API: Assembling and disassembling data messages |
Binding endpoints for data transfers between them |
ZDO API: Basic binding ZDP API: Manipulation of remote Binding tables |
- |
Low-power modes (Sleep and Doze) |
- |
Low-Power API: Managing low-power modes |
Preserving context data (for example, for resuming operation after sleep without memory held) |
- |
NVM API: Saving and restoring context data |
Network security |
ZDO API: Managing security |
- |
Important points to note:
ZigBee PRO API function names are prefixed with ‘ZPS’ (for ‘ZigBee PRO Stack’ function). The function names also incorporate ‘Apl’ (for ‘Application’ function) and the acronym for the API to which the function belongs:
ZDO function names include ‘Zdo’ (for example, ZPS_eAplZdoPoll()).
ZDP function names include ‘Zdp’ (for example, eAplZdpActiveEpRequest()).
AF function names include ‘Af’ (for example, ZPS_eAplAfUnicastDataReq()).
JCU API function names are prefixed with the acronym for the JCU module to which the function belongs:
‘NVM’ for NVM functions.
‘PWR’ for Low-Power functions.
‘PDUM’ for PDUM functions.
A similar naming convention is used in structures and enumerations.
Parent topic:ZigBee Stack Software