Zigbee Router Generic App
- Introduction
- Software Prerequisites
- Functional Description
- Configuration With SysConfig
- Example Usage
Introduction
This document discusses briefly the template code provide for developers to create its own application with the minimum required overhead.
Hardware Prerequisites
- The Launchpad which is used by this particular project.
Software Prerequisites
Code Composer Studio™ (CCS) v9.1 or newer
Functional Description
Software Overview
This section describes the software components and the corresponding source files.
Application Files
- zcl_genericapp.c/.h: Contains the application's event loop, device initialization function calls (for timers, peripherals, Nvm, LEDs, Switches, Serial interface), Zigbee stack notifications and all application logic is expected to be defined in this module.
- zcl_genericapp_data.c: Is meant to contain the endpoint, cluster and attribute definitions for the application.
- main.c: Defines the application task and the application stack size.
- bdb_interface.h: Defines commissioning parameters to be used and configured in the application upon calling commissioning methods (see zclGenericApp_initParameters()).
Configuration With SysConfig
SysConfig is a GUI configuration tool that allows for TI driver and stack configurations.
To configure using SysConfig, import the SysConfig-enabled project into CCS. Double click the *.syscfg
file from the CCS project explorer, where *
is the name of the example project. The SysConfig GUI window will appear, where Zigbee stack and TI driver configurations can be adjusted. These settings will be reflected in the generated files.
The example project comes with working default settings for SysConfig. For the purposes of this README, it is not recommended to change the default driver settings, as any changes may impact the functionality of the example. The Zigbee stack settings may be changed as required for your use case.
Note that some Z-Stack settings are stored in non-volatile storage, and Z-Stack prioritizes stored settings over SysConfig settings. To guarantee SysConfig settings are applied, perform a factory reset of the device to clear non-volatile storage.
Example Usage
This application only provides two buttons as the most basic interface to create/join a network and reset the application to factory default state.
Buttons
BTN-1
: Starts the commissioning process.BTN-2
: If hold after reset, perform Factory New reset (erase network and application persistent data)BTN-2
: Reset the application to factory new state.