Zigbee Router Light Sink Example App


This document discusses how to use the Zigbee Light Example App and the different parts that compose it. Zigbee Light Example Application is an example which exercises different features of TI Z-Stack. This example has the same behavior as the Zigbee Light but with addition of Green Power (GP) Sink functionality to process GP On/Off Switch commands.

Some of the features exercised include:

Hardware Prerequisites

Software Prerequisites

Functional Description

Software Overview

This section describes software components and the corresponding source file.

Application Files

Example Usage

This section describes how to use this sample application.



Serial interface

The connection will have the following settings:

    Baud-rate:     115200
    Data bits:          8
    Stop bits:          1
    Parity:          None
    Flow Control:    None

Note: The serial output is known to be formatted incorrectly in Tera Term and in the CCS Terminal.

The serial interface allows you to control the commissioning configuration as well as application behavior. The commissioning interface is common for all applications and is implemented in the module zcl_sampleapps_ui.c/.h. Any application specific behavior of the serial interface is implemented in the example application files.

The serial interface implements a common set of menus described in Application Overview. This common menu has to be used to commission the device into a network.

Commissioning the device Into the network

Zigbee router devices can create a network with limited security capabilities (Distributed network) or join a network. The commissioning process to be done can be configured in the Commissioning screen, note that if both Formation Mode and Steering Mode are enabled when Commissioning is executed, the stack will first try to join a network, after which if it fails, the device will create its own network. This sample applications uses the stack notifications (zstackmsg_CmdIDs_BDB_NOTIFICATION) on a successful network formation process to open the network and allow new devices join, even if the Steering Mode is not enabled from the common user interface. In the same way, if the device joins a network, it will open the network for 180 seconds. If the network is closed, it can be open again by enabling the Steering Mode and execute the commissioning process in the Commissioning Screen.

Interfacing with the GP On/Off Switch Example App

Once the Light Sink and another routing device are in the same network, put the Light Sink in GP Commissioning Mode from the App Menu in the Green Power Sink Commissioning Screen.

Green Power Commissioning screen

Send the On/Off GPDF from the GP On/Off Switch which has Auto-Commissioning enabled. Then from the Green Power Sink Commissioning Screen disable the GP commissioning mode.

Green Power Commissioning screen

Once the GP commissioning mode is disabled, sending the On/Off GPDF with the GP On/Off Switch will toggle the Light Sink LED.

NOTE: If the LED is not toggled just repeat the commissioning process and try again.

Interfacing with the Switch Example App

Once the Light and Switch device are in the same network, enable the Finding and Binding Mode and excecute it from the Commissioning Screen. When Finding and Binding is executed, the Light device be set in Identify mode for 180 seconds, during this time Switch device must perform Finding and Binding as well to find the Light device in Identify mode and create a bind to it. The status of the Identify process is shown in Commissioning Screen

Finding and binding status screen

IdXXX shows the remaining XXX seconds in Identify mode, SrchYYY/ZZ shows the remaining YYY seconds searching for devices in Identify mode and ZZ the number of binds created during this process. Once the Switch device has the bind, it will be able to toggle the Light in the ToggleLight screen.

Light device will set IdXXX, while Switch device will set SrcYYY and count the binds in ZZ. Multiple devices can perform this procedure at the same time, by default up to 4 lights can be binded to a single Switch (defined by NWK_MAX_BINDING_ENTRIES). There is no limit on the number of Switches that can control a single Light.

Enter into App Menu to access to application specific application controls.

Application menu entrance screen

Now the Light can be Toggled in the Toggle Screen. This can be done in the Light device to Toggle the Light locally, or can be done remotely by Switch device.

Toggle light screen