QSG180: Zigbee EmberZNet SDK v7.x Quick-Start Guide

This quick-start guide provides basic information on configuring, building, and installing applications for the EFR32MG family of SoCs using the Zigbee EmberZNet Software Development Kit (SDK) v7.x with Simplicity Studio 5.3 and higher.

For similar information regarding earlier SDK versions, see QSG106: Zigbee EmberZNet Quick-Start Guide for SDK v6.10 and Earlier.

This guide is designed for developers who are new to Zigbee EmberZNet and the Silicon Labs development hardware. It provides instructions to get started using the example applications provided with the Zigbee EmberZNet SDK.

KEY FEATURES

1 Product Overview

Before following the procedures in this guide you must have:

1.1 Note on Product History

Zigbee EmberZNet SDK v7 contains a number of changes compared to SDK v6.x. Many of these changes are due to an underlying framework redesign that results in an improved developer experience within Simplicity Studio 5 (SSv5). Projects are now built on a component architecture instead of AppBuilder. Simplicity Studio 5 includes project configuration tools that provide an enhanced level of software component discoverability, configurability, and dependency management. These include a Project Configurator, a Component Editor, and a Zigbee Cluster Configurator. See AN1301: Transitioning from Zigbee EmberZNet SDK 6.x to SDK 7.x for more information about the differences between SDK 6.x and SDK 7.x.

SDKs beginning with version 6.8 are only compatible with Simplicity Studio 5 (SSv5). Among many other improvements, SSv5 introduced the Simplicity Studio 5 User's Guide, available online at https://docs.silabs.com/ and through SSv5's help menu. Standard information, such as how to download SSv5 and the Zigbee EmberZNet SDK, and descriptions of SSv5 features and functions, are provided in that guide, and are not repeated here.

1.2 Software

See the stack release notes for version restrictions and compatibility constraints for the stack and other software. To develop Zigbee EmberZNet applications, you will need the following.

While Simplicity Studio and Simplicity Commander can be run on a Mac OS or Linux machine, these instructions assume you are working with a Microsoft Windows-based PC. If you are using a non-Windows system, IAR-EWARM must be run via WINE or some other form of emulator or virtual machine.

1.3 Support

You can access the Silicon Labs support portal at https://www.silabs.com/support through Simplicity Studio. Use the support portal to contact Customer Support for any questions you might have during the development process. Access is through the Welcome view under Learn and Support. Note that you can return to the Welcome view at any time through the Welcome button on the toolbar.

1.4 Documentation

Documentation is accessed through Simplicity Studio. Simplicity Studio filters documentation based on the connected or selected part. Hardware-specific documentation can be accessed through links on the part OVERVIEW tab.

SDK documentation and other references are available through the DOCUMENTATION tab. Filter with the Zigbee Technology Type checkbox to see documentation most closely related to the Zigbee EmberZNet SDK.

1.5 Gecko Platform

The Gecko Platform is a set of drivers and other lower-layer features that interact directly with Silicon Labs chips and modules. Gecko Platform components include EMLIB, EMDRV, RAIL Library, NVM3, and mbed TLS. Application developers using Zigbee EmberZNet components, the PIN tool, or APIs may not need to interact directly with the Gecko Platform, as the code does that for you. For more information about Gecko Platform, see the Gecko Platform release notes (on the DOCUMENTATION tab, filter by Resource Type: Release Notes).

1.6 Using IAR as a Compiler

If you plan to use IAR as your compiler (required for dynamic multiprotocol and Micrium OS examples), check the compatible IAR version in the SDK release notes. To install IAR-EWARM:

  1. Go to the Customer Support portal as described in section 1.3 Support.
  2. If you are not already signed in, sign in.
  3. Click the Software Releases tab. In the View list select Latest EmberZNet Software. Click Go. In the results is a link to the appropriate IAR-EWARM version.
  4. Download the IAR package. This is a large package - download time depends on connection speed but can take 1 hour or more.
  5. Install IAR.
  6. In the IAR License Wizard, click Register with IAR Systems to get an evaluation license.
  7. Complete the registration and IAR will provide an evaluation license.

2 Set Up Your Development Environment

2.1 Register your Development Kit

Before you install Simplicity Studio, you need to create an account on the support portal. Be sure to record your account username and password as you will use it to log in to Simplicity Studio.

Properties in your Salesforce account determine what update notifications you will receive. To review or change your subscriptions, log in to the portal, click HOME to go to the portal home page and then click the Manage Notifications tile. Make sure that Software/Security Advisory Notices & Product Change Notices (PCNs) is checked, and that you are subscribed at minimum for your platform and protocol. Click Save to save any changes.

2.2 Connect the Mainboard

Connect your mainboard, with radio board mounted, to your PC using a USB cable.

Note: For best performance in Simplicity Studio, be sure that the power switch is in the Advanced Energy Monitoring or "AEM" position as shown in the following figure.

Figure 1. EFR32MG12 on a WSTK Mainboard

This figure shows a printed circuit board (PCB) with various components, connectors, and labels. It features the EFR32MG12 microcontroller, a Mighty Gecko 2.4 GHz 19 dBm radio module, and a Wireless Starter Kit (WSTK) Mainboard with connectors labeled for power (5V, GND, 3V3), GPIO pins (P0-P45), USB, and debugging interfaces.

2.3 Install Simplicity Studio 5 (SSv5) and the Gecko SDK

General information on using SSv5 and the Gecko SDK installation can be found in the online Simplicity Studio 5 User's Guide, available on https://docs.silabs.com/ and through the SSv5 help menu.

3 About Demos and Examples

Because starting application development from scratch is difficult, the Zigbee EmberZNet SDK comes with a number of built-in demos and software examples covering the most frequent use cases.

Demos are pre-built application images that you can run immediately. Software examples can be modified before building the application image. The software examples with the same names as the demos provide the demo functionality.

Note: The demos and examples you see are determined by the part selected. If you are using a custom solution with more than one part, be sure to click on the part you are working with to see only those items applicable to that part.

Silicon Labs recommends that you start your own development with a use case-based example and modify it according to your needs. If none of the use case-based examples meet your needs, you can start with the ZigbeeMinimal example. The examples provide default configurations needed by the stack and a basic application structure that you can build upon.

3.1 Demos

Demos are prebuilt application examples that can be directly downloaded to your device. These demos are compatible with selected devices, as noted in the demo description. You will not see the demos in Simplicity Studio unless you have one of these devices selected. If you have more than one device connected, make sure that one of these devices is selected in the Debug Adapters view. To download and run a demo on your device, select your device and click the Example Projects & Demos tab in the Launcher perspective. Turn off the Example Projects switch to see only demos, and click RUN next to the demo to load.

The Zigbee EmberZNet SDK demos are:

3.2 Software Examples

Note: Examples provided for the EFR32xG12 and newer parts include Silicon Labs Gecko Bootloader examples. Examples are provided for all compatible Simplicity Studio SDKs. When configuring security for a Gecko Bootloader example, you must use Simplicity Commander, not the Simplicity Studio IDE interface. For more information on using the Gecko Bootloader see UG489: Silicon Labs Gecko Bootloader User's Guide for GSDK 4.0 and Higher.

3.2.1 Zigbee 3.0 Network

Some Zigbee EmberZNet software examples are specifically for SoC applications. If you are not familiar with the differences between System-on-Chip (SoC) and Network Coprocessor (NCP)/Radio Coprocessor (RCP) application models, see UG103.03: Application Development Fundamentals: Design Choices. For more information on Green Power Devices see UG392: Using Silicon Labs Green Power with Zigbee EmberZNet.

In the Debug Adapters view, select the device. The examples list is filtered by the selected device.

Click the EXAMPLE PROJECTS & DEMOS tab in the Launcher perspective. Under Technology Type, select Zigbee to see only Zigbee examples.

The Z3Light and Z3Switch applications were developed for specific development kit hardware. Use on other devices may require some GPIO remapping using the PIN tool. See the online Simplicity Studio v5 User's Guide for more information about using the PIN tool.

Press Button0 on the Switch device to initiate the network. The light device should bind to the network automatically. Once the switch has finished finding and binding, you can use Button0 as an On/Off toggle.

This may not be successful, because some timeouts are included in the button functionality. If so, use the Command Line Interface to set up the demo network. The CLI commands can be entered in the Serial Console, as described in section 4 Starting an Example Application.

Once the Z3Light app starts running, it makes many attempts to join a network, at the end of which it sets up its own distributed network. Once the Info command indicates that it is in a network (that is, has a PAN ID and Node ID), use the CLI command: plugin network-creator-security open-network

You should get the response: NWK Creator Security: Open network: 0x00

Now the device is ready for joining. In the Z3Switch App, instead of using the button, first make sure it has not joined any networks by issuing: network leave

Then you can enter the command: plug network-steering start 0

This will kick off the joining process.

3.2.2 Dynamic Multiprotocol

See AN1322: Dynamic Multiprotocol Development with Bluetooth and Zigbee in SDK 7.0 and Higher for more information on using these examples.

3.2.3 Green Power

3.2.4 NCP

3.2.5 Minimal Configuration

3.2.6 Testing

4 Working with Examples

In these instructions you will work with two example applications, Z3Light and Z3Switch. These steps illustrate both how to compile and load example applications and use the Simplicity Studio console interface to work with them, but also how to configure them using three configuration tools:

The following example procedures are provided. Each procedure builds on the next, so it is recommended to work through them in order.

Section 5 Using the Network Analyzer describes how to use Network Analyzer to observe traffic across the network.

These procedures are illustrated for a WSTK with an EFR32MG. Note: Your SDK version may be later than the version shown in the procedure illustrations.

4.1 Create and Load a Z3Light Application

SSv5 offers a variety of ways to begin a project using an example application. The online Simplicity Studio 5 User's Guide, available both through https://docs.silabs.com/ and the SSv5 help menu, describes them all. This procedure uses the File > New > Silicon Labs Project Wizard method, because it takes you through all three of the Project Creation Dialogs.

  1. Open SSv5's File menu and select New > Silicon Labs Project Wizard. The Target, SDK, and Toolchain Selection dialog opens. If you want to change the toolchain from the default GCC to IAR, do so here. Click NEXT.
  2. Note: If you have both IAR and GCC installed, GCC is the default.
  3. The Example Project Selection dialog opens. Use the Technology Type and Keyword filters to search for a specific example, in this case Z3Light. Select it and click NEXT.
  4. The Project Configuration dialog opens. Here you can rename your project, change the default project file location, and determine if you will link to or copy project files. Note that if you change any linked resource, it is changed for any other project that references it. Click FINISH.
  5. The Simplicity IDE perspective opens with the new project in Project Configurator view. If the project has a description with it, the focus is on the readme tab, otherwise the focus is on the General tab, shown in the following figure. See the online Simplicity Studio 5 User's Guide for details about the functionality available through the Simplicity IDE perspective and Project Configurator.
  6. Note: You now have a Simplicity IDE button next to the Launcher button in the upper right.
  7. Simplicity Studio automatically generates the project files needed to build the application image. If you are accustomed to using Simplicity Studio 6.x, note that this means there is no Generate button on the Project Configurator interface. The Force Generation button on the Project Details card is not a replacement, but rather to be used under conditions in which auto-generation fails to work.
  8. Files are created in the autogen folder, and are automatically updated when you make changes to the project configuration.
  9. Example applications are pre-configured to support the example functionality. To see the configuration, click the SOFTWARE COMPONENTS tab and search for the component of interest, for example 'device configuration'. Installed components are indicated by a check on the left. Configurable components are indicated by a gear icon on the right. Select the component to see more information about it.
  10. Note: All EFR32 parts have a unique RSSI offset. In addition, board, antenna and enclosure design can also impact RSSI. When creating a new project, install the RAIL Utility, RSSI component. This feature includes the default RSSI Offset Silicon Labs has measured for each part. This offset can be modified if necessary after RF testing of your complete product.
  11. Click CONFIGURE to open the Component Editor on a new tab. The configurable parameters are shown. In this case, it indicates that the Z3Light application is configured as a router. Close the Component Editor.
  12. Once you are ready to build the application, click the Build (hammer) control in the top tool bar. During the build, progress is reported both in a window, which can be run in the background, and also in the lower right. The process may take over a minute.
  13. Note: If the Build control isn't active, click the project directory or a file in it.
  14. Build completion is reported in the Build Console. The build should complete without errors. If any errors occur, they are highlighted in red in the console. Contact technical support for assistance.
  15. In the Project Explorer view, the binaries are shown in a new folder, Binaries.
  16. Right-click the <project>.s37 file, and select Flash to Device. If you have more than one device connected, you are prompted to select the target. Then the following dialog is displayed.
  17. Click Program. The binary is flashed to the target device.
  18. In the Debug Adapters view, right-click the Z3Light device and select Launch Console. In the console window, you will see four tabs: Serial 0 (the Virtual UART interface), Serial 1 (the physical UART interface), Admin (where you can configure the debug adapter such as the WSTK for EFR32), and Debug (where you see raw binary data over the debug interface). Click the Serial 1 tab. Type 'info' and press enter.

The application has created a distributed network with three endpoints, the last being the Green Power endpoint.

Note: During development you may make changes, work with the console, and then make other changes. While you can load a fresh application image with the device connected, you may have to repair the connection. Alternatively, disconnect from the console by right-clicking the device and selecting Disconnect.

If you have multiple devices connected, the device context menu also contains a Rename selection, which you can use to better identify the device roles.

4.2 Create and Load a Z3Switch Application

The Z3Switch example procedure follows a slightly different path than that illustrated for Z3Light. Use this shorter path if you do not need to modify devices or compilers.

  1. Click Launcher in the upper right to return to the Launcher perspective.
  2. In the Debug Adapters view, select the Switch device.
  3. Go to the EXAMPLE PROJECTS & DEMOS tab, and click CREATE next to the Z3Switch application.
  4. This opens the third of the three project creation dialogs illustrated in the Z3Light process. Change any values you wish to change, and click FINISH.
  5. The project opens. All files are autogenerated. The Z3Switch application is configured as an end device.
  6. Click the Build (hammer) control to build the application.
  7. When the build is complete, right-click the <project>.s37 file and select Flash to Device. Click Program.
  8. When upload is complete, right-click the Switch device and select Launch Console. Select the Serial 1 tab, and enter 'info'. The output should resemble the following. The switch has not yet joined a network.

4.3 Create a Distributed Network and Issue Commands

Once you have downloaded both the light and switch applications to different radio boards, you can create a network. Make sure that the switch device is physically close to the light device.

To see the process from beginning to end, close the distributed network created automatically on the Z3Light device. In the Z3Light console, enter:

> network leave

Then form the network:

> plugin network-creator start 0

Open the network for joining:

> plugin network-creator-security open-network

You now have 55 seconds to join the switch to the open network. On the Z3Switch console, enter:

> plugin network-steering start 0

Enter 'info' on both devices and you will see that both the light and switch are on the same PAN ID.

To send a command from the switch to the light, first build the toggle command and load it into a TX buffer:

> zcl on-off toggle

Then send the command to the light, using the device's Node ID (also known as the short ID), which is 0x0738. To toggle the device's LED on and off, on the Z3Switch device enter:

> send 0x0738 1 1

The light console should show: T00000000:RX len 3, ep 01, clus 0x0006 (On/off) FC 01 seq 01 cmd 02 payload[]
On/Off set value: 01 02
Toggle on/off from 00 to 01

On the WSTK board, LED1 should turn on.

4.4 Change to a Centralized Network

In a distributed network, any router can issue network security keys. In a centralized network, a coordinator has the functionality of a Trust Center. Each node that joins is authenticated by the Trust Center before it can join the network. The coordinator is always node ID 0x0000.

To change Z3Light to a Coordinator:

  1. Go to the Z3Light.slcp tab.
  2. On the SOFTWARE COMPONENTS tab, search for 'device config'.
  3. Select the Zigbee Device Config component and click Configure.
  4. Change the Primary Network Device Type to 'Coordinator or Router'. The change is saved automatically.
  5. All coordinators must also have Concentrator functionality. Close the Component Editor and, back on the Software Components tab, search for 'concentrator'.
  6. Select the Concentrator Support component and click Install. Changes are saved automatically.
  7. In the Project Explorer view, select Z3Light and click the Build (hammer) icon.
  8. When build is complete, right-click the Z3Light device and click Disconnect.
  9. When the build is complete, right-click the <project>.s37 file and select Flash to Device. Click Program.
  10. Launch the console for the Z3Light device.

Next, take down the distributed network and start the centralized network.

> network leave

Then form the network:

> plugin network-creator form 1 0xfeed 20 11

Open the network for joining:

> plugin network-creator-security open-network

You now have 55 seconds to join the switch to the open network. On the switch device:

> network leave
> plugin network-steering start 0

Enter 'info'. The PAN ID is that specified, and the parent ID is 0x0000.

To send a command from the switch to the light, first build the toggle command and load it into a TX buffer:

> zcl on-off toggle

Then send the command to the light, using the device's Node ID 0x0000. To toggle the device's LED on and off, on the Z3Switch device enter:

> send 0 1 1

The light console should reflect the command and, on the WSTK board, LED1 should toggle from its previous state.

4.5 About the Zigbee Cluster Configurator

Additional customizations can be made through the Zigbee Cluster Configurator. Using this tool is described in detail in AN1325: Zigbee Cluster Configurator User's Guide.

4.6 About Bootloaders

All Silicon Labs examples require that a bootloader be installed. A bootloader is a program stored in reserved flash memory that can initialize a device, update firmware images, and possibly perform some integrity checks. Silicon Labs networking devices use bootloaders that perform firmware updates in two different modes: standalone (also called standalone bootloaders) and application (also called application bootloaders). An application bootloader performs a firmware image update by reprogramming the flash with an update image stored in internal or external memory. For more information about bootloaders see UG103.6: Application Development Fundamentals: Bootloading.

In March of 2017, Silicon Labs introduced the Gecko Bootloader, a code library configurable through Simplicity Studio's IDE to generate bootloaders that can be used with a variety of Silicon Labs protocol stacks. The Gecko Bootloader is used with all EFR32xG parts.

The Gecko Bootloader works with a specialized firmware update image format, ending in the extension .gbl (the GBL file). To create a GBL file from an .s37 or binary, follow the instructions in UG162: Simplicity Commander Reference Guide, section 6.7.1, GBL File Creation. The exact format of the GBL file depends on the hardware you selected.

Note: When working with the Gecko Bootloader, you must use Simplicity Commander to enable some configuration option such as security features. See UG489: Silicon Labs Gecko Bootloader User's Guide for GSDK 3.3 and Higher.

By default, a new device is factory-programmed with a bootloader. If you have a new device, haven't cleared the bootloader region for your part or have a supported bootloader image already flashed on your device, you do not need to flash a bootloader. Once you have installed a bootloader image, it remains installed until you erase the device.

If you need to load a bootloader, select an example, such as SPI Flash Storage Bootloader (single image), and build it and flash it as described above. For more information about the Gecko Bootloader, see UG489: Silicon Labs Gecko Bootloader User's Guide for GSDK 4.0 and Higher.

5 Using the Network Analyzer

Now that your network is set up, you can evaluate the data being transmitted using the Network Analyzer tool. Network Analyzer helps you debug network connectivity by displaying radio packets and certain debug interface events in a format that is easy to visualize and analyze. See the online Simplicity Studio User's Guide for more information.

  1. Click the Launcher button in the upper right and select Network Analyzer from the Tools menu. The Network Analyzer opens with your console window(s) still displaying data.
  2. Make sure that Network Analyzer is set to decode the correct protocol. Select Window > Preferences > Network Analyzer > Decoding > Stack Versions, and verify it is set correctly. If you need to change it, click the correct stack, click Apply, and then OK.
  3. Note: If you are working with a Zigbee+Bluetooth Dynamic Multiprotocol application, Auto-detecting decoder stack must be selected.
  4. To make sure that packets decode correctly, manually enter the NWK key. In either the Switch or Light console window, type the following, being sure to include the 's' in 'keys': Keys print
  5. In the information returned, find the network key and copy it: NWK Key: EF DE 0C 69 5B 72 6E C4 41 27 C6 E6 F1 36 26 26
  6. In Window > Preferences, open Network Analyzer > Decoding > Security Keys, click New, name the new entry, and paste the copied key into it. Click Apply. Click OK to leave.
  7. Right-click on the light or the switch device, and select Start Capture. Do the same for the other device.
  8. If you are in an environment with a number of wireless devices, you may have a very noisy Network Analyzer environment, as reflected both in the event traffic and in the map. To show additional information in the map, click on the map.
  9. On the toolbar, click the PAN ID button, circled in the following image.
  10. Right-click on the representation of your Switch device (the dot that has the same ISA3 adapter name or WSTK name or J-Link serial number as the device) and select Show only this PAN.

To filter transactions:

  1. Press button 0 on the switch to get a complete transaction (in blue).
  2. Click on one of the blue transactions.
  3. In the Event Detail, expand IEEE802.15.4 and scroll down until you see the Destination PAN ID
  4. Right-click on it, and select Add to filter.
  5. Apply the filter by clicking the icon next to the green filter expression field, circled in the following image.

Now when you press button 0 you can clearly see each event associated with the transaction.

When analyzing more complex networks, you can drag and reposition the items shown in the map. By right-clicking on a device, you can also show connectivity and add labels. Labelling is useful not only in map, but also in the log. To label the full log, click From beginning.

6 Next Steps

6.1 Example Applications

Explore configuring the example application to meet your needs. Much of the software configuration can be done through components and the Zigbee Cluster Configurator.

6.2 PIN Tool

Simplicity Studio offers a PIN tool that allows you to easily configure new peripherals or change the properties of existing ones. See the online Simplicity Studio v5 User's Guide: Pin Tool for more information.

6.3 Energy Profiler

You may also want to explore using the Energy Profiler tool. Energy Profiler provides energy debugging capability by displaying graphical real-time energy consumption information. This can be particularly useful for developing a low-power application. See the online Simplicity Studio 5 User's Guide: Energy Profiler for more information.

Models: QSG180 Zigbee EmberZNet SDK, QSG180, Zigbee EmberZNet SDK

File Info : application/pdf, 34 Pages, 3.87MB

PDF preview unavailable. Download the PDF instead.

qsg180-zigbee-emberznet-7x-quick-start-guide

References

Silicon Labs Adobe PDF Library 21.7.131

Related Documents

Preview Silicon Labs QSG106: Zigbee EmberZNet PRO Quick-Start Guide
A quick-start guide from Silicon Labs for developers on configuring, building, and installing applications for EFR32MG SoCs using the EmberZNet PRO stack and Simplicity Studio. Learn about development environment setup, examples, and key features for Zigbee wireless development.
Preview Silicon Labs Z-Wave 800 Thunderboard Quick Start Guide
A comprehensive guide to getting started with the Silicon Labs Z-Wave 800 Thunderboard (BRD2603A). Learn about its features, setup with Simplicity Studio, running demos, and Z-Wave network inclusion for IoT development.
Preview Simplicity Studio 5 User's Guide
Explore Silicon Labs' Simplicity Studio 5, a powerful integrated development environment (IDE) for IoT and embedded systems. This user guide covers installation, project configuration, debugging, energy profiling, network analysis, and protocol-specific tools for Silicon Labs microcontrollers and wireless SoCs.
Preview Zigbee EmberZNet SDK 7.0.2.0 GA Release Notes
Detailed release notes for the Zigbee EmberZNet SDK 7.0.2.0 GA, including new features, improvements, fixed issues, and known issues. Covers Gecko SDK Suite 4.0.
Preview Silicon Labs Bluetooth LE SDK 5.0.0.0 GA Release Notes
Detailed release notes for Silicon Labs Bluetooth LE SDK version 5.0.0.0 GA, covering new features, improvements, fixed issues, known issues, and multiprotocol capabilities for the Gecko SDK Suite 4.2.
Preview Simplicity Studio 5 Users Guide
A comprehensive user guide for Simplicity Studio 5, detailing its features, installation, project development, debugging, and advanced tools for Silicon Labs IoT portfolio.
Preview Zigbee EmberZNet SDK 7.4.3.0 GA Release Notes
Release notes for Silicon Labs' Zigbee EmberZNet SDK version 7.4.3.0 GA, part of Gecko SDK Suite 4.4, detailing new features, improvements, fixed issues, and known issues.
Preview UG103.2: Zigbee Fundamentals - A Comprehensive Guide to Zigbee Technology
This document provides a comprehensive overview of Zigbee fundamentals, covering its architecture, networking, routing concepts, mesh topologies, node types, the Zigbee Cluster Library (ZCL), Zigbee 3.0, and compliance. It is designed for project managers, application designers, and developers working with embedded wireless networking solutions from Silicon Labs.