2.1 Software Stack Architecture

The Base Device Behaviour (BDB) layer, positioned at the top of the core stack, offers APIs for initialization, commissioning and operation, which are readily accessible to the application. It also provides generic APIs for accessing and configuring the BDB information base parameters.

The Zigbee Device Object (ZDO) layer delivers a comprehensive set of APIs that support core network management functions such as starting, resetting, forming and joining networks. The BDB layer utilizes these functions. ZDO also defines Zigbee Device Profile (ZDP) types, manages device and service discovery, implements binding commands and provides APIs for unicast, multicast and broadcast data transmission and acknowledgments. In addition, the ZDO issues notifications and indications of various network events to the application.

The Zigbee Cluster Library (ZCL) includes APIs for sending and receiving a variety of cluster-specific and generic commands, such as ON, OFF, read attribute and write attribute, to interact with cluster attributes on Zigbee 3.0 application devices.

Several system resources, including the task manager, Configuration Server (CS and hardware abstraction) are utilized by the stack layers. The task manager, a proprietary scheduler within the BitCloud® stack, employs a priority queue-based algorithm optimized for the multi-layer stack environment and the requirements of time-critical network protocols. BitCloud operates as a Real-Time Operating System (RTOS) task, with the application running as another task within the system. The subsequent sections provide more details on integrating the BitCloud with FreeRTOS.

The HAL offers APIs for using a software timer based on the microcontroller’s hardware timer resources and for utilizing the hardware Advanced Encryption Standard (AES) engine for encryption and decryption. The BitCloud security module employs these AES APIs for network and Application Support Sublayer (APS) level security.

The CS, a component of the stack, stores key stack configuration parameters and enables users to modify them without recompiling the core stack layers. This allows users to easily configure the stack and specify key parameters, such as channel, table sizes, network depth, number of children and sleep period, without managing multiple versions of the stack libraries.

Figure 2-1. Zigbee Software Stack Architecture