Silicon Labs EmberZNet PRO Quick Start Guide

QSG106: Zigbee EmberZNet PRO Quick-Start Guide
This quick start guide provides basic information on configuring, building, and installing applications for the EFR32MG family of SoCs using the EmberZNet PRO stack v. 6.7.x with Simplicity Studio® 4 and the EmberZNet PRO stack v. 6.8.x and higher with Simplicity Studio 5
This guide is designed for developers who are new to EmberZNet PRO and the Silicon Labs development hardware. It provides instructions to get started using the example applications provided with the EmberZNet PRO stack.
KEY FEATURES
Product overview
Setting up your development environment
Installing Simplicity Studio and Em-
berZNet PRO
Creating an example application network
Using the Network Analyzer
silabs.com | Building a more connected world. Rev. 2.3
QSG106: Zigbee EmberZNet PRO Quick-Start Guide
Product Overview

1 Product Overview

Before following the procedures in this guide you must have
Purchased your EFR32MG Mesh Networking Kit (see http://www.silabs.com/products/wireless/mesh-network-
ing/zigbee/Pages/zigbee.aspx ).
Downloaded the required software components, as described below. A card included in your development hardware kit contains a link to a Getting Started page, which will direct you to links for the Silicon Labs software products.
Note on Simplicity Studio Versions and Terminology:
EmberZNet PRO SDK v 6.8.0 was released with, and is only compatible with, Simplicity Studio 5 (SSv5). Among many improvements SSv5 introduced the Simplicity Studio 5 User’s Guide, available online at https://docs.silabs.com/ and through SSv5’s help menu. Stand­ard information, such as how to download SSv5 and the EmberZNet PRO stack and descriptions of SSv5 features and functions, are provided in that guide, and are not repeated here. Throughout this document, “Simplicity Studio” means the information is generic across Simplicity Studio 4 (SSv4) and SSv5.
SSv5 introduces a new user workspace. As a result, Ember ZNet projects that were developed in Ember ZNet 6.7.x and Simplicity Studio 4 must be migrated over to the new workspace, after which they can be upgraded to Ember ZNet 6.8. See Section 1.6 Migrating an
Ember ZNet Project from Simplicity Studio 4 to Simplicity Studio 5 for details.

1.1 Software Components

See the stack release notes for version restrictions and compatibility constraints for the stack and these components. To develop Em­berZNet PRO applications, you will need the following.
Simplicity Studio 5 (SSv5) (for stack version 6.8.x and higher) or Simplicity Studio 4 (SSv4) (for stack version 6.7.x). Simplicity Studio is the core development environment designed to support the Silicon Labs IoT portfolio of system-on-chips (SoCs) and modules. It provides access to target device-specific web and SDK resources; software and hardware configuration tools; an integrated develop­ment environment (IDE); and advanced, value-add tools for network analysis and code-correlated energy profiling. EmberZNet PRO uses AppBuilder as the code configuration tool in Simplicity Studio. Online help for AppBuilder and other Simplicity Studio modules is provided.
The EmberZNet PRO stack, an advanced implementation of a Zigbee stack, installed through Simplicity Studio. The stack API is documented in an online API reference. The stack is delivered as a collection of libraries that you can link to your applications. A description of each library is provided in the development environment. The release notes contain details on the folders installed along with their contents.
Simplicity Commander, installed along with Simplicity Studio. A GUI with limited functionality can be accessed through Simplicity Studio’s Tools menu. Most functions are accessible through a CLI invoked by opening a command prompt in the Simplicity Com­mander directory (\SiliconLabs\SimplicityStudio\v4\developer\adapter_packs\commander). See UG162: Simplicity Commander Ref- erence Guide for more information.
Compiler toolchain:
GCC (The GNU Compiler Collection) is provided with Simplicity Studio. GCC is used in this document. However, you must use
IAR to compile the following:
A part with less than 512 kB, such as the EFR32xG1Any of the Dynamic Multiprotocol examples
Note: Application images created with GCC are larger than those created with IAR. If you use GCC to compile the example applications in this SDK, you must use a part with at least 512 kB of flash.
IAR Embedded Workbench for ARM (IAR-EWARM).
Note: See the SDK Release Notes for the IAR version supported by this version of the EmberZNet SDK. Download the supported version from the Silicon Labs Support Portal, as described in section 1.5 Using IAR as a Compiler. Refer to the “QuickStart Installation Information” section of the IAR installer for additional information about the installation process and how to configure your license. Once IAR-EWARM is installed, the next time Simplicity Studio starts it will automatically detect and configure the IDE to use IAR-EWARM.
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.
silabs.com | Building a more connected world. Rev. 2.3 | 2
QSG106: Zigbee EmberZNet PRO Quick-Start Guide
Product Overview

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

1.2.1 SSv5

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.2.2 SSv4

Access is through the Resources tab, as described in section 8.6 Accessing Documentation and Other Resources.

1.3 Documentation

Documentation is accessed through Simplicity Studio. Simplicity Studio filters documentation based on the connected or selected part.
silabs.com | Building a more connected world. Rev. 2.3 | 3
QSG106: Zigbee EmberZNet PRO Quick-Start Guide
Product Overview

1.3.1 SSv5

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 EmberZNet PRO SDK.
silabs.com | Building a more connected world. Rev. 2.3 | 4
QSG106: Zigbee EmberZNet PRO Quick-Start Guide
Product Overview

1.3.2 SSv4

Stack documentation is accessed as described in section 8.6 Accessing Documentation and Other Resources. SSv4 also provides links to hardware documentation and other application notes. See the release notes for further details about the EmberZNet PRO software.

1.4 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 mbedTLS. Application developers using EmberZNet plugins, Hardware Configurator interface, 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 release notes that can be found in Simplicity Studio’s Launcher perspective.
SSv5: On the DOCUMENTATION tab, filter by Resource Type: Release Notes
SSv4: On the Getting Started tab, under SDK Documentation, Release Notes

1.5 Using IAR as a Compiler

If you plan to use IAR as your compiler (required for dynamic multiprotocol and Micrium OS examples), find the Release Notes on the SDK Documentation list and check for software version requirements, in particular for IAR-EWARM. To install IAR-EWARM:
1. Go to the Customer Support portal as described in section 1.2 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 appro-
priate 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.

1.6 Migrating an Ember ZNet Project from Simplicity Studio 4 to Simplicity Studio 5

Simplicity Studio 5 (SSv5) introduces a new user workspace. As a result, Ember ZNet projects that were developed in Ember ZNet 6.7 and Simplicity Studio 4 must be migrated over to the new workspace, at which point they can be upgraded to Ember ZNet 6.8.
Follow this procedure to move projects and compile them with Ember ZNet 6.8 under Simplicity Studio V5.
1. Install SSv5. When you run SSv5, it creates a new workspace called the “v5_workspace” for example:
/Users/<username>/SimplicityStudio/v5_workspace/
2. Locate your previous project. If it was created in Ember ZNet 6.7 and you used the default location you will see it in the Simplicity
Studio v4 workspace. For example:
/Users/<username>/SimplicityStudio/v4_workspace/
3. Create a temporary directory inside the v5_workspace called <project name>_temp for your important application-specific files.
4. Copy the project’s “.isc”, “.hwconf” and “callbacks.c” file into the new temporary directory. In addition, copy any other application-
specific files you have created into this directory.
5. Start SSv5.
silabs.com | Building a more connected world. Rev. 2.3 | 5
QSG106: Zigbee EmberZNet PRO Quick-Start Guide
Product Overview
6. Select File > Import… and browse to the temporary directory containing your copied files. You should have the option of importing
the project as an “External Project Type”.
7. Import the project. Be sure to set the stack to the EmberZNet 6.8 stack. The project name should default to the original name of the
project, in this case Z3LightSoc.
8. You should see the project inside the Simplicity Studio IDE.
9. Copy the files out of your <projectname>_temp directory into your actual project directory by right-clicking the files in Simplicity Studio
and choosing “Copy Linked Files into Project”.
10. Double click the .isc file in the Simplicity Studio to open the project in AppBuilder.
11. Change the generation directory from the old <v4_workspace>/<project name> directory to your project directory inside your new V5
workspace. In the example this is
/Users/<username>/SimplicityStudio/v5_workspace/Z3LightSoc
12. Be sure to change the path to any “Included” files in your project by modifying the Includes Tab as necessary.
13. Generate the application.
14. Compile the application.
silabs.com | Building a more connected world. Rev. 2.3 | 6
QSG106: Zigbee EmberZNet PRO Quick-Start Guide
Set Up Your Development Environment

2 Set Up Your Development Environment

2.1 Connect the WSTK

Connect your WSTK, with radio board mounted, to your PC using a USB cable. By having it connected when Simplicity Studio installs, Simplicity Studio will automatically obtain the relevant additional resources it needs.
Note: For best performance in Simplicity Studio, be sure that the power switch on your WSTK is in the Advanced Energy Monitoring or “AEM” position as shown in the following figure.
Figure 1. EFR32MG12 on a WSTK

2.2 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. In order to install the EmberZNet PRO stack from Simplicity Studio, you must also register your kit on https://siliconlabs.force.com/KitRegistration, using your EFR32MG Kit serial number (you must be logged into your Salesforce account for this link to resolve). You can also register your kit through Simplicity Studio during installation if you prefer.
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.3 Install Simplicity Studio and the EmberZNet PRO Stack

Ember ZNet PRO v6.8.x and Simplicity Studio 5: SSv5 and stack installation and getting started instructions along with a set of detailed
references can be found in the online Simplicity Studio 5 User’s Guide, available on https://docs.silabs.com/ and through the SSv5 help menu.
silabs.com | Building a more connected world. Rev. 2.3 | 7
QSG106: Zigbee EmberZNet PRO Quick-Start Guide
Set Up Your Development Environment
EmberZNet PRO v6.7.x and Simplicity Studio 4: SSv4 and stack installation instructions and a Launcher perspective overview may be found in APPENDIX: SSv4 Installation and Overview.
silabs.com | Building a more connected world. Rev. 2.3 | 8
QSG106: Zigbee EmberZNet PRO Quick-Start Guide
About Demos and Examples

3 About Demos and Examples

Because starting application development from scratch is difficult, the 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 EFR32MG12 on either board 4161A or 4162A. You will not see the demos in 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 Device view. To download and run a demo on your device:
In SSv5: Select your device, click on 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..
silabs.com | Building a more connected world. Rev. 2.3 | 9
QSG106: Zigbee EmberZNet PRO Quick-Start Guide
About Demos and Examples
In SSv4: Drop down the demo list and click the demo. In the Mode drop-down in the next dialog, select Run. Click Start.
The EmberZNet demos are:
Simple Zigbee 3.0 Network
Z3Light: Zigbee 3.0 Light application. Z3Switch: Zigbee 3.0 Switch application.
For the Light and Switch demos, 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 the final step of the section 4.3 Config-
uration and Generation.
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 pJoin for 254 sec: 0x00 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.
Dynamic Multiprotocol
DynamicMultiprotocolLight, DynamicMultiprotocolLightSed, and DynamicMultiprotocolSwitch: Companion applications demon-
strating Zigbee/Bluetooth LE dynamic multiprotocol functionality on specified development kit hardware. See QSG155: Using the Silicon Labs Dynamic Multiprotocol Demonstration for instructions on using the demos, and the development kit hardware that supports them.
silabs.com | Building a more connected world. Rev. 2.3 | 10
QSG106: Zigbee EmberZNet PRO Quick-Start Guide
About Demos and Examples

3.2 Software Examples

Note: Examples provided for the EFR32xG12 and newer parts include Silicon Labs Gecko Bootloader examples. Examples are pro-
vided 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 UG266: Silicon Labs Gecko Bootloader User Guide.
Some 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) 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 EmberZNet PRO.
You can start an example from the list on the Launcher perspective, as described in section 4 Starting an Example Application. This list is filtered by the selected device.
To see all examples, including the Host and NCP examples:
In SSv5: Click File > New > Project. Drop down the Simplicity Studio group and select Silicon Labs AppBuilder Project.
In SSv4: Click File > New Project > Silicon Labs AppBuilder > Project.
If you access examples in this way, the NCP examples are based on the Customizable network coprocessor (NCP) applications type, and the SoC and Host examples are based on the Silicon Labs Zigbee type. Be sure to check the complete example description for any platform restrictions.
Note: The checkbox “Start with a blank application” on the screen listing the applications produces an incorrectly-configured starting project, and should not be used. Instead, start with the ZigbeeMinimal example.
The following descriptions group related examples together. Examples followed by (SoC) or (Host) are available through the Silicon Labs Zigbee\EmberZNet <version> SoC or EmberZNet <version> Host stacks, respectively. Examples followed by (NCP) are avail­able through Customizable network coprocessor (NCP) applications. Examples followed by (GP) are available through Green Power
Device Framework.

3.2.1 Zigbee 3.0 Network

For network formation instructions, see the corresponding demos in the section above.
The Z3Light and Z3Switch applications were developed for specific development kit hardware. Use on other devices may require some GPIO remapping using the Hardware Configurator tool, described in section 7.2 Hardware Configurator.
Z3Light (SoC): Zigbee light application. Acting as a router it can form a distributed network. Acting as a touchlink target it can touchlink with the Z3Switch, which is acting as a touchlink initiator.
Z3LightGPCombo (SoC): Zigbee light application with Green Power combo basic functionality.
Z3Switch (SoC): Zigbee switch application, acting as an end device, can join the network.
Z3Gateway (Host): Simple gateway application that can form a centralized network, and the light and the switch can join the centralized
network by performing network steering.

3.2.2 Dynamic Multiprotocol Demonstration

These applications are the source for the EmberZNet/Bluetooth dynamic multiprotocol demos described in QSG155: Using the Silicon Labs Dynamic Multiprotocol Demonstration. AN1133: Dynamic Multiprotocol Development with Bluetooth and Zigbee contains a summary
procedure for these examples, describes how to change configuration settings to make an EmberZNet application into a dynamic multi­protocol application, and contains details on the functionality underlying this demo. All applications are configured with NVM3 for persistent storage. These applications were developed for specific development kit hardware. Use on other devices may require some GPIO re­mapping using the Hardware Configurator tool, described in section 7.2 Hardware Configurator.
DynamicMultiprotocolLight (SoC): Demonstrates the Zigbee and Bluetooth stacks running concurrently as MicriumOS tasks.
DynamicMultiprotocolLightSed (SoC): Demonstrates the Zigbee and Bluetooth stacks running concurrently as MicriumOS tasks. The
Light is configured as a Zigbee Sleepy End Device (SED) and searches for a network to join.
silabs.com | Building a more connected world. Rev. 2.3 | 11
QSG106: Zigbee EmberZNet PRO Quick-Start Guide
About Demos and Examples
DynamicMultiprotocolSwitch (SoC): This application only uses Zigbee and is not a dynamic multiprotocol application itself. It is to be used with the DynamicMultiprotocolLight sample to demonstrate the control of a dynamic multiprotocol device from a Zigbee network.

3.2.3 Host/NCP Applications Controlling an LED

XncpLed (Host): Presents a HOST application for communicating with an NCP application using custom EZSP commands. It is meant
to be used with the NCP sample application xNCP LED.
xNCP LED (NCP): Presents an NCP application for communicating with a UNIX HOST using custom EZSP commands. This application is meant to be used with the HOST sample application XncpLed.

3.2.4 NCP Application Examples

All applications can be built as configured, or optionally can be augmented with customizations for target hardware, initialization, main loop processing, event definition/handling, and messaging with the host.
NCP SPI (NCP): This NCP application supports communication with a host application over an SPI interface.
NCP UART HW (NCP): This NCP application supports communication with a host application over a UART interface with hardware flow
control.
NCP UART SW (NCP): This NCP application supports communication with a host application over a UART interface with software flow control.

3.2.5 Green Power Device

Green Power Device: Green Power Device example.
Green Power Sensor: Green power sensor device that reports periodically.

3.2.6 Minimal Configuration

ZigbeeMinimal (SoC): This is a Zigbee minimal network-layer application suitable as a starting point for new application development.

3.2.7 Testing

StandardizedRfTesting: This is a pre-standardization implementation of Zigbee's RF testing standard. It utilizes the TIS (Total Isotropic
Sensitivity)/ TRP (Total Radiated Power) testing interfaces and is optional for Zigbee certifications.
silabs.com | Building a more connected world. Rev. 2.3 | 12
QSG106: Zigbee EmberZNet PRO Quick-Start Guide
Starting an Example Application

4 Starting an Example Application

In these instructions you will compile and load two example applications, Z3Light and Z3Switch. Section 5 Creating a Network describes how to use the examples to create a network. Section 6 Using the Network Analyzer describes how to use Network Analyzer to observe traffic across the network.
When working with example applications in Simplicity Studio, you will first execute the following steps:
1. Select an example application.
2. Generate application files.
3. Compile and flash the application (and, the first time, a bootloader) to the radio board.
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.
Note: SDK version 6.0 and later contain a number of changes to the way hardware peripherals are configured and managed. You may see the following dialog when you open an example or generate code. Always click Yes.
The procedure to create a project based on an example application is different in SSv5 and SSv4. Once the project is created, the process is the same. The only difference is that SSv5 has a toolbar available that SSv4 does not.
SSv5:
SSv4:
silabs.com | Building a more connected world. Rev. 2.3 | 13
QSG106: Zigbee EmberZNet PRO Quick-Start Guide
Starting an Example Application

4.1 Starting an Example in SSv5

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 guide 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.
Note: If you have both IAR and GCC installed, GCC is the default. Note that if you are compiling the example for a part with less than 512 kB, such as the EFR32xG1, or you are compiling the Dynamic Multiprotocol Light(s) or Switch examples, you must use IAR.
silabs.com | Building a more connected world. Rev. 2.3 | 14
QSG106: Zigbee EmberZNet PRO Quick-Start Guide
Starting an Example Application
2. The Example Project Selection dialog opens. Use the Technology Type and Keyword filters to search for a specific example, in this
case Z3Switch. Select it and click NEXT.
silabs.com | Building a more connected world. Rev. 2.3 | 15
QSG106: Zigbee EmberZNet PRO Quick-Start Guide
Starting an Example Application
3. 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.
silabs.com | Building a more connected world. Rev. 2.3 | 16
QSG106: Zigbee EmberZNet PRO Quick-Start Guide
Starting an Example Application
4. The Simplicity IDE perspective opens with the new project in AppBuilder view, and the focus on the General tab. See the online
Simplicity Studio 5 User’s Guide for details about the functionality available through the Simplicity IDE perspective and AppBuilder.
Note: You now have a Simplicity IDE button next to the Launcher button in the upper right.
silabs.com | Building a more connected world. Rev. 2.3 | 17
Loading...
+ 38 hidden pages