ZigBee 3.0: Adding Clusters

cancel
Showing results for 
Search instead for 
Did you mean: 

ZigBee 3.0: Adding Clusters

No ratings

ZigBee 3.0: Adding Clusters

This document describes how to add additional cluster to the Router application in the JN-AN-1217 ZigBee 3.0 Base Device Application Note.

The Router application's main endpoint contains Basic, Groups, Identify and OnOff server. The steps below describe how to add two clusters to Router: Temperature Measurement server and OnOff client.

Note that these changes only go as far as making the new clusters added and discoverable, no functionality has been added to these clusters.

 Common/Source/app.zpscfg

The first step is to update the ZigBee PRO Stack Configuration file to add the new clusters (OnOff Client, Temperature Measurement Server) to the Router application endpoint.

The HA profile already contains few clusters but Temperature Measurement cluster was added:

 Image1.png

Image2.png

The OnOff client was already present in Router endpoint but the Temperature Measurement cluster was then added into Router application endpoint:

 Image3Final.png

Router/Build/Makefile

For cluster belonging to General domain, the cluster code is automatically build and linked but for other domains, the compiling and linking needs to be enabled. As Temperature Measurement belongs to Measurement and Sensing domain, enable the cluster code in Makefile:

Image3.png

Router/Source/zcl_options.h

This file is used to set the options used by the ZCL.

Enable Clusters

The cluster functionality for the router endpoint was enabled:

 Image4.png

Enable any optional Attributes and Commands for the clusters

Image5.png

 Add the cluster creation and initialization into ZigBee Base device definitions

The cluster functionality for some of the clusters is already present on ZigBee Base Device. For Temperature Measurement cluster the functionality was added into ZigBee Base Device.

<Path to JN-SW-4x70 SDK>/ Components/ZCL/Devices/ZHA/Generic/Include/base_device.h

The first step was including the Temperature Measurement header files into base device header file as shown below:

 Image6.png

The second step was adding cluster instance into base device Instance as shown below:

Image7.png

The next step was to define the cluster into the base device structure as below:

Image8.png

<Path to JN-SW-4x70 SDK>/ Components/ZCL/Devices/ZHA/Generic/Include/base_device.c

The cluster create function for Temperature Measurement cluster for server was called in ZigBee base device registration function:

 Image9.png

Router/Source/app_zcl_task.c

Temperature Measurement Server Cluster Data Initialization - APP_vZCL_DeviceSpecific_Init()

The default attribute values for the Temperature Measurement clusters are initialized:

Image10.png

Attachments
Comments

can you please explain this for DoorLock or another domain cluster so we get a better idea

Hi Dost,

Please follow the above steps and follow JN-UG-3115 for enabling Door Lock cluster.

Regards,

Shweta Chauhan

Version history
Revision #:
1 of 1
Last update:
‎07-27-2017 06:29 PM
Updated by: