Zigbee & Thread Knowledge Base

      • Setting up Serial Output Using Hardware Configurator

        ADKates | 12/337/2017 | 04:18 PM

        As of the Q3 2017 release of Simplicity Studio, the Hardware Configurator allows you to set up USARTs for UART, with many options such as Virtual COM  (VCOM), Virtual UART (VUART), and configure the many options and pins within the HWCONF interface for Zigbee, Thread, Flex/RAIL and even the Gecko Bootloader. Conveniently, these settings can be shared among stacks by importing the .hwconf file.

        Here is a quick overview of the key requirements for setting up your serial ports and some tips which may not be immediately obvious.

        The Serial section contains the following buttons: Serial, Virtual COM and Virtual UART

        Clicking on the Serial button displays the Serial Properties to the right, but you need to check the box to enable it.





        When you enable Serial, you need to decide where the signal is directed, either to a physical UART on one of the USART peripherals, in which case you must enable the corresponding USARTx peripheral module, or the Virtual UART (VUART), in which case you must enable the Virtual UART peripheral block and set the output method (usually SWO). SWO is a normal function of the SerialWire/JTAG [SWJ] peripheral, so you’re not precluding debug by enabling this.

        USART ports can be separately selected for Application serial comms, and Asserts. Note: in EmberZNet and SL-Thread, most asserts are sent via the Application comms. 

        You can configure Wake from GPIO RX and must select the LEUART or the USARTs for serial.


        One of the USART0, USART1, USART2, USART3, LEUART0 and VUART peripherals must be selected in the Serial peripheral, but they must also be configured and selected in the Peripherals section as well. 


        To use them, SPI NCP and UART NCP need to have USART ports selected, along with a few other pins.

        Virtual COM 

        VCOM is only for WSTK interaction when you’re routing VCOM_TX/RX lines from a physical USART back through the WSTK board controller for hosting through the USB/Ethernet console rather than the expansion header.  The check box in Hardware Confgiurator is used to select the pin that will be driven high to enable VCOM. This is usually PA5, but check your radio card Reference Manual to confirm. (For example search for VCOM_ENABLE in www.silabs.com/documents/public/reference-manuals/brd4151a-rm.pdf) 

        If you don’t pick the correct pin, you won’t get VCOM and will need to view the serial I/O through the EXP Header on the WSTK.  If you try to set the picklist for the pin to “Disable” it’s just floating the pin, which gives you ambiguous behavior, unless you add init code as shown in the note below.

        EXP (Expansion Port) Hardware UART

        When VCOM is not set up, the UART will come out as TTL signals on the WSTK expansion port pins. 

        Important: As of December 1, 2017, simply disabling Virtual COM in Hardware Configurator will not achieve this setting; to send UART out via EXP on WSTK, follow these steps:

        • Check the Virtual COM box
        • Configure the VCOM by setting it to Disable (ie, set the VCOM pin low)
        • Configure the VCOM pin (usually PA5) with the following custom code in an init callback:
          • GPIO_PinModeSet(gpioPortA, 5, gpioModePushPull, ENABLE_VCOM)


        VUART provides serial communications over Serial Wire (SWO) or RTT (Real Time Terminal). It uses fewer pins and runs faster than a traditional UART connection (500kbps). To enable it:

        Turn on Serial and Virtual UART(and turn off Virtual COM). In Serial, pick VUART as the Application and Assert comms. In Virtual UART, set the VUART Type to SWO (less commonly, to RTT). Turn off all of the USART/LEUART peripherals.Turn on the GPIO peripheral and in most cases leave the value at the default PF2 pin.

        In Simplicity Studio, you'll see VUART on the Serial0 tab of the Console or via telnet on port 4900.

        Important: As of December 1, 2017 there is an open bug where the required baud rate value is not set for Virtual UART in the hal-config.h file, so you'll need to add it manually (use 115200):

        Near, but outside the // $[SERIAL] ... //[SERIAL]$ block, add

        #define HAL_SERIAL_APP_BAUD_RATE 115200

        (Note that items inside the // $[]..// []$ tags will get written over anytime Hardware Configurator changes, which is why you should put this line outside of the tags)


        • If you are working with a custom board (not a Silabs Radio Card) and connecting to the WSTK via the Mini-Simplicity Connector, set the WSTK mode to OUT and (counter-intuitively) uncheck the Virtual COM Port. VCOM is seen in Simplicity Studio on the Serial1 tab of the Console or telnet on Port 4901.
        • Although the SWO pin is unchecked, SWO is enabled on the Silabs Radio Boards. The most consistent way to see SWO output is via Simplicity Commander's CLI: enter "commander swo read". 
        • Always Save after modifying the Hardware Configurator file and before Generating and Building. (Save sometimes takes much longer than expected.)
        • After setting up serial, sometimes you need to reset the board, WSTK or even your computer (to clear the computer's COM ports if you are using the USB for VCOM). 
      • How to enable voltage scaling in EM2 mode for EFR32MG12 and later devices

        satownse | 11/332/2017 | 01:17 PM

        The EFR32MG12 and later devices (MG13, MG14) list EM2 sleep current in the datasheet with voltage scaling enabled.  However, the default energy mode configuration for EM2 is voltage scaling disabled.  To enable voltage scaling, select the "DefaultMode Peripherals" tab of the hwconf file and click on the EMU peripheral.


        In the properties window, change the property "EM2/3 voltage scaling level" from "Fast wake-up" to "Low power".


        Click the Save icon and then Generate and Build your project.

        Note: A feature request has been logged to enable voltage scaling in EM2 mode for sleepy device types selected in AppBuilder.

      • How to use End Device Timeout Request Command on sleep end device

        JasonHou | 11/332/2017 | 04:39 AM

        The End Device Timeout Request command is sent by an end device informing its parent of its timeout requirements.This allows the parent the ability to delete the child entry from the neighbor table if the child has not communicated with the parent in the specified amount of time.(For more details please refer to zigbee Specification Revision 22).Stack will send End Device Timeout Request Command to praent automaticaly when the sleep end device join/rejoin to the network.User can modify the timeout value through modifying EMBER_END_DEVICE_POLL_TIMEOUT and EMBER_END_DEVICE_POLL_TIMEOUT_SHIFT.The timeout value in seconds is EMBER_END_DEVICE_POLL_TIMEOUT<< EMBER_END_DEVICE_POLL_TIMEOUT_SHIFT.

      • Access to Silicon Labs wireless mesh networking stacks

        RonB | 11/326/2017 | 01:11 PM

        Silicon Labs is the vendor of choice for OEMs developing Zigbee and Thread networking into their products by providing reliable, low-power, secure, and scalable networking solution for connecting Things to the IoT.  The Silicon Labs EmberZNet platform is the most integrated, complete and feature rich Zigbee solution available.  While the Silicon Labs Thread platform is a proven IPv6-based mesh networking protocol.  Both solutions help accelerate time to market with the most reliable, scalable and advanced Zigbee and Thread software, supported by best-in-class development tools.

        Requirements for Stack Access

        Access to our wireless mesh stacks requires the purchase of one of our full mesh networking development kits (such as the EFR32 Mighty Gecko Wireless Starter Kit, the EM35x Mesh Networking Development Kit or the Samsung ARTIK 030 Development Kit) or being a contract manufacturer for an existing customer (contact your FAE for these requests).

        This does not include non-mesh wireless development kits, like the Flex Gecko or Blue Gecko kits.  And unfortunately at this time, the Thunderboards (React, Sense and Sense 2), ETRX Development Kits and the Connected Home Reference Designs do not grant access to our stacks.

        It is important for customers to have one of Silicon Labs development kits as they provide a complete mesh networking platform environment to develop and deploy successful ZigBee and Thread applications.  With multiple nodes you can develop a complete mesh network and the WSTK development boards provide a full JTAG debugging and programming solution.

        To unlocking stack access.

        First locate your development kit software serial number.  The location of the serial number depends on your development kit:

        EM35x Development Kit - a 24-digit hex number found on the bottom right of the back of the user quick start guide


        Mighty Gecko Starter Kit - a 10-digit hex number found on the label on the side of the box


        ARTIK 030 Development Kit - a 10-digit hex number found on the label on the side of the box


        Once you have located the serial number, you can register you kit in one of two ways:

        1. Log in to your portal account and register your software serial number at:  https://siliconlabs.force.com/KitRegistration


        2. Download and install Simplicity Studio.
           From the launcher view, the Sign In menu includes a Kit Registration option



        Once the registration is successful you will have access to our most recent stacks in Simplicity Studio v4 (required for use with the stack).  All software and stacks can be found in the portal.


        Contact support with any questions or problems.

      • How to Create Smart Energy Customized NCP project with Pre-Built NCP images Config

        Azam Chatta | 11/320/2017 | 03:49 AM

        Silicon Labs provides pre-built NCP images and sample NCP applications for different use cases in the stack. The customer has the option either use one of the pre-built NCP images or use sample NCP applications or a blank NCP application to build customised NCP application.

        The below resopurces provide good information before continue with generating Smart Energy customized NCP image.

        The AN1010 application note provides detailed guide about building a customised NCP appliocation.
        You can find this here:


        Another useful application note is AN714, this guide provides information about smart energy ECC-enabled device setup process.
        You can find this here:


        The KBA at below link provides information about the ECC libraries and adding them to the stack.


        Although the customer cannot generate exactly NCP binary as pre-built, however if they use one of NCP sample applications and make below changes then they can generate a NCP image functionaly similar to pr-built NCP image.
          The steps to generate smart energy NCP image similar to pre-built smart energy NCP image:

          (1) Start a new customised NCP project based on one of sample NCP applications. You may select 'xncp-commshub-uart-dual'   sample NCP application for ComsHub and 'ncp-uart-hw' for end device depending on your needs.
          (2) Select the following plugins and do not change any other already selected plugins.
          XNCP Stub Library
          Zigbee PRO Stack Library
          Zigbee Light Link Stub Library
          Zigbee PRO Core Security Library
          Security Link Keys Library
          End Device Bind Library
          Binding Table Library
          ECC 163k1 Library
          ECC 283k1 Library
          CBKE Core Library
          CBKE 163k Library
          CBKE 283k Library
          Install Code Library
          CBKE DSA Verify Library
          CBKE DSA Sign Stub Library
          CBKE 283k DSA Verify Library
          Packet Validate Library
          Multi-Network Stub Library
          GreenPower Stack Stub Library
          Concentrator Support Library
          Manufacturing Library
        (3) Select Zigbee PRO Stack Library plugin and set Child Table Size to 32. The other settings selected by sample NCP application are ok.
        (4) Generate and build the project.


      • HAL Configurator Reference ZNet 6.0 Thread 2.4

        ADKates | 11/313/2017 | 05:18 PM

        The attached document is a docx reference for the October release of the 6.0 ZNet Beta and the subsequent GA release of the 6.0 ZNet stack and the 2.4 Thread stack. If you do not have Microsoft Word, you can download the original .html reference in a .zip archive.

        The  stacks have a new Hardware Configurator which generates the #defines as seen in this document into the [part].hwconfig file and the config file for the particular stack, like hal-config.file or bootloader-configuration.h.

        For anyone not using the HWConf or having unexpected outputs in the Beta release, this reference document provides the defines, values and dependencies for the hardware, clock and peripheral options.

        For more context on these defines, this is an extension of the new HAL structure begun in the June 2017 release and described here:


        The new defines are more uniformly named and implemented, but the system is very similar. If you have implemented the June 2017 version, it should be easy to see what the new defines and values are.

      • Turning any EFR32 into a Zigbee or Thread Sniffer

        EzraHale | 11/313/2017 | 03:52 PM

        Any EFR32 can be easily turned into a Zigbee or Thread sniffer device using the Railtest sample application included in the free Flex SDK.

        In order to do this follow the steps below:

        1. Download the Flex SDK via Simplicity Studio V4.
        2. Create a new Railtest sample application for your desired part (Generate and compile using GCC or IAR)
        3. Load the built binary image onto your chosen EFR32 dev board.
        4. Connect to the console of your EFR32.
        5. In order to turn the Railtest image into a sniffer for 802.15.4 protocols like Zigbee and Thread you will need to issue the following commands over the console:
          1. > rx 0
            1. This will put the radio into an idle state so that you can configure it.
          2. > config2p4GHz802154
            1. This command configures the radio for the 802.15.4 phy
          3. > enable802154 rx 100 192 864
            1. Puts the radio into the right mode for 802.15.4 capture
          4. > setPromiscuousMode 1
            1. Puts the radio into promiscuous capture mode so it can act as a sniffer
          5. > setChannel <yourChannel, (11 - 26)>
            1. Sets the desired channel you wish to sniff.
          6. > rx 1
            1. Puts the radio back into receive mode.
        6. Now simply capture from your device in the Network Analyzer and you should start seeing traffic captured from the network.
      • How to build an EZSP-UART host application

        JasonHou | 11/305/2017 | 04:49 AM

        Here are some steps you can follow to build an EZSP-UART host application with an EFR32MG1 or EFR32MG12 device (on our dev kit) running a pre-built NCP-UART image of the latest EmberZNet stack, which is v6.0.0.0 at the time of this article.


        1. Create a new Silicon Labs AppBuilder Project in Simplicity Studio v4 of type "ZCL Application Framework V2", and choose the host (as apposed to SoC) flavor of the latest EmberZNet stack.


        2. Choose a sample application, such as Z3Gateway.choose "Noon(compatible)" in Part tab. and click "Finish"


        3. Generage the project without any modification.


        4. Build the host application.

        Building the Host application can be done on a Linux system(this sample built on Cygwin) and requires a number of development tools. We assume you have access to these tools. They are as follows:

        • Make

        • GCC

        • sed

        • awk

        • xargs

        • The standard C Library and its development headers

        • The Readline Library and its development headers

        • The Ncurses Library and its development headers

        . Run "make" on the generated Makefile from the directory<\SiliconLabs\SimplicityStudio\v4_4\developer\sdks\gecko_sdk_suite\v2.0\app\builder\Z3GatewayHost> and the compilation should complete successfully.


        5.Running the Host application

        The USB port is either COM1, COM2, COM3, and so on. The following example uses COM19.

        a. Launch a Cygwin Shell.

        b. Navigate to the directory where the project is located, for example:cd /cygdrive/c/SiliconLabs/SimplicityStudio/v4_4/developer/sdks/gecko_sdk_suite/v2.0/app/builder/Z3GatewayHost/build/exe

        c. Type the command: ./Z3GatewayHost.exe -n 0 -p COM19




      • The difference between Legacy Bootloader and Gecko Bootloader for EFR32MG Parts

        Lesun | 10/304/2017 | 02:27 AM

        The Silicon Labs Gecko Bootloader is a common bootloader for all the newer MCUs and wireless MCUs from Silicon Labs. The Gecko Bootloader can be configured to perform a variety of bootload functions, from device initialization to firmware upgrades. In this article, we will compare the difference between Legacy Bootloader and Gecko Bootloader for EFR32MG Devices on ZigBee side.

        For EM35x devices and EFR32MG1x parts, usually, you can find the prebuild legacy bootloader for some part numbers in the following stack installation directory. For some EFR32MG1 QFN32 parts, we already had a KBA to discuss how to make customized ZigBee bootloader.  


        For EFR32MG12x/EFR32MG13x and newer parts, usually, you can only choose Gecko Bootloader for them. We don't provide the prebuild Gecko Bootloader right now, so custom need to build it by themselves, it is easy to build the Gecko Bootloader within Gecko Bootloader SDK, since there are many kinds of Samples in the SDK. Actually, for EFR32MG parts, no matter it is EFR32MG1x or EFR32MG12x(beyond) parts, we recommend custom to use Gecko Bootloader, since the Gecko Bootloader can be upgraded in the field.

        Here are some tags for the difference between Legacy Bootloader and Gecko Bootloader:

        Legacy Bootloader:

        • Can be used for EM35x devices, resides in main flash, it starts from 0x0000 address.
        • Can be used for EFR32MG1 devices, resides in main flash, it starts from 0x0000 address.
        • It is prebuild bootloader, can be found in stack installation directory.
        • For some EFR32MG1 QFN32 parts, need to make customized ZigBee bootloader.
        • The bootloader can be erased with "commander device masserase".
        • Documentation: AN760 and AN772.

        Gecko Bootloader:

        • It includes two-stages design: First stage and Main Bootloader.
        • First stage is very simple and only knows how to boot/upgrade the second stage.
        • Main bootloader is field upgradeable. It means you can upgrade the Main Bootloader in the field.
        • Can't be used for EM35x devices.
        • Recommend to be used for any EFR32MGx devices.
        • Need to build within Gecko Bootloader SDK.
        • For EFR32MG1x devices, the Gecko Bootlaoder resides in main flash, it starts from 0x0000 address.  
          • The bootloader can be erased with "commander device masserase".
        • For EFR32MG12x and newer devices, the Gecko Bootlaoder resides in bootloader area, the First stage bootloader starts from @ 0x0FE10000, the Main bootloader starts from@ 0x0FE10800 address.
          • The bootloader can't be erased with "commander device masserase".
          • If you want to remove the Gecko Bootloader, a new dummy Bootloader (can be found in stack installation directory) has to be flashed.
        • Bootloader "-combined" file with both first-stage and second-stage (Main Bootloader) in one file.
        • For the first time, the first stage should be flashed to the chip, so you must flash the "-combined" Bootloader for the first time. Then in future, you only need to flash the second-stage (Main Bootloader).
        • Secure Firmware Update
          • Verification of new image before bootloading
          • Signed GBL file: ECDSA-P256->ensures only accepting images trusted by vendor
          • Encrypted GBL file: AES-128 ->ensures encryption during transfer, image storage
        • Secure Boot
          • Verification of image in flash before running
          • Signed application image: ECDSA-P256
        • Documentation: UG266.