5.6.1.3 Zigbee Centralized Network Formation by Combined Interface
WBZ351 Curiosity Board
Devices (Device): | PIC32CX5109BZ31048(MCU) on WBZ351 Module |
Peripherals (Used, On-Board): | User Button| UART-USB Converter|
Introduction
This section describes the Zigbee network formation in Combined Interface on WBZ351 Curiosity boards. In Zigbee centralized network, the network is formed by Zigbee coordinator. Other routers and end-devices can enter into the network once it is formed. The demo steps explained in this document can be followed for any devices, like light, thermostat, etc to bring into the CI formed network.
GitHub Repository
The firmware, .hex
, and accompanying readme.md
file
for the application can be found in the GitHub repository – combinedInterface
Hardware Requirement
Tool | Quantity |
---|---|
WBZ351 Curiosity Boards | 1 |
Micro USB cable | 1 |
Personal Computer | 1 |
SDK Setup
Software Requirement
Programming the precompiled hex file or Application Example
Programming the hex file using MPLABX IPE
-
Precompiled Hex file is located in
<Harmony Content Path>\wireless_apps_pic32cxbz3_wbz35\apps\zigbee\combinedInterface
folder. -
For more details on the steps, go to Programming A Device.Note: Users must choose the correct device and tool information.
Programming the Application using MPLABX IDE
-
Follow steps mentioned in Running a Precompiled Example.
-
Open and program the Application Example
combinedInterface.x
located in<Harmony Content Path>\wireless_apps_pic32cxbz3_wbz35\apps\zigbee\combinedInterface\firmware
using MPLABX IDE.
<Harmony Content Path> how to find what is my Harmony Content Path.
Demo Description
Application | Zigbee Logical Device Type | Functionality |
---|---|---|
Combined Interface | Coordinator | Device capable of controlling and monitoring other devices. It is typically a mains-powered device like a personal computer |
Demo Steps: Network Formation in CI
- Supply power to WBZ351 Curiosity Board consisting of Combined Interface application by connecting a USB cable. Power Supply (PS) Green LED will turn on when connect to PC.
- The application activity is shown as “Console Log” through on board UART-USB converter.
-
Open Terminal (For example: Tera Term) with the setup as shown below to look for these logs.
-
On the PC side virtual COM port connection that corresponds to the board shall have following settings:
BAUD RATE: 115200 (as configured in SERCOM configuration) PARITY: None DATA BITS: 8 STOP BITS: 1 FLOW CONTROL: None
-
Once the board is powered on and serial terminal setup is done, the board is ready to be operated as a coordinator. It is responsible for initially forming the network and then, via the Trust Centre functionality, managing which other devices are allowed to join the network and distributing security keys to those that are allowed to join.
-
Input command: resetToFN and look for the below logs for successful Zigbee network formation on CI. It will open up the network for other Zigbee devices to join for first 180 seconds from the first powerON.
-
Case1: If a nearby device is trying to join a network, and sees CI then will join the network as shown in below log.
-
Case2: The commissioning procedure will last for 180 seconds. In case no other devices are there in vicinity and at the end of 180 seconds the below log is observed:
-
Case3: To open up the network after 180 seconds to allow other devices to join, we have to input the below commands in CI, before commissioning is initiated in another device.
-
setPermitJoin 180: This command opens up the network for next 180sec.
-
invokeCommissioning 8 0: This command opens up the network for “finding and binding procedure”.
-
-
Success logs: When another device for example “Extended Light” is successfully commissioned with “Combined Interface”, below log will be seen.
- Zigbee OTAU handshake logs:
“CombinedInterface” has been enabled OTAU client feature, when it is working, it
keeps sending command to handshake with OTAU PC tool, it is
ISD_DRIVER_INIT_REQUEST
command as values of 2A 03 00 01 00 55, so user may see a lot of “*U*U” message in the log. When this message keep printing, user can still input any command without being interfered.
On board button actions:
When the on board “User Button (SW3)” is pressed for more than 10seconds, it can delete all the networking information and will bring the device to factory default state.
Creating Application Device Types From Scratch Using MCC
This section intended to showcase the complete application development from scratch including the individual component and its dependency inclusion.
- Create a new MCC Harmony Project. For more details, refer to 2.5 Creating a New MCC Harmony Project.
- Option 1: Import
component configuration: This step helps users’ setup the basic
components and configuration required to develop this application. The
imported file is of format .mc3 and is located in the path
<Harmony Content Path>\wireless_apps_pic32cxbz2_wbz45\apps\zigbee\combinedInterface\firmware\combinedInterface
.For more details on how to import the component configuration , refer to14.3 Importing Existing App Example Configuration.
Verify the project graph and configuration options shown in the below steps.
Note: Import and export functionality of the Harmony component configuration will help users to start from a known working setup of the MCC configuration. - Option 2: Follow the remaining steps.
- Click on + symbol
on the Combined Interface Device Type component from “Device Resources”.
- Accept dependencies or satisfiers, select Yes to all.
- Configure Combined Interface as shown:
- Add UART components needed for console logs and commands. Right click on the yellow triangle to add satisfiers as shown below. Verify the UART SERCOM configuration as in Zigbee Console Commands.
- Add TCC2 to the project graph.
- Add EIC to the project graph and verify the configuration options.
- Add Bootloader Services to the project graph.
- Verify if the Project Graph window has all the expected MCC configurations.
- Open the Pin Configuration and add EXTINT0 to RB4.
- Open the Clock Configuration and confirm the Peripheral Clock Configuration as shown below:
- Add the
bootloader_timer.X.production.hex file to the loadables in the project
properties. The hex file can be found in
folder.
<Harmony Content Path>\wireless_apps_pic32cxbz2_wbz45\apps\zigbee\combinedInterface\firmware\combinedInterface.X