How to use the OTA 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 OTA cluster. Once the Zigbee mesh network is created, the user can send requests from the Client to the Server or vice-versa through push button SW1 on the Client or Server respecfully in order to initiate an OTA upgrade. The Client will reboot and jump to the OTA image immediately after a successful upgrade by undergoing a soft reset.
Connectivity, Zigbee, Zigbee protocol, 802.15.4 protocol, OTA cluster
For this application it is requested to have at least:
Router Coord. +--------+ +--------+ | | | | PushB SW1=> | OnOff | => Green LED Start Toggling | OnOff | | Client | | Server | | | ZbZclOtaClientQueryNextImageReq | | | | --------------------------------------------------------> | | | | | | Reboot and Jump to OTA Image <= | | Start OTA Upgrade Procedure <= | | | | (Section 11.12 OTA Upgrade Diagram) | | | | | | Reset => | | => Reboot and Jump to Original Downloaded Image | | | | | | | | ZbZclOtaServerImageNotifyReq | | Green LED Start Toggling <= | | <-------------------------------------------------------- | | | | ZbZclOtaClientQueryNextImageReq | | | | --------------------------------------------------------> | | | | | | Reboot and Jump to OTA Image <= | | Start OTA Upgrade Procedure <= | | | | (Section 11.12 OTA Upgrade Diagram) | | | | | | | | ZbZclOnOffClientToggleReq | | PushB SW1 (On OTA Image) => | | --------------------------------------------------------> | | => Red LED Toggle | | | | Reset => | | => Reboot and Jump to Original Downloaded Image | | | | | | PushB SW2 => | | => Reboot and Jump to OTA Image | | | | | | | | PushB SW2 => | | => Print Availible Images for OTA Transfer | | | | +--------+ +--------+
Start the first board. It must be the Coordinator of the Zigbee network. So, in this demo application it is the device running the Zigbee_OTA_Server_Coord application.
Wait for the Blue LED to turn ON.
Start the second board. This board is configured as Zigbee router and will be attached to the network created by the Coordinator. Do the same for the other boards if applicable. → At this stage, the Blue LED blinks indicating that the Zigbee network is being created. This usually takes about 15 seconds. It is important to wait until Blue LED turn ON before pushing buttons.
It is now possible to send OTA Cluster commands from the Client to the Server or vice-versa in unicast or broadcast mode by pressing on the SW1 push button on the Client or Server respecfully. You shall see the Green LED toggling on the Client. When the upgrade finishes, you shall see the Green LED stop toggling on the Client followed by an immediate soft reset. The Client will jump to the OTA image.
Once the Client soft resets and jumps to the OTA image, it is possible to send OnOff Cluster commands from the Client to the Server in multicast mode by pressing on the SW1 push button. In addition, it is possible to hard reset using the Reset push button on the Client to restore the original downloaded image.
Once the Client hard resets and restores the original downloaded image, it is possible to soft reset using push button SW2 on the Client to jump to the OTA image.
By pressing the SW2 push button on the Server, all availible images for download on the Server will be logged.
Note: When the Red, Green, and Blue LED are toggling, it is indicates an error has occurred in the application.
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:
BaudRate = 115200
baud Word Length = 8 Bits Stop Bit = 1 bit Parity =
none Flow control = none Terminal “Go to the Line” :
<LF>