Silicon Laboratories Z3GatewayFreeRTOS User manual

silabs.com | Smart. Connected. Energy-friendly Rev. 1.0.2
Quick Start Guide:
Build Z3GatewayFreeRTOS Cloud Gateway
Example on AmebaD SDK and Run on LCGW
This article serves as a quick guidance for users wishing to build
Silicon Labs’ Z3GatewayFreeRTOS cloud gateway example
application on Realtek’s AmebaD Wi-Fi SDK.
Silicon Labs’ EFR32MG21/MG13 is used as the Zigbee NCP
while the targetted NCP host is Realtek RTL872xCS/DN Wi-Fi
SoC.
This document is aligned with the v1.0.x release of the
Z3GatewayFreeRTOS Library and the cloud gateway application example source-codes.
KEY FEATURES
•Hardware and firmware preparations
•Source-code generation and compilation on
amebaD sdk
•Flasing AmebaD application firmware on LCGW
•Runing example cloud gateway application

Hardware and Firmware Preparations
silabs.com | Smart. Connected. Energy-friendly Rev. 1.0.2 | 1
| 1
Table of Content
1Hardware and Firmware Preparations ........................................................................................................... 2
1.1 The Following Hardware are Needed.................................................................................................................... 2
1.2 NCP Firmware Preparation.................................................................................................................................... 3
1.3 NCP Firmware Programming ................................................................................................................................. 3
2Build Environment Preparation and Source-code Compiling on AmebaD SDK............................................... 5
2.1 Set up Linux Build Environment for AmebaD SDK................................................................................................. 5
2.2 Generate and Compile Z3GatewayFreeRTOS Library Source Code Package on AmebaD SDK ............................. 6
3Flash the AmebaD Firmware Application ....................................................................................................... 8
3.1 Flash the AmebaD Application Firmware Binaries ................................................................................................ 8
4Run the Aliyun Gateway Example Application................................................................................................ 9
4.1 Download Alibaba Cloud Intelligence Mobile Phone App..................................................................................... 9
4.2 Mobile Phone App Provision Wi-Fi to LCGW and Add it to Aliyun........................................................................ 9
4.3 Adding Zigbee Light to network and Aliyun ........................................................................................................ 14
4.4 Adding Zigbee Switch to Network and Aliyun ..................................................................................................... 18
4.5 Important Notice ................................................................................................................................................. 22
4.6 Further Reference................................................................................................................................................ 24
5AmebaD AT commands and Z3GatewayFreeRTOS CLI commands .............................................................. 25
5.1 AmebaD Console AT commands.......................................................................................................................... 25
5.2Gateway CLI Console Commands ........................................................................................................................ 25
6Document Revision History ........................................................................................................................... 27
Revision 0.1....................................................................................................................................................................... 27
Revision 0.2....................................................................................................................................................................... 27
Revision 1.0....................................................................................................................................................................... 27
Revision 1.0.1.................................................................................................................................................................... 27
Revision 1.0.2.................................................................................................................................................................... 27

Hardware and Firmware Preparations
silabs.com | Smart. Connected. Energy-friendly Rev. 1.0.2 | 2
| 2
1 Hardware and Firmware Preparations
1.1 The Following Hardware are Needed
•LCGWv2 Kit
•LCGWv2 board jumpers:
Jumpers
oP7: Default shorted to enable AmebaD log message
and firmware upgrade over USB
oP8: Mini-simplicity TX, RX pins route to Zigbee module
NCP or AmebaD log UART
Wi-Fi J-Link
oRemove R24 to enable Wi-Fi SWD (disconnects
SWD_CLK from NCP reset circuit)
Zigbee CLI over Mini-Simplicity header
oRemove R30, R31 to disconnect NCP UART from
AmebaD host UART
•WSTK BRD4001A Kit with BRD8010A debug adaptor (please refers to UG386: EFR32xG21 2.4 GHz 10 dBm Wireless Starter
Kit User's Guide)
10-pin
Mini-Simplicity
Header
Zigbee
module
FT232
DC-DC
Push Button x 3
PTA pins
Mini-Simplicity
Wi-Fi
SWD
+5V
USB
Wi-Fi/BT
module
LED x 3

Hardware and Firmware Preparations
silabs.com | Smart. Connected. Energy-friendly Rev. 1.0.2 | 3
| 3
1.2 NCP Firmware Preparation
•Please refer to User Guide document of “NCP and Bootloader Firmware Customization for LCGW”
1.3 NCP Firmware Programming
•There should be a factory firmware in the Zigbee NCP chip in the LCGWv2 Kit. To reprogram the firmware:
Note: Make sure Wi-Fi module Ameba firmware has been flashed (refer to section 3.1) before flashing the NCP firmware.
1. Open the bottom plaster cover of the LCGWv2 kit
2. Plug in BRD8010A debug adaptor on to WSTK BRD4001A
3. Connect the 10-pin mini-simplicity cable on BRD8010A debug adaptor
4. Connects the WSTK to a PC with latest Simplicity Studio/Simplicity Commander installed
5. Plug in the other end of mini-simplicity cable onto LCGWv2 P3 header (note for probe pin 1 orientation)
6. Open the Simplicity Commander select from top “Adapter” J-Link Device your USB connected WSTK, click “Connect”

Hardware and Firmware Preparations
silabs.com | Smart. Connected. Energy-friendly Rev. 1.0.2 | 4
| 4
7. In “Kit” UI, change the debug mode of WSTK to “OUT”mode as below and then click the top “Target”“Connect”. Com-
mander should able to identify the target device to be “EFR32MG21A02F1024”.
8. Switch to “Flash” UI, browse to select the NCP .s37 file, e.g. ncp-hw-znet655_pta.s37, and then click “Flash” to flash the
firmware binary. It is optional to click “Erase chip” first, browse and flash the Bootloader .s37 file then the NCP.s37 file
sequentially onto the LCGWv2 HW.

Build Environment Preparation and Source-code Compiling on AmebaD SDK
silabs.com | Smart. Connected. Energy-friendly Rev. 1.0.2 | 5
| 5
2 Build Environment Preparation and Source-code Compiling on AmebaD SDK
There are two versions of Realtek’s AmebaD FreeRTOS SDK, namely the public version and the NDA version:
▪Public version: github on https://github.com/ambiot/ambd_sdk
▪NDA version: Required signed NDA, please contact Realtek, its distributors or its IDHs for details
Silicon Labs’ Z3GatewayFreeRTOS library and the Aliyun gateway example could be built on top of both the public version Ame-
baD SDK and the NDA version SDK. The difference is that the RTL872xCS/DN Wi-Fi and EFR32MG13/MG21 Zigbee 2.4GHz ISM
band PTA coexistence is only available on the NDA version AmebaD SDK through a SW-PTA patch applied on it.
2.1 Set up Linux Build Environment for AmebaD SDK.
Public version AmebaD SDK:
•Git clone Realtek’s public version AmebaD SDK repository to local folder, e.g. user root ~
$ cd ~
$ git clone https://github.com/ambiot/ambd_sdk.git
$ cd ambd_sdk
•Aliyun gateway application example in the LCGW v1.0.x GA release package is built on top of AmebaD SDK’s latest commit
d64c72293cd6d4b75f6b6f37eaa61376e1290e9c dated Jan 20, 2020, run below if your cloned repository is not the case:
$ git reset --hard d64c72293cd6d4b75f6b6f37eaa61376e1290e9c
•Fix some bash shell and python scripts whose executable mode were not set correctly when running on Linux:
$ chmod +x ~/ambd_sdk/project/realtek_amebaD_va0_example/GCC-RELEASE/project_lp/asdk/gnu_utility/prepend_header.sh
$ chmod +x ~/ambd_sdk/project/realtek_amebaD_va0_example/GCC-RELEASE/project_lp/asdk/gnu_utility/image_tool/imagetool.sh
$ chmod +x ~/ambd_sdk/project/realtek_amebaD_va0_example/GCC-RELEASE/project_lp/asdk/gnu_utility/pad.sh
$ chmod +x ~/ambd_sdk/project/realtek_amebaD_va0_example/GCC-RELEASE/project_hp/asdk/gnu_utility/prepend_header.sh
$ chmod +x ~/ambd_sdk/project/realtek_amebaD_va0_example/GCC-RELEASE/project_hp/asdk/gnu_utility/image_tool/imagetool.sh
$ chmod +x ~/ambd_sdk/project/realtek_amebaD_va0_example/GCC-RELEASE/project_hp/asdk/gnu_utility/pad.sh
$ chmod +x ~/ambd_sdk/project/realtek_amebaD_va0_example/GCC-RELEASE/project_hp/asdk/code_analyze.py
NDA version AmebaD SDK:
•Please contact Realtek, its distributor for the NDA version AmebaD SDK and related patches including the SW-PTA patch
•Extract Realtek official sdk-amebad_v6.2b SDK, i.e. "00016286-sdk-amebad_v6.2b-RC.tar.bz2" to a local folder, e.g. ~
•Apply the necessary AmebaD SDK patches to the SDK local folder, e.g. sdk-amebad_v6.2b, including
1. "00016574-v6.2b_intergrated_critical_patch_gcc_IAR_v39533.zip"
2. "00017141-v6.2b_critical_patch_gcc_IAR_v39533_v40238.zip"
3. “20200324_6.2b_other_patch_sw_pta_for_gongniu_r41263.zip”(this is the SW-PTA patch required)
Reference material:
Please refer to Realtek AmebaD SDK document, AN0400 Ameba-D Application Note to compile and flash download:
https://www.amebaiot.com/en/sdk-download-manual-8722dm/
•We recommend Ubuntu 18.04 for Linux env development, it can be native Linux or a Virtual Machine Linux client, while Windows
10 WSL Linux is not recommended. BTW, Cywin 32-bit under Windows will also work but the build building time is much longer.
▪Note: You need to install 32-bit version of build packages on your Ubuntu 18.04 64-bit system as below
$ sudo apt-get update
$ sudo apt-get install build-essential gcc-multilib gcc-4.8-multilib g++-multilib
g++-4.8-multilib lib32z1 lib32ncurses5 libc6-dev libgmp-dev libmpfr-dev libmpc-dev
$ sudo dpkg --add-architecture i386
•After AmebaD environment setup, it is good to build the default sample project realtek_amebaD_va0_example and flash the
built binaries on to LCGWv2 kit to see if everything is ok before moving to the next step

Build Environment Preparation and Source-code Compiling on AmebaD SDK
silabs.com | Smart. Connected. Energy-friendly Rev. 1.0.2 | 6
| 6
2.2 Generate and Compile Z3GatewayFreeRTOS Library Source Code Package on AmebaD SDK
•Installation of Simplicity Studio v4 and the Gecko SDK on Linux
To build the z3 controller software in AmebaD, we need to start with Simplicity Studio Linux version, we can download the
package from www.silabs.com
a) Extract the downloaded SimplicityStudio-v4.tgz into a local folder
b) Make sure the current user is a sudoer, go to the local folder and run setup:
$ cd SimplicityStudio_v4/
$ sudo ./setup.sh
c) After setup, you should have a Simplicity Studio icon in your application list:
d) Click the Simplicity Studio icon to run the Studio
e) You will be asked to agree the licenses, login, and then the software update process will auto start.
f) When the installation manager pops up, choose Install by Product Group and then choose zigbee->next->choose pack-
ages (we recommend defaults)->agree all the licenses->finish
g) It will start downloading packages, it’s going to take a while depending on your internet speed.
h) The released Z3GatewayFreeRTOS package depends on earlier ZNet SDK v6.6. If this doesn’t match, please go to
“Launcher” -> “Update Software” -> “Package Manger” -> “SDKs” -> select “Categories” = “EmberZNet SDK”, “Ver-
sion”=”All” and pick “EmberZNet SDK –6.6.5.0” to reinstall it.
i) Now you are ready to do Zigbee development.
j) Copy the provided gecko_sdk_znet_v6.6_patch.zip into Simplicity Studio install folder where the gecko SDK is located
and unzip it. For example:
~/SimplicityStudio_v4/developer/sdks/gecko_sdk_suite/
k) Merge the gecko SDK ZNet patch folder to the gecko-sdk-2.6, like:
$ cp -rf ./gecko_sdk_znet_v6.6_patch/* ./v2.6/
l) Import the patched SDK to Simplicity Studio, go to Windows->Preferences->Simplicity Studio->SDKs, then click Add,
choose the patched v2.6 folder
m) You should see a Gecko SDK Suite with version 6.6.5 is imported.

Build Environment Preparation and Source-code Compiling on AmebaD SDK
silabs.com | Smart. Connected. Energy-friendly Rev. 1.0.2 | 7
| 7
•Apply Alibaba iotkit-embedded (aka linkkit) and cloud gateway example application patches to AmebaD SDK:
•Note: If you’re using NDA version AmebaD SDK, please contact Silicon Labs for Aliyun gateway example code specific to it.
1. Unzip the released amebad_sdk_v6.2_aliyun_gw_example_patch.zip source package to a local folder, e.g. ~
2. Apply the patches onto AmebaD SDK:
$ cp -rf ./amebad_sdk_v6.2_aliyun_gw_example_patch/* ./ambd_sdk/
•Creating Z3GatewayFreeRTOS project from Simplicity Studio
1. In Simplicity Studio, new a project->select Silicon Labs AppBuilder Project->Select Silicon Labs Zigbee-> select EmberZnet
6.6.x GA Host->Z3GatewayFreeRTOS
2. Name the project as “lib_z3ctrl” for the Aliyun cloud gateway application example. Alternatively, you may use the default
project name (Z3GatewayFreeRTOS) or another project name for your own project. It is REQUIRED to select the project
location at specific location in the AmebaD SDK project:
i.e. <AmebaD SDK>/project/<AmebaD Project Name>/GCC-RELEASE/project_hp/asdk/make/project/
3. After creating the project, click "Generate”on the main project page.
4. Now you should see a project source tree generated under project_hp/asdk/make/project/lib_z3ctrl/ folder.
•Build the AmebaD application firmware binaries
Now you can build the whole project with reference to Realtek AN0400 AmebaD App Note. i.e.
1. Build the project_lp KM0 project:
$ cd ./ambd_sdk/project/realtek_amebaD_va0_example/GCC-RELEASE/project_lp
$ make all
2. Build the project_hp KM4 project:
$ cd ./ambd_sdk/project/realtek_amebaD_va0_example/GCC-RELEASE/project_hp
$ make all

Flash the AmebaD Firmware Application
silabs.com | Smart. Connected. Energy-friendly Rev. 1.0.2 | 8
| 8
3 Flash the AmebaD Firmware Application
3.1 Flash the AmebaD Application Firmware Binaries
•Realtek’s Windows ImageTool.exe is recommended for flashing the AmebaD
firmware to the LCGW HW.
Set LCGWv2 kit into Uart Download and Flashing mode:
1. Open the bottom plastic cover of the LCGWv2 kit
2. Plug the micro-USB cable to LCGWv2 and power it up from PC’s USB port
3. Press and hold the “FLASH” button and then press the “RESET” button
4. Release the “FLASH” button, kit should be in flashing mode already
•Config ImageTool flash utility:
1. Select “AmeabaD(8721D)” in “Chip Select”, select the COM port corre-
sponding to LCGWv2 kit.
2. Browse below flashing binaries and set their corresponding flashing ad-
dresses:
The Ameba application binaries:
▪km0_boot_all.bin at 0x080000000
▪km4_boot_all.bin at 0x080040000
▪Km0_km4_image2.bin at 0x080060000
Optional for testing device OTA feature, we need to flash the .ota Z3Light image file:
▪Z3LightFw.ota at 0x081800000
Optional for testing device OTA feature, we need to flash the .gbl NCP image file:
▪ncp-uart-hw_mg21_znet665_pta.gbl at 0x083800000
3. Click the “Download” button and wait for the download and flashing complete.
RESET
FLASH

Run the Aliyun Gateway Example Application
silabs.com | Smart. Connected. Energy-friendly Rev. 1.0.2 | 9
| 9
4 Run the Aliyun Gateway Example Application
4.1 Download Alibaba Cloud Intelligence Mobile Phone App
•Download and install Alibaba “Cloud Intelligence”mobile App on your mobile phone by scanning below QR code:
Note: There are two mobile App editions, i.e. User edition (recommended) and Developer edition.
•There is a shared test account for the Cloud Intelligence App, please log in with below credential:
▪user name: [email protected]
▪password: Silabs2014
•After successfully logging in Cloud Intelligence App, you should be able to see the LCGW device icon but in grayed (offline)
state, perhaps together with some other devices in grayed (offline) state. Or an empty device list on main page.
Note: Since this is a shared user account for testing purpose, anyone who logs in the Cloud Intelligence App with this account
successfully will kick out any earlier logged in users using the same credential from their mobile phones.
•If the LCGW device icon isn’t in grayed, i.e. it is activated and online currently, this means someone’s LCGW hardware pre-
flashed with the default demo triple-unit-group is still up and running. We need to make sure no other LCGW kits with factory
firmware’s default triple-element-groups of LCGW and certain devices are running concurrently.
Note: Two GW devices using the same triple-unit-group to register Aliyun will cause mal-functioning for both devices.
4.2 Mobile Phone App Provision Wi-Fi to LCGW and Add it to Aliyun
•Step 1: Get the LCGW into the Wi-Fi provisioning mode
1. Unplug the micro-USB cable from the LCCWv2’s USB port
2. Use a toothpick or a ball pen tip to punch the hidden COFIG button at the back and hold the button
3. Re-plug the micro-USB cable to LCGWv2 to power it up from PC’s USB port
4. Release the CONFIG button, Blue LED indicator is fast blinking as the indication of GW Wi-Fi provisioning mode
CONFIG button
(punch hole)

Run the Aliyun Gateway Example Application
silabs.com | Smart. Connected. Energy-friendly Rev. 1.0.2 | 10
| 10
•Step 2: Connect your mobile phone to the Wi-Fi network that the LCGWv2 is targeted to be connected to internet
Note: The mobile phone Wi-Fi must be connected to a 2.4GHz Wi-Fi network, otherwise provisioning will fail.
•Step 3: Tap to run “Cloud Intelligence” App, tap the top-right “+” icon to scan for nearby Alibaba Wi-Fi/BT-mesh IoT devices…
1. On Android phones, LCGW will be discovered automatically…
2. “siliconlabs Z3Gateway ambD” appears, tap right-side blue “(+)” icon
3. Enter Wi-Fi SSID and Password
4. Tap “Next” button
5. You’ll see GW Wi-Fi (BLUE) indicator fast blinking, tap “Next” button to continue…
1
2
3
4
5
7
8
9
6
10
11

Run the Aliyun Gateway Example Application
silabs.com | Smart. Connected. Energy-friendly Rev. 1.0.2 | 11
| 11
6. You will see Adding Devices in progress…
7. Wait LCGW device added in less than 1 minute. Optional to rename GW.
8. Optional to rename the house and select room
9. Tap “Complete” button
10. In GW panel, tap “<” icon to return main page. See the LED indicators:
oIf GW connected to Aliyun: Cloud (GREEN) indicator turns on
oWi-Fi (BLUE) and Zigbee (RED) indicators restore to slow blinking
11. “siliconlabs Z3Gateway ambD” appears in the device list, tap device icon
12. The GW Control Panel is blank as nothing to control. Tap top-right “…” icon to view GW’s settings page
13. Check GW’s device ID, IP address, bonding time, etc. information
12
13

Run the Aliyun Gateway Example Application
silabs.com | Smart. Connected. Energy-friendly Rev. 1.0.2 | 12
| 12
Alternative Method 1: Scan the LCGW’s QR-code
1. Tap top-right “+” icon
2. Tap “[-]” scan icon
3. Scan LCGW’s QR-code or below: QR-code for LCGWv2
4. Follow sub-step (3) to (10) of previous Step 3 to add the LCGW accordingly
3
2
1
3

Run the Aliyun Gateway Example Application
silabs.com | Smart. Connected. Energy-friendly Rev. 1.0.2 | 13
| 13
Alternative Method 2: Manually add the LCGW device
Note: Only the product that is in the Mass Production stage and whose name has passed the inspection of Aliyun platform will be
shown in the Product List.
1. Tap top-middle “Add Manually” icon
2. In “Add Device” panel search box, enter “siliconlabs” (or your device name) to filter our devices
3. Tap from result listed “siliconlabs Z3Gateway ambD” (or your defined product) to add the GW
4. Follow sub-step (3) to (10) of previous Step 3 to add the LCGW accordingly
1
2
siliconlabs ZigbeeWallSW Z3SW
3

Run the Aliyun Gateway Example Application
silabs.com | Smart. Connected. Energy-friendly Rev. 1.0.2 | 14
| 14
4.3 Adding Zigbee Light to network and Aliyun
Three different methods to add Zigbee sub-devices:
(1) Scan device’s product QR-code generated from living.aliyun.com
(2) Manually select a device product from full product list
(3) LCGW single CONFIG button to permit Zigbee device joining in 180s using default global link-key.
Note: Method 3 CONFIG button method requires the first device of a product has been added via QR-code successfully.
Method 1: Scan Zigbee Light’s product QR-code
•Before adding a Zigbee device, the gateway should have automatically formed a Zigbee network.
•Step 1: Scan the device’s QR-code by the Cloud Intelligence mobile phone App
1. Tap top-right “+” icon
2. Tap “[-]” scan icon
3. Scan device’s QR-code or below:
QR-code for Z3Light
•Step 2: Run the Z3LightSoC FW on WSTK to scan Zigbee network:
1. Connect WSTK with BRD4161/4162A radio board flashed with Z3LightSoC firmware to PC via USB
2. In Simplicity Studio Debug Adapters, right click the Z3Light WSTK and select “launch Console”
3. Go to “Serial 1” window, press “Enter” in terminal until you see the prompts, e.g. “Z3LightSoC>”
4. Type “network leave” then press “Enter” to force Z3Light to leave network
5. Press WSTK’s Target RESET button, Z3Light will start searching network after reset
(One could check the logs in terminal to confirm device has joined network successfully.)
1
2
Reset
button
Z3Light
LED
3

Run the Aliyun Gateway Example Application
silabs.com | Smart. Connected. Energy-friendly Rev. 1.0.2 | 15
| 15
•Step 3: Add Z3Light device
1. Tap “Add Device” button on the App
2. You will see Adding Devices in progress and GW Zigbee (RED) indicator is fast blinking, 100ms on 100ms off. Wait till
adding device process completes in less than 1 minute. Once the device joins successfully or the 180s expires, the
Zigbee (RED) indicator returns back to slow blinking (100ms on 1900ms off)
3. Tap “<” to return main page, or
4. Tap “…” to view the Light settings page
1
2
3
4

Run the Aliyun Gateway Example Application
silabs.com | Smart. Connected. Energy-friendly Rev. 1.0.2 | 16
| 16
•Step 4: Z3Light Control and Settings
1. After successful adding the device, it’ll appear on the Device page of the App. (If not, please refresh the page.)
2. Tap the “On/Off” button to toggle the Z3 Light on/off
3. Tap “siliconlabs ZigbeeLight Z3L” icon itself to open the Light Control panel
4. Tap middle “Bulb” icon or bottom “On/Off” button to toggle on/off
5. Drag the Brightness bar to adjust brightness from 0 to 100% (Note that the WSTK’s LED doesn’t support the brightness
adjustment.)
6. Tap “…” to view “Device Settings” page
7. In “Device Settings” page, check the device ID, IP address, bonding time, etc. information
6
4
4
5
1
2
3
7

Run the Aliyun Gateway Example Application
silabs.com | Smart. Connected. Energy-friendly Rev. 1.0.2 | 17
| 17
Method 2: Manually add the Zigbee Light device
Note: Only the product that is in the Mass Production stage and whose name has passed the inspection of Aliyun platform will be
shown in the Product List.
1. Tap top “Add Manually” icon
2. In “Add Device” panel search box, enter “siliconlabs” to filter our devices
3. Tap from result list “siliconlabs ZigbeeLight Z3L” to add the Zigbee Light
4. Follow previous Steps 2 to 4 to add the device accordingly and do the device controlling
Method 3: Single CONFIG button open network for Zigbee device joining
1. Follow previous Step 2 to force the device SoC on WSTK to leave network and scan Zigbee network
2. Set LCGWv2 to “Open” network for device joining:
1. Use a ball pen tip to punch the hidden COFIG button once, i.e. less than 500ms
2. Release the CONFIG button, Zigbee (RED) indicator is fast blinking (100ms on 100ms off) as the indication
3. Gateway “Permit Join” with default global link-key for 180s
3. Once the device joins successfully or the 180s expires, the Zigbee (RED) indicator returns back to slow blinking (100ms on
1900ms off)
4. If the device joins successfully, follow the previous Step 4 to do the device controlling.
1
2
siliconlabs ZigbeeWallSW Z3SW
3
CONFIG button
(punch hole)

Run the Aliyun Gateway Example Application
silabs.com | Smart. Connected. Energy-friendly Rev. 1.0.2 | 18
| 18
4.4 Adding Zigbee Switch to Network and Aliyun
Method 1: Scan Zigbee Switch’s product QR-code
•Before adding a Zigbee device, the gateway should have automatically formed a Zigbee network.
•Step 1: Scan the device’s QR-code by the Cloud Intelligence mobile phone App
1. Tap top-right “+” icon
2. Tap “[-]” scan icon
3. Scan device’s QR-code or below:
QR-code for Z3Switch
•Step 2: Run the Z3SwitchSoC FW on WSTK to scan Zigbee network:
1. Connect WSTK with BRD4161/4162A radio board flashed with Z3SwitchSoC firmware to PC via USB
2. In Simplicity Studio Debug Adapters, right click the Z3Switch WSTK and select “launch Console”
3. Go to “Serial 1” window, press “Enter” in terminal until you see the prompts, e.g. “Z3SwitchSoC>”
4. Type “network leave” then press “Enter” to force Z3Switch to leave network
5. Type “plugin network-steering start 60” then press “Enter” to command Z3Switch to start searching network
(One could check the logs in terminal to confirm device has joined network successfully.)
1
3
2
Reset
button
Z3Switch
Toggle button

Run the Aliyun Gateway Example Application
silabs.com | Smart. Connected. Energy-friendly Rev. 1.0.2 | 19
| 19
•Step 3: Add the Z3Switch device
1. Tap “Add Device” button
2. You will see Adding Devices in progress and GW Zigbee (RED) indicator is fast blinking, 100ms on 100ms off. Wait till
adding device process completes in less than 1 minute. Once the device joins successfully or the 180s expires, the
Zigbee (RED) indicator returns back to slow blinking (100ms on 1900ms off)
3. Tap “<” to return main page, or
4. Tap “…” to view “Device Settings” page
2
3
4
1
Table of contents
Other Silicon Laboratories Gateway manuals