How to use the Temperature Measurement cluster on a device acting as a Server within a Centralized Zigbee network.
The purpose of this application is to show how to create a Zigbee centralized network, and how to communicate from one node to another one using the Temperature Measurement cluster. Once the Zigbee mesh network is created, the Server sends regularly the Temperature to Client. The Server is a SED device, no traces are available.
Connectivity, Zigbee, Zigbee protocol, 802.15.4 protocol, Temperature Measurement cluster
For this application it is requested to have:
The Temperature Measurement Server update regularly (500 ms) its ZCL_TEMP_MEAS_ATTR_MEAS_VAL attributes (via the measure of a sensor or by random).
The Temperature Measurement Client send a Report Request to obtains regularly the ZCL_TEMP_MEAS_ATTR_MEAS_VAL attributes.
The Temperature Measurement Server send regularly (5 seconds) a Report with the latest value of ZCL_TEMP_MEAS_ATTR_MEAS_VAL attributes.
Coord. SED +----------+ +----------+ | | | | | TempMeas | | TempMeas | [ Client | | Server | - Temperature Server during Init | | | | launch a 500 ms Periodic Timer | | | | | | | | - Every 500 ms | | | | * Read the Temperature Sensor (if exist) | | | | or simulate it with RNG. | | | | * <= ZbZclAttrIntegerWrite(ZCL_TEMP_MEAS_ATTR_MEAS_VAL) | | After a SED was connected : | | | | ZbZclAttrReportConfigReq(ZCL_TEMP_MEAS_ATTR_MEAS_VAL, 5sec) | | | | -----------------------------------------------------------> | | | | <----------------------------------------------------------- | | | | | | | | <-------------- Report (every 5 seconds) ------------------- | | | | | | | | | | | | | | | | | | | | | | +----------+ +----------+
Start the first board. It must be the coordinator of the Zigbee network, so in this demo application it is the device running Zigbee_TempMeas_Client_Coord application.
Wait for the Blue LED ON.
Start the second board. This board is configured as Zigbee SED and will be attached to the network created by the coordinator. Do the same for the other boards if applicable.
On Server side, every 500 ms, the Temperature Measured is read and displayed. On Client side, every 5 seconds, the Temperature Measured is reported from the Server.
This example runs on STM32WBA55xx devices.
This example has been tested with an STMicroelectronics STM32WBA55CGA_Nucleo board and can be easily tailored to any other supported device and development board.
On STM32WBA55CGA_Nucleo, the jumpers must be configured as described in this section. Starting from the top left position up to the bottom right position, the jumpers on the Board must be set as follows:
JP1: 1-2: [ON] 3-4: [OFF] 5-6: [OFF] 7-8: [OFF] 9-10: [OFF]
JP2: 1-2: [ON]
To get the traces you need to connect your Board to the Hyperterminal (through the STLink Virtual COM Port).
The UART must be configured as follows (unavilable for a Sleepy app) :
BaudRate = 115200 baud Word Length = 8 Bits Stop Bit = 1 bit Parity = none Flow control = none Terminal “Go to the Line” : <LF>