4.7.3 Zigbee Centralized Network Formation by Combined Interface

WBZ451 Curiosity Board

Devices (Device): | PIC32CX1012BZ25048(MCU) on WBZ451 Module |

Peripherals (Used, On-Board): | User Button| UART-USB Converter|

Introduction

This section describes the Zigbee network formation in Combined Interface on WBZ451 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
WBZ451 Curiosity Boards1
Micro USB cable1
Personal Computer1

SDK Setup

Software Requirement

Programming the precompiled hex file or Application Example

Programming the hex file using MPLABX IPE

  1. Precompiled Hex file is located in <Harmony Content Path>\wireless_apps_pic32cxbz2_wbz45\apps\zigbee\combinedInterface folder.

  2. 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

  1. Follow steps mentioned in Running a Precompiled Example.

  2. Open and program the Application Example combinedInterface.x located in <Harmony Content Path>\wireless_apps_pic32cxbz2_wbz45\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 InterfaceCoordinatorDevice capable of controlling and monitoring other devices. It is typically a mains-powered device like a personal computer
WBZ451 Curiosity board is programmed with Combined Interface which can act as Zigbee Gateway/Coordinator.

Demo Steps: Network Formation in CI

Hardware and Software Setup
  1. Supply power to WBZ451 Curiosity Board consisting of Combined Interface application by connecting a USB cable. Power Supply (PS) Green LED will turn on when connect to PC.
  2. 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
In addition, local echo and sending line ends with line feeds shall be enabled in the PC serial terminal application.
Network Formation (Coordinator - (Combined Interface))
  1. 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.

  2. 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.

    1. setPermitJoin 180: This command opens up the network for next 180sec.

    2. 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.
Other Functionalities
  1. On board button actions:

    When the on board “User Button (SW2)” 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.

Note: It is recommended that new users of MPLAB Code Configurator go through the Overview.
  1. Create a new MCC Harmony Project. For more details, refer to 2.5 Creating a New MCC Harmony Project.
  2. 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.
  3. Option 2: Follow the remaining steps.
  4. Click on + symbol on the Combined Interface Device Type component from “Device Resources”.
    1. Accept dependencies or satisfiers, select Yes to all.
    2. Configure Combined Interface as shown:
  5. 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.
  6. Add TCC2 to the project graph.
  7. Add EIC to the project graph and verify the configuration options.
  8. Add Bootloader Services to the project graph.
  9. Verify if the Project Graph window has all the expected MCC configurations.
  10. Open the Pin Configuration and add EXTINT0 to RB4.
  11. Open the Clock Configuration and confirm the Peripheral Clock Configuration as shown below:
  12. 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