From 6d8a919b757febfd363e4155418a0a5c0a5d639e Mon Sep 17 00:00:00 2001 From: Manav Mehta Date: Wed, 14 Dec 2022 18:59:51 +0000 Subject: [PATCH] Pull request #434: README Updates as per 917 SoC BLE Commissioning Updates Merge in WMN_TOOLS/matter from feature/917_soc_ble_readme_upd to RC_1.0.2-1.0 Squashed commit of the following: commit ee4ffb75ce4f6901912c52148531468e1ce16b0f Author: Manav Mehta Date: Wed Dec 14 20:48:09 2022 +0530 Updated as per review comments commit 7175ca4ae139645da41b701bb2ad071c1187a6cd Author: Manav Mehta Date: Wed Dec 14 18:50:32 2022 +0530 Light Switch and Window Covering README updates as per 917 SoC BLE commissioning support commit 525f8f33d5d53b0d698daf4d4a88496f29cb78c1 Author: Manav Mehta Date: Wed Dec 14 16:46:31 2022 +0530 Light and Lock README updates for 917 SoC BLE commissioning support --- .../light-switch-app/silabs/SiWx917/README.md | 333 +++--------------- .../light-switch-app/silabs/efr32/README.md | 58 +-- .../lighting-app/silabs/SiWx917/README.md | 64 ++-- examples/lighting-app/silabs/efr32/README.md | 34 +- examples/lock-app/silabs/SiWx917/README.md | 303 ++-------------- examples/lock-app/silabs/efr32/README.md | 54 +-- examples/window-app/silabs/SiWx917/README.md | 281 ++------------- examples/window-app/silabs/efr32/README.md | 48 +-- 8 files changed, 240 insertions(+), 935 deletions(-) diff --git a/examples/light-switch-app/silabs/SiWx917/README.md b/examples/light-switch-app/silabs/SiWx917/README.md index 3a72765e663796..37588b60db0ab0 100644 --- a/examples/light-switch-app/silabs/SiWx917/README.md +++ b/examples/light-switch-app/silabs/SiWx917/README.md @@ -1,10 +1,10 @@ -# Matter EFR32 Light Switch Example +# Matter SiWx917 Light Switch Example -An example showing the use of CHIP on the Silicon Labs EFR32 MG12 and MG24. +An example showing the use of CHIP on the Silicon Labs SiWx917 SoC device.
-- [Matter EFR32 Light Switch Example](#matter-efr32-light-switch-example) +- [Matter SiWx917 Light Switch Example](#matter-siwx917-light-switch-example) - [Introduction](#introduction) - [Building](#building) - [Linux](#linux) @@ -12,12 +12,8 @@ An example showing the use of CHIP on the Silicon Labs EFR32 MG12 and MG24. - [Flashing the Application](#flashing-the-application) - [Viewing Logging Output](#viewing-logging-output) - [Running the Complete Example](#running-the-complete-example) - - [Notes](#notes) - - [On Border Router:](#on-border-router) - - [On PC(Linux):](#on-pclinux) - - [Running RPC console](#running-rpc-console) + - [Notes](#notes) - [Memory settings](#memory-settings) - - [OTA Software Update](#ota-software-update) - [Building options](#building-options) - [Disabling logging](#disabling-logging) - [Debug build / release build](#debug-build--release-build) @@ -36,18 +32,18 @@ An example showing the use of CHIP on the Silicon Labs EFR32 MG12 and MG24. ## Introduction -The EFR32 light switch example provides a baseline demonstration of a on-off -light switch device, built using Matter and the Silicon Labs gecko SDK. It can -be controlled by a Chip controller over an Openthread or Wifi network. +The SiWx917 light switch example provides a baseline demonstration of an on-off +light switch device, built using Matter, the Silicon Labs Gecko SDK, and the Silicon Labs WiseMCU SDK. It can be controlled +by a Chip controller over a Wi-Fi network. -The EFR32 device can be commissioned over Bluetooth Low Energy where the device -and the Chip controller will exchange security information with the Rendez-vous -procedure. If using Thread, Thread Network credentials are then provided to the -EFR32 device which will then join the network. +The SiWx917 device can be commissioned over Bluetooth Low Energy where the device +and the Chip controller will exchange security information with the rendezvous +procedure. Wi-Fi Network credentials are then provided to the +SiWx917 device which will then join the Wi-Fi network. If the LCD is enabled, the LCD on the Silabs WSTK shows a QR Code containing the needed commissioning information for the BLE connection and starting the -Rendez-vous procedure. +rendezvous procedure. The light switch example is intended to serve both as a means to explore the workings of Matter as well as a template for creating real products based on the @@ -82,269 +78,61 @@ Silicon Labs platform. > [Hardware Requirements](https://github.com/SiliconLabs/matter/blob/latest/docs/silabs/general/HARDWARE_REQUIREMENTS.md) > in the Silicon Labs Matter Github Repo - MG12 boards: - - - BRD4161A / SLWSTK6000B / Wireless Starter Kit / 2.4GHz@19dBm - - BRD4162A / SLWSTK6000B / Wireless Starter Kit / 2.4GHz@10dBm - - BRD4163A / SLWSTK6000B / Wireless Starter Kit / 2.4GHz@10dBm, - 868MHz@19dBm - - BRD4164A / SLWSTK6000B / Wireless Starter Kit / 2.4GHz@19dBm - - BRD4166A / SLTB004A / Thunderboard Sense 2 / 2.4GHz@10dBm - - BRD4170A / SLWSTK6000B / Multiband Wireless Starter Kit / 2.4GHz@19dBm, - 915MHz@19dBm - - BRD4304A / SLWSTK6000B / MGM12P Module / 2.4GHz@19dBm - - MG21 boards: Currently not supported due to RAM limitation. - - - BRD4180A / SLWSTK6006A / Wireless Starter Kit / 2.4GHz@20dBm - - MG24 boards : - - - BRD2601B / SLWSTK6000B / Wireless Starter Kit / 2.4GHz@10dBm - - BRD2703A / SLWSTK6000B / Wireless Starter Kit / 2.4GHz@10dBm - - BRD4186A / SLWSTK6006A / Wireless Starter Kit / 2.4GHz@10dBm - - BRD4186C / SLWSTK6006A / Wireless Starter Kit / 2.4GHz@10dBm - - BRD4187A / SLWSTK6006A / Wireless Starter Kit / 2.4GHz@20dBm - - BRD4187C / SLWSTK6006A / Wireless Starter Kit / 2.4GHz@20dBm - - MG12 boards: - - - BRD4161A / SLWSTK6000B / Wireless Starter Kit / 2.4GHz@19dBm - - BRD4162A / SLWSTK6000B / Wireless Starter Kit / 2.4GHz@10dBm - - BRD4163A / SLWSTK6000B / Wireless Starter Kit / 2.4GHz@10dBm, - 868MHz@19dBm - - BRD4164A / SLWSTK6000B / Wireless Starter Kit / 2.4GHz@19dBm - - BRD4166A / SLTB004A / Thunderboard Sense 2 / 2.4GHz@10dBm - - BRD4170A / SLWSTK6000B / Multiband Wireless Starter Kit / 2.4GHz@19dBm, - 915MHz@19dBm - - BRD4304A / SLWSTK6000B / MGM12P Module / 2.4GHz@19dBm - - MG21 boards: Currently not supported due to RAM limitation. - - - BRD4180A / SLWSTK6006A / Wireless Starter Kit / 2.4GHz@20dBm - - MG24 boards : - - - BRD2601B / SLWSTK6000B / Wireless Starter Kit / 2.4GHz@10dBm - - BRD2703A / SLWSTK6000B / Wireless Starter Kit / 2.4GHz@10dBm - - BRD4186A / SLWSTK6006A / Wireless Starter Kit / 2.4GHz@10dBm - - BRD4186C / SLWSTK6006A / Wireless Starter Kit / 2.4GHz@10dBm - - BRD4187A / SLWSTK6006A / Wireless Starter Kit / 2.4GHz@20dBm - - BRD4187C / SLWSTK6006A / Wireless Starter Kit / 2.4GHz@20dBm - * Build the example application: cd ~/connectedhomeip - ./scripts/examples/gn_efr32_example.sh ./examples/light-switch-app/efr32/ ./out/light-switch-app BRD4161A + ./scripts/examples/gn_efr32_example.sh ./examples/light-switch-app/silabs/SiWx917/ ./out/light-switch-app BRD4325A --wifi rs911x - To delete generated executable, libraries and object files use: $ cd ~/connectedhomeip $ rm -rf ./out/ - OR use GN/Ninja directly - - $ cd ~/connectedhomeip/examples/light-switch-app/efr32 - $ git submodule update --init - $ source third_party/connectedhomeip/scripts/activate.sh - $ export EFR32_BOARD=BRD4161A - $ gn gen out/debug - $ ninja -C out/debug - -- To delete generated executable, libraries and object files use: - - $ cd ~/connectedhomeip/examples/light-switch-app/efr32 - $ rm -rf out/ - -* Build the example with Matter shell - - ./scripts/examples/gn_efr32_example.sh examples/light-switch-app/efr32/ out/light-switch-app BRD4161A chip_build_libshell=true - -* Build the example as Sleepy End Device (SED) - - $ ./scripts/examples/gn_efr32_example.sh ./examples/light-switch-app/efr32/ ./out/light-switch-app_SED BRD4161A --sed - - or use gn as previously mentioned but adding the following arguments: - - $ gn gen out/debug '--args=silabs_board="BRD4161A" enable_sleepy_device=true chip_openthread_ftd=false chip_build_libshell=true' - -* Build the example with pigweed RCP - - $ ./scripts/examples/gn_efr32_example.sh examples/light-switch-app/efr32/ out/light-switch-app_rpc BRD4161A 'import("//with_pw_rpc.gni")' - - or use GN/Ninja Directly - - $ cd ~/connectedhomeip/examples/light-switch-app/efr32 - $ git submodule update --init - $ source third_party/connectedhomeip/scripts/activate.sh - $ export EFR32_BOARD=BRD4161A - $ gn gen out/debug --args='import("//with_pw_rpc.gni")' - $ ninja -C out/debug - - [Running Pigweed RPC console](#running-pigweed-rpc-console) - -For more build options, help is provided when running the build script without -arguments - - ./scripts/examples/gn_efr32_example.sh - ## Flashing the Application -- On the command line: - - $ cd ~/connectedhomeip/examples/lighting-app/efr32 - $ python3 out/debug/chip-efr32-light-switch-example.flash.py - -- Or with the Ozone debugger, just load the .out file. +- Flashing requires the SiWx917 SoC device to be configured in the Ozone Debugger. +- Once it's configured, it can be run with the Ozone Debugger by loading the .out file. + - > For detailed instructions, please refer to + > [Running the Matter Demo on SiWx917 SoC](https://github.com/SiliconLabs/matter/blob/latest/docs/silabs/wifi/RUN_DEMO_SiWx917_SoC.md) + > in the Silicon Labs Matter Github Repo ## Viewing Logging Output -The example application is built to use the SEGGER Real Time Transfer (RTT) -facility for log output. RTT is a feature built-in to the J-Link Interface MCU -on the WSTK development board. It allows bi-directional communication with an -embedded application without the need for a dedicated UART. - -Using the RTT facility requires downloading and installing the _SEGGER J-Link -Software and Documentation Pack_ -([web site](https://www.segger.com/downloads/jlink#J-LinkSoftwareAndDocumentationPack)). - -Alternatively, SEGGER Ozone J-Link debugger can be used to view RTT logs too -after flashing the .out file. - -- Download the J-Link installer by navigating to the appropriate URL and - agreeing to the license agreement. - -- [JLink_Linux_x86_64.deb](https://www.segger.com/downloads/jlink/JLink_Linux_x86_64.deb) -- [JLink_MacOSX.pkg](https://www.segger.com/downloads/jlink/JLink_MacOSX.pkg) - -* Install the J-Link software - - $ cd ~/Downloads - $ sudo dpkg -i JLink_Linux_V*_x86_64.deb - -* In Linux, grant the logged in user the ability to talk to the development - hardware via the linux tty device (/dev/ttyACMx) by adding them to the - dialout group. - - $ sudo usermod -a -G dialout ${USER} - -Once the above is complete, log output can be viewed using the JLinkExe tool in -combination with JLinkRTTClient as follows: - -- Run the JLinkExe tool with arguments to autoconnect to the WSTK board: - - For MG12 use: - - $ JLinkExe -device EFR32MG12PXXXF1024 -if JTAG -speed 4000 -autoconnect 1 - - For MG21 use: - - $ JLinkExe -device EFR32MG21AXXXF1024 -if SWD -speed 4000 -autoconnect 1 - -- In a second terminal, run the JLinkRTTClient to view logs: - - $ JLinkRTTClient +The example application's logging output can be viewed in the Ozone Debugger. ## Running the Complete Example -- It is assumed here that you already have an OpenThread border router - configured and running. If not see the following guide - [Openthread_border_router](https://github.com/project-chip/connectedhomeip/blob/master/docs/guides/openthread_border_router_pi.md) - for more information on how to setup a border router on a raspberryPi. - - Take note that the RCP code is available directly through - [Simplicity Studio 5](https://www.silabs.com/products/development-tools/software/simplicity-studio/simplicity-studio-5) - under File->New->Project Wizard->Examples->Thread : ot-rcp - -- For this example to work, it is necessary to have a second efr32 device +- For this example to work, it is necessary to have a second SiWx917 device running the - [lighting app example](https://github.com/project-chip/connectedhomeip/blob/master/examples/lighting-app/efr32/README.md) - commissioned on the same openthread network - -- User interface : **LCD** The LCD on Silabs WSTK shows a QR Code. This QR - Code is be scanned by the CHIP Tool app For the Rendez-vous procedure over - BLE - - * On devices that do not have or support the LCD Display like the BRD4166A Thunderboard Sense 2, - a URL can be found in the RTT logs. - - [SVR] Copy/paste the below URL in a browser to see the QR Code: - [SVR] https://project-chip.github.io/connectedhomeip/qrcode.html?data=CH%3AI34NM%20-00%200C9SS0 - - **LED 0** shows the overall state of the device and its connectivity. The - following states are possible: - - - Short Flash On (50 ms on/950 ms off): The device is in the - unprovisioned (unpaired) state and is waiting for a commissioning - application to connect. - - - Rapid Even Flashing (100 ms on/100 ms off): The device is in the - unprovisioned state and a commissioning application is connected through - Bluetooth LE. - - - Short Flash Off (950ms on/50ms off): The device is fully - provisioned, but does not yet have full Thread network or service - connectivity. - - - Solid On: The device is fully provisioned and has full Thread - network and service connectivity. - - **Push Button 0** - - - _Press and Release_ : Start, or restart, BLE advertisement in fast mode. It will advertise in this mode - for 30 seconds. The device will then switch to a slower interval advertisement. - After 15 minutes, the advertisement stops. - - - _Pressed and hold for 6 s_ : Initiates the factory reset of the device. - Releasing the button within the 6-second window cancels the factory reset - procedure. **LEDs** blink in unison when the factory reset procedure is - initiated. - - **Push Button 1** + [lighting app example](https://github.com/project-chip/connectedhomeip/blob/master/examples/lighting-app/silabs/SiWx917/README.md) + commissioned on the same Wi-Fi network - - Sends a Toggle command to bound light app +* You can provision and control the Chip device using the + [chip-tool](https://github.com/project-chip/connectedhomeip/blob/master/examples/chip-tool/README.md) + standalone - **Matter shell** + Here is an example with the chip-tool for unicast commands only: - **_OnOff Cluster_** - - - 'switch onoff on' : Sends unicast On command to bound device - - 'switch onoff off' : Sends unicast Off command to bound device - - 'switch onoff toggle' : Sends unicast Toggle command to bound device - - - 'switch groups onoff on' : Sends On group command to bound group - - 'switch groups onoff off' : Sends On group command to bound group - - 'switch groups onoff toggle' : Sends On group command to bound group - - **_Binding Cluster_** - - - 'switch binding unicast ' : Creates a unicast binding - - 'switch binding group ' : Creates a group binding - -* You can provision and control the Chip device using the python controller, - [CHIPTool](https://github.com/project-chip/connectedhomeip/blob/master/examples/chip-tool/README.md) - standalone, Android or iOS app - - Here is an example with the CHIPTool for unicast commands only: + - > $SSID and $PSK are the SSID and passcode of your Wi-Fi Access Point. ``` - chip-tool pairing ble-thread 1 hex: 20202021 3840 + chip-tool pairing ble-wifi 1122 $SSID $PSK 20202021 3840 chip-tool accesscontrol write acl '[{"fabricIndex": 1, "privilege": 5, "authMode": 2, "subjects": [], "targets": null }{"fabricIndex": 1, "privilege": 3, "authMode": 2, "subjects": [1], "targets": null }]' 0 chip-tool binding write binding '[{"fabricIndex": 1, "node": , "endpoint": 1, "cluster":6}]' 1 1 ``` - Here is an example with the CHIPTool for groups commands only: + Here is an example with the chip-tool for groups commands only: ``` - chip-tool pairing ble-thread 1 hex: 20202021 3840 + chip-tool pairing ble-wifi 1122 $SSID $PSK 20202021 3840 chip-tool tests TestGroupDemoConfig --nodeId 1 @@ -369,71 +157,34 @@ combination with JLinkRTTClient as follows: ### Notes -- Depending on your network settings your router might not provide native ipv6 - addresses to your devices (Border router / PC). If this is the case, you - need to add a static ipv6 addresses on both device and then an ipv6 route to +- Depending on your network settings your router might not provide native IPv6 + addresses to your devices (Router / PC). If this is the case, you + need to add a static IPv6 addresses on both devices and then an IPv6 route to the border router on your PC -#### On Border Router: - -`$ sudo ip addr add dev 2002::2/64` - #### On PC(Linux): `$ sudo ip addr add dev 2002::1/64` -#Add Ipv6 route on PC(Linux) \$ sudo ip route add /64 +#Add IPv6 route on PC(Linux) \$ sudo ip route add /64 via 2002::2 - - -## Running RPC console - -- As part of building the example with RPCs enabled the chip_rpc python - interactive console is installed into your venv. The python wheel files are - also created in the output folder: out/debug/chip_rpc_console_wheels. To - install the wheel files without rebuilding: - - `pip3 install out/debug/chip_rpc_console_wheels/*.whl` - -- To use the chip-rpc console after it has been installed run: - - `chip-console --device /dev/tty. -b 115200 -o //pw_log.out` - -- Then you can simulate a button press or release using the following command - where : idx = 0 or 1 for Button PB0 or PB1 action = 0 for PRESSED, 1 for - RELEASE Test toggling the LED with - - `rpcs.chip.rpc.Button.Event(idx=1, pushed=True)` - -- You can also Get and Set the light directly using the RPCs: - - `rpcs.chip.rpc.Lighting.Get()` - - `rpcs.chip.rpc.Lighting.Set(on=True, level=128, color=protos.chip.rpc.LightingColor(hue=5, saturation=5))` - ## Memory settings While most of the RAM usage in CHIP is static, allowing easier debugging and optimization with symbols analysis, we still need some HEAP for the crypto and -OpenThread. Size of the HEAP can be modified by changing the value of the +Wi-Fi stack. Size of the HEAP can be modified by changing the value of the `configTOTAL_HEAP_SIZE` define inside of the FreeRTOSConfig.h file of this -example. Please take note that a HEAP size smaller than 13k can and will cause a -Mbedtls failure during the BLE rendez-vous or CASE session +example. Please take note that a HEAP size smaller than 13k can and will cause an +Mbedtls failure during the BLE rendezvous or CASE session To track memory usage you can set `enable_heap_monitoring = true` either in the BUILD.gn file or pass it as a build argument to gn. This will print on the RTT console the RAM usage of each individual task and the number of Memory allocation and Free. While this is not extensive monitoring you're welcome to -modify `examples/platform/efr32/MemMonitoring.cpp` to add your own memory +modify `examples/platform/silabs/SiWx917/MemMonitoring.cpp` to add your own memory tracking code inside the `trackAlloc` and `trackFree` function -## OTA Software Update - -For the description of Software Update process with EFR32 example applications -see -[EFR32 OTA Software Update](../../../docs/guides/silabs_efr32_software_update.md) - ## Building options All of Silabs's examples within the Matter repo have all the features enabled by @@ -444,19 +195,19 @@ features can easily be toggled on or off. Here is a short list of options : chip_progress_logging, chip_detail_logging, chip_automation_logging - $ ./scripts/examples/gn_efr32_example.sh ./examples/lighting-app/efr32 ./out/lighting-app BRD4164A "chip_detail_logging=false chip_automation_logging=false chip_progress_logging=false" + $ ./scripts/examples/gn_efr32_example.sh ./examples/light-switch-app/silabs/SiWx917 ./out/light-switch-app BRD4325A "chip_detail_logging=false chip_automation_logging=false chip_progress_logging=false" --wifi rs911x ### Debug build / release build is_debug - $ ./scripts/examples/gn_efr32_example.sh ./examples/lighting-app/efr32 ./out/lighting-app BRD4164A "is_debug=false" + $ ./scripts/examples/gn_efr32_example.sh ./examples/light-switch-app/silabs/SiWx917 ./out/light-switch-app BRD4325A "is_debug=false" --wifi rs911x ### Disabling LCD show_qr_code - $ ./scripts/examples/gn_efr32_example.sh ./examples/lighting-app/efr32 ./out/lighting-app BRD4164A "show_qr_code=false" + $ ./scripts/examples/gn_efr32_example.sh ./examples/light-switch-app/silabs/SiWx917 ./out/light-switch-app BRD4325A "show_qr_code=false" --wifi rs911x ### KVS maximum entry count @@ -465,4 +216,4 @@ kvs_max_entries Set the maximum Kvs entries that can be stored in NVM (Default 75) Thresholds: 30 <= kvs_max_entries <= 255 - $ ./scripts/examples/gn_efr32_example.sh ./examples/lighting-app/efr32 ./out/lighting-app BRD4164A kvs_max_entries=50 + $ ./scripts/examples/gn_efr32_example.sh ./examples/light-switch-app/silabs/SiWx917 ./out/light-switch-app BRD4325A kvs_max_entries=50 --wifi rs911x diff --git a/examples/light-switch-app/silabs/efr32/README.md b/examples/light-switch-app/silabs/efr32/README.md index 3a72765e663796..82bbc1c3295e9b 100644 --- a/examples/light-switch-app/silabs/efr32/README.md +++ b/examples/light-switch-app/silabs/efr32/README.md @@ -36,12 +36,12 @@ An example showing the use of CHIP on the Silicon Labs EFR32 MG12 and MG24. ## Introduction -The EFR32 light switch example provides a baseline demonstration of a on-off -light switch device, built using Matter and the Silicon Labs gecko SDK. It can -be controlled by a Chip controller over an Openthread or Wifi network. +The EFR32 light switch example provides a baseline demonstration of an on-off +light switch device, built using Matter and the Silicon Labs Gecko SDK. It can +be controlled by a Chip controller over an Openthread or Wi-Fi network. The EFR32 device can be commissioned over Bluetooth Low Energy where the device -and the Chip controller will exchange security information with the Rendez-vous +and the Chip controller will exchange security information with the rendezvous procedure. If using Thread, Thread Network credentials are then provided to the EFR32 device which will then join the network. @@ -135,7 +135,7 @@ Silicon Labs platform. * Build the example application: cd ~/connectedhomeip - ./scripts/examples/gn_efr32_example.sh ./examples/light-switch-app/efr32/ ./out/light-switch-app BRD4161A + ./scripts/examples/gn_efr32_example.sh ./examples/light-switch-app/silabs/efr32/ ./out/light-switch-app BRD4161A - To delete generated executable, libraries and object files use: @@ -144,25 +144,25 @@ Silicon Labs platform. OR use GN/Ninja directly - $ cd ~/connectedhomeip/examples/light-switch-app/efr32 + $ cd ~/connectedhomeip/examples/light-switch-app/silabs/efr32 $ git submodule update --init $ source third_party/connectedhomeip/scripts/activate.sh - $ export EFR32_BOARD=BRD4161A + $ export SILABS_BOARD=BRD4161A $ gn gen out/debug $ ninja -C out/debug - To delete generated executable, libraries and object files use: - $ cd ~/connectedhomeip/examples/light-switch-app/efr32 + $ cd ~/connectedhomeip/examples/light-switch-app/silabs/efr32 $ rm -rf out/ * Build the example with Matter shell - ./scripts/examples/gn_efr32_example.sh examples/light-switch-app/efr32/ out/light-switch-app BRD4161A chip_build_libshell=true + ./scripts/examples/gn_efr32_example.sh examples/light-switch-app/silabs/efr32/ out/light-switch-app BRD4161A chip_build_libshell=true * Build the example as Sleepy End Device (SED) - $ ./scripts/examples/gn_efr32_example.sh ./examples/light-switch-app/efr32/ ./out/light-switch-app_SED BRD4161A --sed + $ ./scripts/examples/gn_efr32_example.sh ./examples/light-switch-app/silabs/efr32/ ./out/light-switch-app_SED BRD4161A --sed or use gn as previously mentioned but adding the following arguments: @@ -170,14 +170,14 @@ Silicon Labs platform. * Build the example with pigweed RCP - $ ./scripts/examples/gn_efr32_example.sh examples/light-switch-app/efr32/ out/light-switch-app_rpc BRD4161A 'import("//with_pw_rpc.gni")' + $ ./scripts/examples/gn_efr32_example.sh examples/light-switch-app/silabs/efr32/ out/light-switch-app_rpc BRD4161A 'import("//with_pw_rpc.gni")' or use GN/Ninja Directly - $ cd ~/connectedhomeip/examples/light-switch-app/efr32 + $ cd ~/connectedhomeip/examples/light-switch-app/silabs/efr32 $ git submodule update --init $ source third_party/connectedhomeip/scripts/activate.sh - $ export EFR32_BOARD=BRD4161A + $ export SILABS_BOARD=BRD4161A $ gn gen out/debug --args='import("//with_pw_rpc.gni")' $ ninja -C out/debug @@ -194,7 +194,7 @@ arguments - On the command line: - $ cd ~/connectedhomeip/examples/lighting-app/efr32 + $ cd ~/connectedhomeip/examples/lighting-app/silabs/efr32 $ python3 out/debug/chip-efr32-light-switch-example.flash.py - Or with the Ozone debugger, just load the .out file. @@ -264,11 +264,11 @@ combination with JLinkRTTClient as follows: - For this example to work, it is necessary to have a second efr32 device running the - [lighting app example](https://github.com/project-chip/connectedhomeip/blob/master/examples/lighting-app/efr32/README.md) + [lighting app example](https://github.com/project-chip/connectedhomeip/blob/master/examples/lighting-app/silabs/efr32/README.md) commissioned on the same openthread network - User interface : **LCD** The LCD on Silabs WSTK shows a QR Code. This QR - Code is be scanned by the CHIP Tool app For the Rendez-vous procedure over + Code is be scanned by the chip-tool app For the Rendez-vous procedure over BLE * On devices that do not have or support the LCD Display like the BRD4166A Thunderboard Sense 2, @@ -328,10 +328,10 @@ combination with JLinkRTTClient as follows: - 'switch binding group ' : Creates a group binding * You can provision and control the Chip device using the python controller, - [CHIPTool](https://github.com/project-chip/connectedhomeip/blob/master/examples/chip-tool/README.md) + [chip-tool](https://github.com/project-chip/connectedhomeip/blob/master/examples/chip-tool/README.md) standalone, Android or iOS app - Here is an example with the CHIPTool for unicast commands only: + Here is an example with the chip-tool for unicast commands only: ``` chip-tool pairing ble-thread 1 hex: 20202021 3840 @@ -341,7 +341,7 @@ combination with JLinkRTTClient as follows: chip-tool binding write binding '[{"fabricIndex": 1, "node": , "endpoint": 1, "cluster":6}]' 1 1 ``` - Here is an example with the CHIPTool for groups commands only: + Here is an example with the chip-tool for groups commands only: ``` chip-tool pairing ble-thread 1 hex: 20202021 3840 @@ -369,9 +369,9 @@ combination with JLinkRTTClient as follows: ### Notes -- Depending on your network settings your router might not provide native ipv6 +- Depending on your network settings your router might not provide native IPv6 addresses to your devices (Border router / PC). If this is the case, you - need to add a static ipv6 addresses on both device and then an ipv6 route to + need to add a static IPv6 addresses on both devices and then an IPv6 route to the border router on your PC #### On Border Router: @@ -382,7 +382,7 @@ combination with JLinkRTTClient as follows: `$ sudo ip addr add dev 2002::1/64` -#Add Ipv6 route on PC(Linux) \$ sudo ip route add /64 +#Add IPv6 route on PC(Linux) \$ sudo ip route add /64 via 2002::2 @@ -418,14 +418,14 @@ While most of the RAM usage in CHIP is static, allowing easier debugging and optimization with symbols analysis, we still need some HEAP for the crypto and OpenThread. Size of the HEAP can be modified by changing the value of the `configTOTAL_HEAP_SIZE` define inside of the FreeRTOSConfig.h file of this -example. Please take note that a HEAP size smaller than 13k can and will cause a -Mbedtls failure during the BLE rendez-vous or CASE session +example. Please take note that a HEAP size smaller than 13k can and will cause an +Mbedtls failure during the BLE rendezvous or CASE session To track memory usage you can set `enable_heap_monitoring = true` either in the BUILD.gn file or pass it as a build argument to gn. This will print on the RTT console the RAM usage of each individual task and the number of Memory allocation and Free. While this is not extensive monitoring you're welcome to -modify `examples/platform/efr32/MemMonitoring.cpp` to add your own memory +modify `examples/platform/silabs/efr32/MemMonitoring.cpp` to add your own memory tracking code inside the `trackAlloc` and `trackFree` function ## OTA Software Update @@ -444,19 +444,19 @@ features can easily be toggled on or off. Here is a short list of options : chip_progress_logging, chip_detail_logging, chip_automation_logging - $ ./scripts/examples/gn_efr32_example.sh ./examples/lighting-app/efr32 ./out/lighting-app BRD4164A "chip_detail_logging=false chip_automation_logging=false chip_progress_logging=false" + $ ./scripts/examples/gn_efr32_example.sh ./examples/light-switch-app/silabs/efr32 ./out/light-switch-app BRD4164A "chip_detail_logging=false chip_automation_logging=false chip_progress_logging=false" ### Debug build / release build is_debug - $ ./scripts/examples/gn_efr32_example.sh ./examples/lighting-app/efr32 ./out/lighting-app BRD4164A "is_debug=false" + $ ./scripts/examples/gn_efr32_example.sh ./examples/light-switch-app/silabs/efr32 ./out/light-switch-app BRD4164A "is_debug=false" ### Disabling LCD show_qr_code - $ ./scripts/examples/gn_efr32_example.sh ./examples/lighting-app/efr32 ./out/lighting-app BRD4164A "show_qr_code=false" + $ ./scripts/examples/gn_efr32_example.sh ./examples/light-switch-app/silabs/efr32 ./out/light-switch-app BRD4164A "show_qr_code=false" ### KVS maximum entry count @@ -465,4 +465,4 @@ kvs_max_entries Set the maximum Kvs entries that can be stored in NVM (Default 75) Thresholds: 30 <= kvs_max_entries <= 255 - $ ./scripts/examples/gn_efr32_example.sh ./examples/lighting-app/efr32 ./out/lighting-app BRD4164A kvs_max_entries=50 + $ ./scripts/examples/gn_efr32_example.sh ./examples/light-switch-app/silabs/efr32 ./out/light-switch-app BRD4164A kvs_max_entries=50 diff --git a/examples/lighting-app/silabs/SiWx917/README.md b/examples/lighting-app/silabs/SiWx917/README.md index 081e9118508726..0ee279e653e893 100644 --- a/examples/lighting-app/silabs/SiWx917/README.md +++ b/examples/lighting-app/silabs/SiWx917/README.md @@ -32,8 +32,17 @@ An example showing the use of CHIP on the Silicon Labs SiWx917. ## Introduction The SiWx917 lighting example provides a baseline demonstration of a Light control -device, built using Matter, the Silicon Labs gecko SDK and Silicon labs WiseMCU SDK. It can be controlled -by a Chip controller over a Wifi network. +device, built using Matter, the Silicon Labs Gecko SDK, and the Silicon Labs WiseMCU SDK. It can be controlled +by a Chip controller over a Wi-Fi network. + +The SiWx917 device can be commissioned over Bluetooth Low Energy where the device +and the Chip controller will exchange security information with the rendezvous +procedure. Wi-Fi Network credentials are then provided to the +SiWx917 device which will then join the Wi-Fi network. + +If the LCD is enabled, the LCD on the Silabs WSTK shows a QR Code containing the +needed commissioning information for the BLE connection and starting the +rendezvous procedure. The lighting example is intended to serve both as a means to explore the workings of Matter as well as a template for creating real products based on the @@ -68,29 +77,13 @@ Silicon Labs platform. * Build the example application: cd ~/connectedhomeip - ./scripts/examples/gn_efr32_example.sh examples/lighting-app/silabs/SiWx917/ out/test BRD4325A ssid=\"\" psk=\"\" --wifi rs911x - - - > Enter your AP's SSID and passcode for the `ssid` and `psk` build parameters. + ./scripts/examples/gn_efr32_example.sh examples/lighting-app/silabs/SiWx917/ out/test BRD4325A --wifi rs911x - To delete generated executable, libraries and object files use: $ cd ~/connectedhomeip $ rm -rf ./out/ - OR use GN/Ninja directly - - $ cd ~/connectedhomeip/examples/lighting-app/silabs/SiWx917 - $ git submodule update --init - $ source third_party/connectedhomeip/scripts/activate.sh - $ export EFR32_BOARD=BRD4325A - $ gn gen out/debug - $ ninja -C out/debug - -- To delete generated executable, libraries and object files use: - - $ cd ~/connectedhomeip/examples/lighting-app/silabs/SiWx917 - $ rm -rf out/ - ## Flashing the Application @@ -111,28 +104,31 @@ The example application's logging output can be viewed in the Ozone Debugger. ## Running the Complete Example -* The example application supports provisioning over IP (on-network provisioning). -* You can provision and control the Chip device using the Chip tool standalone +* You can provision and control the Chip device using the chip-tool standalone - [CHIPTool](https://github.com/project-chip/connectedhomeip/blob/master/examples/chip-tool/README.md) + [chip-tool](https://github.com/project-chip/connectedhomeip/blob/master/examples/chip-tool/README.md) - Here is an example with the CHIPTool: + Here is an example with the chip-tool: - chip-tool pairing onnetwork 1 20202021 + - > $SSID and $PSK are the SSID and passcode of your Wi-Fi Access Point. + ``` + chip-tool pairing ble-wifi 1122 $SSID $PSK 20202021 3840 + chip-tool onoff on 1 1 + ``` ### Notes -- Depending on your network settings your router might not provide native ipv6 - addresses to your devices (Border router / PC). If this is the case, you - need to add a static ipv6 addresses on both device and then an ipv6 route to +- Depending on your network settings your router might not provide native IPv6 + addresses to your devices (Router / PC). If this is the case, you + need to add a static IPv6 addresses on both devices and then an IPv6 route to your router on your PC - On PC(Linux): `sudo ip addr add dev 2002::1/64` - - Add Ipv6 route on PC(Linux) - `sudo ip route add /64 via 2002::2` + - Add IPv6 route on PC(Linux) + `sudo ip route add /64 via 2002::2` ## Memory settings @@ -147,7 +143,7 @@ To track memory usage you can set `enable_heap_monitoring = true` either in the BUILD.gn file or pass it as a build argument to gn. This will print on the RTT console the RAM usage of each individual task and the number of Memory allocation and Free. While this is not extensive monitoring you're welcome to -modify `examples/platform/efr32/MemMonitoring.cpp` to add your own memory +modify `examples/platform/silabs/SiWx917/MemMonitoring.cpp` to add your own memory tracking code inside the `trackAlloc` and `trackFree` function ## Group Communication (Multicast) @@ -169,19 +165,19 @@ passed to the build scripts. `chip_progress_logging, chip_detail_logging, chip_automation_logging` - $ ./scripts/examples/gn_efr32_example.sh ./examples/lighting-app/silabs/SiWx917 ./out/lighting-app BRD4325A "chip_detail_logging=false chip_automation_logging=false chip_progress_logging=false" + $ ./scripts/examples/gn_efr32_example.sh ./examples/lighting-app/silabs/SiWx917 ./out/lighting-app BRD4325A "chip_detail_logging=false chip_automation_logging=false chip_progress_logging=false" --wifi rs911x ### Debug build / release build `is_debug` - $ ./scripts/examples/gn_efr32_example.sh ./examples/lighting-app/silabs/SiWx917 ./out/lighting-app BRD4325A "is_debug=false" + $ ./scripts/examples/gn_efr32_example.sh ./examples/lighting-app/silabs/SiWx917 ./out/lighting-app BRD4325A "is_debug=false" --wifi rs911x ### Disabling LCD `show_qr_code` - $ ./scripts/examples/gn_efr32_example.sh ./examples/lighting-app/silabs/SiWx917 ./out/lighting-app BRD4325A "show_qr_code=false" + $ ./scripts/examples/gn_efr32_example.sh ./examples/lighting-app/silabs/SiWx917 ./out/lighting-app BRD4325A "show_qr_code=false" --wifi rs911x ### KVS maximum entry count @@ -190,4 +186,4 @@ passed to the build scripts. Set the maximum Kvs entries that can be stored in NVM (Default 75) Thresholds: 30 <= kvs_max_entries <= 255 - $ ./scripts/examples/gn_efr32_example.sh ./examples/lighting-app/silabs/SiWx917 ./out/lighting-app BRD4325A kvs_max_entries=50 + $ ./scripts/examples/gn_efr32_example.sh ./examples/lighting-app/silabs/SiWx917 ./out/lighting-app BRD4325A kvs_max_entries=50 --wifi rs911x diff --git a/examples/lighting-app/silabs/efr32/README.md b/examples/lighting-app/silabs/efr32/README.md index cd21c5f4d9d5b5..f8d44e136026ca 100644 --- a/examples/lighting-app/silabs/efr32/README.md +++ b/examples/lighting-app/silabs/efr32/README.md @@ -35,17 +35,17 @@ An example showing the use of CHIP on the Silicon Labs EFR32 MG12 and MG24. ## Introduction The EFR32 lighting example provides a baseline demonstration of a Light control -device, built using Matter and the Silicon Labs gecko SDK. It can be controlled -by a Chip controller over an Openthread or Wifi network.. +device, built using Matter and the Silicon Labs Gecko SDK. It can be controlled +by a Chip controller over an Openthread or Wi-Fi network. The EFR32 device can be commissioned over Bluetooth Low Energy where the device -and the Chip controller will exchange security information with the Rendez-vous +and the Chip controller will exchange security information with the rendezvous procedure. If using Thread, Thread Network credentials are then provided to the EFR32 device which will then join the Thread network. If the LCD is enabled, the LCD on the Silabs WSTK shows a QR Code containing the needed commissioning information for the BLE connection and starting the -Rendez-vous procedure. +rendezvous procedure. The lighting example is intended to serve both as a means to explore the workings of Matter as well as a template for creating real products based on the @@ -141,7 +141,7 @@ Silicon Labs platform. $ cd ~/connectedhomeip/examples/lighting-app/silabs/efr32 $ git submodule update --init $ source third_party/connectedhomeip/scripts/activate.sh - $ export EFR32_BOARD=BRD4161A + $ export SILABS_BOARD=BRD4161A $ gn gen out/debug $ ninja -C out/debug @@ -160,14 +160,14 @@ Silicon Labs platform. * Build the example with pigweed RPC - $ ./scripts/examples/gn_efr32_example.sh examples/lighting-app/efr32/ out/lighting_app_rpc BRD4161A 'import("//with_pw_rpc.gni")' + $ ./scripts/examples/gn_efr32_example.sh examples/lighting-app/silabs/efr32/ out/lighting_app_rpc BRD4161A 'import("//with_pw_rpc.gni")' or use GN/Ninja Directly $ cd ~/connectedhomeip/examples/lighting-app/silabs/efr32 $ git submodule update --init $ source third_party/connectedhomeip/scripts/activate.sh - $ export EFR32_BOARD=BRD4161A + $ export SILABS_BOARD=BRD4161A $ gn gen out/debug --args='import("//with_pw_rpc.gni")' $ ninja -C out/debug @@ -253,7 +253,7 @@ combination with JLinkRTTClient as follows: under File->New->Project Wizard->Examples->Thread : ot-rcp - User interface : **LCD** The LCD on Silabs WSTK shows a QR Code. This QR - Code is be scanned by the CHIP Tool app For the Rendez-vous procedure over + Code is be scanned by the chip-tool app For the Rendez-vous procedure over BLE * On devices that do not have or support the LCD Display like the BRD4166A Thunderboard Sense 2, @@ -299,24 +299,26 @@ combination with JLinkRTTClient as follows: **Push Button 1** Toggles the light state On/Off * You can provision and control the Chip device using the python controller, - Chip tool standalone, Android or iOS app + chip-tool standalone, Android or iOS app * You can provision and control the Chip device using the python controller, - Chip tool standalone, Android or iOS app + chip-tool standalone, Android or iOS app - [CHIPTool](https://github.com/project-chip/connectedhomeip/blob/master/examples/chip-tool/README.md) + [chip-tool](https://github.com/project-chip/connectedhomeip/blob/master/examples/chip-tool/README.md) - Here is an example with the CHIPTool: + Here is an example with the chip-tool: + ``` chip-tool pairing ble-thread 1 hex: 20202021 3840 chip-tool onoff on 1 1 + ``` ### Notes - Depending on your network settings your router might not provide native ipv6 addresses to your devices (Border router / PC). If this is the case, you - need to add a static ipv6 addresses on both device and then an ipv6 route to + need to add a static ipv6 addresses on both devices and then an ipv6 route to the border router on your PC - On Border Router: `sudo ip addr add dev 2002::2/64` @@ -365,14 +367,14 @@ While most of the RAM usage in CHIP is static, allowing easier debugging and optimization with symbols analysis, we still need some HEAP for the crypto and OpenThread. Size of the HEAP can be modified by changing the value of the `configTOTAL_HEAP_SIZE` define inside of the FreeRTOSConfig.h file of this -example. Please take note that a HEAP size smaller than 13k can and will cause a -Mbedtls failure during the BLE rendez-vous or CASE session +example. Please take note that a HEAP size smaller than 13k can and will cause an +Mbedtls failure during the BLE rendezvous or CASE session To track memory usage you can set `enable_heap_monitoring = true` either in the BUILD.gn file or pass it as a build argument to gn. This will print on the RTT console the RAM usage of each individual task and the number of Memory allocation and Free. While this is not extensive monitoring you're welcome to -modify `examples/platform/efr32/MemMonitoring.cpp` to add your own memory +modify `examples/platform/silabs/efr32/MemMonitoring.cpp` to add your own memory tracking code inside the `trackAlloc` and `trackFree` function ## OTA Software Update diff --git a/examples/lock-app/silabs/SiWx917/README.md b/examples/lock-app/silabs/SiWx917/README.md index e4d4548670c273..7314093e5c639c 100644 --- a/examples/lock-app/silabs/SiWx917/README.md +++ b/examples/lock-app/silabs/SiWx917/README.md @@ -1,18 +1,17 @@ -# Matter EFR32 Lock Example +# Matter SiWx917 Lock Example -An example showing the use of CHIP on the Silicon Labs EFR32 MG12 and MG24. +An example showing the use of CHIP on the Silicon Labs SiWx917 SoC device.
-- [Matter EFR32 Lock Example](#matter-efr32-lock-example) +- [Matter SiWx917 Lock Example](#matter-siwx917-lock-example) - [Introduction](#introduction) - [Building](#building) - [Flashing the Application](#flashing-the-application) - [Viewing Logging Output](#viewing-logging-output) - [Running the Complete Example](#running-the-complete-example) - - [Notes](#notes) + - [Notes](#notes) - [Memory settings](#memory-settings) - - [OTA Software Update](#ota-software-update) - [Building options](#building-options) - [Disabling logging](#disabling-logging) - [Debug build / release build](#debug-build--release-build) @@ -31,20 +30,20 @@ An example showing the use of CHIP on the Silicon Labs EFR32 MG12 and MG24. ## Introduction -The EFR32 lock example provides a baseline demonstration of a door lock control -device, built using Matter and the Silicon Labs gecko SDK. It can be controlled -by a Chip controller over an Openthread or Wifi network.. +The SiWx917 Lock example provides a baseline demonstration of a door lock control +device, built using Matter, the Silicon Labs Gecko SDK, and the Silicon Labs WiseMCU SDK. It can be controlled +by a Chip controller over a Wi-Fi network. -The EFR32 device can be commissioned over Bluetooth Low Energy where the device +The SiWx917 device can be commissioned over Bluetooth Low Energy where the device and the Chip controller will exchange security information with the Rendez-vous -procedure. If using Thread, Thread Network credentials are then provided to the -EFR32 device which will then join the Thread network. +procedure. Wi-Fi Network SSID and passcode are then provided to the +SiWx917 device which will then join the Wi-Fi network. If the LCD is enabled, the LCD on the Silabs WSTK shows a QR Code containing the needed commissioning information for the BLE connection and starting the -Rendez-vous procedure. +rendezvous procedure. -The lighting example is intended to serve both as a means to explore the +The lock example is intended to serve both as a means to explore the workings of Matter as well as a template for creating real products based on the Silicon Labs platform. @@ -77,62 +76,11 @@ Mac OS X > [Hardware Requirements](https://github.com/SiliconLabs/matter/blob/latest/docs/silabs/general/HARDWARE_REQUIREMENTS.md) > in the Silicon Labs Matter Github Repo - MG12 boards: - - - BRD4161A / SLWSTK6000B / Wireless Starter Kit / 2.4GHz@19dBm - - BRD4162A / SLWSTK6000B / Wireless Starter Kit / 2.4GHz@10dBm - - BRD4163A / SLWSTK6000B / Wireless Starter Kit / 2.4GHz@10dBm, - 868MHz@19dBm - - BRD4164A / SLWSTK6000B / Wireless Starter Kit / 2.4GHz@19dBm - - BRD4166A / SLTB004A / Thunderboard Sense 2 / 2.4GHz@10dBm - - BRD4170A / SLWSTK6000B / Multiband Wireless Starter Kit / 2.4GHz@19dBm, - 915MHz@19dBm - - BRD4304A / SLWSTK6000B / MGM12P Module / 2.4GHz@19dBm - - MG21 boards: Currently not supported due to RAM limitation. - - - BRD4180A / SLWSTK6006A / Wireless Starter Kit / 2.4GHz@20dBm - - MG24 boards : - - - BRD2601B / SLWSTK6000B / Wireless Starter Kit / 2.4GHz@10dBm - - BRD2703A / SLWSTK6000B / Wireless Starter Kit / 2.4GHz@10dBm - - BRD4186A / SLWSTK6006A / Wireless Starter Kit / 2.4GHz@10dBm - - BRD4186C / SLWSTK6006A / Wireless Starter Kit / 2.4GHz@10dBm - - BRD4187A / SLWSTK6006A / Wireless Starter Kit / 2.4GHz@20dBm - - BRD4187C / SLWSTK6006A / Wireless Starter Kit / 2.4GHz@20dBm - - MG12 boards: - - - BRD4161A / SLWSTK6000B / Wireless Starter Kit / 2.4GHz@19dBm - - BRD4162A / SLWSTK6000B / Wireless Starter Kit / 2.4GHz@10dBm - - BRD4163A / SLWSTK6000B / Wireless Starter Kit / 2.4GHz@10dBm, - 868MHz@19dBm - - BRD4164A / SLWSTK6000B / Wireless Starter Kit / 2.4GHz@19dBm - - BRD4166A / SLTB004A / Thunderboard Sense 2 / 2.4GHz@10dBm - - BRD4170A / SLWSTK6000B / Multiband Wireless Starter Kit / 2.4GHz@19dBm, - 915MHz@19dBm - - BRD4304A / SLWSTK6000B / MGM12P Module / 2.4GHz@19dBm - - MG21 boards: Currently not supported due to RAM limitation. - - - BRD4180A / SLWSTK6006A / Wireless Starter Kit / 2.4GHz@20dBm - - MG24 boards : - - - BRD4162A / SLWSTK6000B / Wireless Starter Kit / 2.4GHz@10dBm - - BRD4163A / SLWSTK6000B / Wireless Starter Kit / 2.4GHz@10dBm, - 868MHz@19dBm - - BRD4186A / SLWSTK6006A / Wireless Starter Kit / 2.4GHz@10dBm - - BRD4186C / SLWSTK6006A / Wireless Starter Kit / 2.4GHz@10dBm - - BRD4187A / SLWSTK6006A / Wireless Starter Kit / 2.4GHz@20dBm - - BRD4187C / SLWSTK6006A / Wireless Starter Kit / 2.4GHz@20dBm - * Build the example application: ``` cd ~/connectedhomeip - ./scripts/examples/gn_efr32_example.sh ./examples/lock-app/efr32/ ./out/lock_app BRD4161A + ./scripts/examples/gn_efr32_example.sh ./examples/lock-app/silabs/SiWx917/ ./out/lock_app BRD4325A --wifi rs911x ``` - To delete generated executable, libraries and object files use: @@ -142,206 +90,37 @@ Mac OS X $ rm -rf ./out/ ``` - OR use GN/Ninja directly - - ``` - $ cd ~/connectedhomeip/examples/lock-app/efr32 - $ git submodule update --init - $ source third_party/connectedhomeip/scripts/activate.sh - $ export EFR32_BOARD=BRD4161A - $ gn gen out/debug --args="efr32_sdk_root=\"${EFR32_SDK_ROOT}\" silabs_board=\"${EFR32_BOARD}\"" - $ ninja -C out/debug - ``` - -- To delete generated executable, libraries and object files use: - - ``` - $ cd ~/connectedhomeip/examples/lock-app/efr32 - $ rm -rf out/ - ``` - -* Build the example as Sleepy End Device (SED) - - ``` - $ ./scripts/examples/gn_efr32_example.sh ./examples/lighting-app/efr32/ ./out/lighting-app_SED BRD4161A --sed - ``` - - or use gn as previously mentioned but adding the following arguments: - - ``` - $ gn gen out/debug '--args=silabs_board="BRD4161A" enable_sleepy_device=true chip_openthread_ftd=false' - ``` - -* Build the example with pigweed RCP - - ``` - $ ./scripts/examples/gn_efr32_example.sh examples/lock-app/efr32/ out/lock_app_rpc BRD4161A 'import("//with_pw_rpc.gni")' - ``` - - or use GN/Ninja Directly - - ``` - $ cd ~/connectedhomeip/examples/lock-app/efr32 - $ git submodule update --init - $ source third_party/connectedhomeip/scripts/activate.sh - $ export EFR32_BOARD=BRD4161A - $ gn gen out/debug --args='import("//with_pw_rpc.gni")' - $ ninja -C out/debug - ``` - - [Running Pigweed RPC console](#running-pigweed-rpc-console) - -For more build options, help is provided when running the build script without -arguments - - ``` - ./scripts/examples/gn_efr32_example.sh - ``` - ## Flashing the Application -- On the command line: - - ``` - $ cd ~/connectedhomeip/examples/lock-app/efr32 - $ python3 out/debug/chip-efr32-lock-example.flash.py - ``` - -- Or with the Ozone debugger, just load the .out file. +- Flashing requires the SiWx917 SoC device to be configured in the Ozone Debugger. +- Once it's configured, it can be run with the Ozone Debugger by loading the .out file. + - > For detailed instructions, please refer to + > [Running the Matter Demo on SiWx917 SoC](https://github.com/SiliconLabs/matter/blob/latest/docs/silabs/wifi/RUN_DEMO_SiWx917_SoC.md) + > in the Silicon Labs Matter Github Repo ## Viewing Logging Output -The example application is built to use the SEGGER Real Time Transfer (RTT) -facility for log output. RTT is a feature built-in to the J-Link Interface MCU -on the WSTK development board. It allows bi-directional communication with an -embedded application without the need for a dedicated UART. - -Using the RTT facility requires downloading and installing the _SEGGER J-Link -Software and Documentation Pack_ -([web site](https://www.segger.com/downloads/jlink#J-LinkSoftwareAndDocumentationPack)). - -Alternatively, SEGGER Ozone J-Link debugger can be used to view RTT logs too -after flashing the .out file. - -- Download the J-Link installer by navigating to the appropriate URL and - agreeing to the license agreement. - -- [JLink_Linux_x86_64.deb](https://www.segger.com/downloads/jlink/JLink_Linux_x86_64.deb) -- [JLink_MacOSX.pkg](https://www.segger.com/downloads/jlink/JLink_MacOSX.pkg) - -* Install the J-Link software - - ``` - $ cd ~/Downloads - $ sudo dpkg -i JLink_Linux_V*_x86_64.deb - ``` - -* In Linux, grant the logged in user the ability to talk to the development - hardware via the linux tty device (/dev/ttyACMx) by adding them to the - dialout group. - - ``` - $ sudo usermod -a -G dialout ${USER} - ``` - -Once the above is complete, log output can be viewed using the JLinkExe tool in -combination with JLinkRTTClient as follows: - -- Run the JLinkExe tool with arguments to autoconnect to the WSTK board: - - For MG12 use: - - ``` - $ JLinkExe -device EFR32MG12PXXXF1024 -if JTAG -speed 4000 -autoconnect 1 - ``` - - For MG21 use: - - ``` - $ JLinkExe -device EFR32MG21AXXXF1024 -if SWD -speed 4000 -autoconnect 1 - ``` - -- In a second terminal, run the JLinkRTTClient to view logs: - - ``` - $ JLinkRTTClient - ``` +The example application's logging output can be viewed in the Ozone Debugger. ## Running the Complete Example -- It is assumed here that you already have an OpenThread border router - configured and running. If not see the following guide - [Openthread_border_router](https://github.com/project-chip/connectedhomeip/blob/master/docs/guides/openthread_border_router_pi.md) - for more information on how to setup a border router on a raspberryPi. - - Take note that the RCP code is available directly through - [Simplicity Studio 5](https://www.silabs.com/products/development-tools/software/simplicity-studio/simplicity-studio-5) - under File->New->Project Wizard->Examples->Thread : ot-rcp - -- User interface : **LCD** The LCD on Silabs WSTK shows a QR Code. This QR - Code is be scanned by the CHIP Tool app For the Rendez-vous procedure over - BLE - - * On devices that do not have or support the LCD Display like the BRD4166A Thunderboard Sense 2, - a URL can be found in the RTT logs. - - [SVR] Copy/paste the below URL in a browser to see the QR Code: - [SVR] https://project-chip.github.io/connectedhomeip/qrcode.html?data=CH%3AI34NM%20-00%200C9SS0 - - **LED 0** shows the overall state of the device and its connectivity. The - following states are possible: - - - _Short Flash On (50 ms on/950 ms off)_ ; The device is in the - unprovisioned (unpaired) state and is waiting for a commissioning - application to connect. - - - _Rapid Even Flashing_ ; (100 ms on/100 ms off)_ — The device is in the - unprovisioned state and a commissioning application is connected through - Bluetooth LE. - - - _Short Flash Off_ ; (950ms on/50ms off)_ — The device is fully - provisioned, but does not yet have full Thread network or service - connectivity. +- You can provision and control the Chip device using the chip-tool standalone - - _Solid On_ ; The device is fully provisioned and has full Thread - network and service connectivity. + [chip-tool](https://github.com/project-chip/connectedhomeip/blob/master/examples/chip-tool/README.md) - **LED 1** Simulates the Lock The following states are possible: - - - _Solid On_ ; Bolt is unlocked - - _Blinking_ ; Bolt is moving to the desired state - - _Off_ ; Bolt is locked - - **Push Button 0** - - - _Press and Release_ : Start, or restart, BLE advertisement in fast mode. It will advertise in this mode - for 30 seconds. The device will then switch to a slower interval advertisement. - After 15 minutes, the advertisement stops. - - - _Pressed and hold for 6 s_ : Initiates the factory reset of the device. - Releasing the button within the 6-second window cancels the factory reset - procedure. **LEDs** blink in unison when the factory reset procedure is - initiated. - - **Push Button 1** Toggles the bolt state On/Off - -- You can provision and control the Chip device using the python controller, - Chip tool standalone, Android or iOS app - - [CHIPTool](https://github.com/project-chip/connectedhomeip/blob/master/examples/chip-tool/README.md) - -Here is some CHIPTool examples: +Here are some chip-tool examples: Pairing with chip-tool: ``` - chip-tool pairing ble-thread 1 hex: 20202021 3840 + chip-tool pairing ble-wifi 1122 $SSID $PSK 20202021 3840 ``` + - > $SSID and $PSK are the SSID and passcode of your Wi-Fi Access Point. Set a user: ``` @@ -381,40 +160,32 @@ Here is some CHIPTool examples: ### Notes -- Depending on your network settings your router might not provide native ipv6 - addresses to your devices (Border router / PC). If this is the case, you - need to add a static ipv6 addresses on both device and then an ipv6 route to - the border router on your PC - -#On Border Router: \$ sudo ip addr add dev 2002::2/64 +- Depending on your network settings your router might not provide native IPv6 + addresses to your devices (Router / PC). If this is the case, you + need to add a static IPv6 addresses on both devices and then an IPv6 route to + the router on your PC #On PC(Linux): \$ sudo ip addr add dev 2002::1/64 -#Add Ipv6 route on PC(Linux) \$ sudo ip route add /64 +#Add IPv6 route on PC(Linux) \$ sudo ip route add /64 via 2002::2 ## Memory settings While most of the RAM usage in CHIP is static, allowing easier debugging and optimization with symbols analysis, we still need some HEAP for the crypto and -OpenThread. Size of the HEAP can be modified by changing the value of the +Wi-Fi stack. Size of the HEAP can be modified by changing the value of the `configTOTAL_HEAP_SIZE` define inside of the FreeRTOSConfig.h file of this -example. Please take note that a HEAP size smaller than 13k can and will cause a -Mbedtls failure during the BLE rendez-vous or CASE session +example. Please take note that a HEAP size smaller than 13k can and will cause an +Mbedtls failure during the BLE rendezvous or CASE session To track memory usage you can set `enable_heap_monitoring = true` either in the BUILD.gn file or pass it as a build argument to gn. This will print on the RTT console the RAM usage of each individual task and the number of Memory allocation and Free. While this is not extensive monitoring you're welcome to -modify `examples/platform/efr32/MemMonitoring.cpp` to add your own memory +modify `examples/platform/silabs/SiWx917/MemMonitoring.cpp` to add your own memory tracking code inside the `trackAlloc` and `trackFree` function -## OTA Software Update - -For the description of Software Update process with EFR32 example applications -see -[EFR32 OTA Software Update](../../../docs/guides/silabs_efr32_software_update.md) - ## Building options All of Silabs's examples within the Matter repo have all the features enabled by @@ -426,7 +197,7 @@ features can easily be toggled on or off. Here is a short list of options : `chip_progress_logging, chip_detail_logging, chip_automation_logging` ``` - $ ./scripts/examples/gn_efr32_example.sh ./examples/lighting-app/efr32 ./out/lighting-app BRD4164A "chip_detail_logging=false chip_automation_logging=false chip_progress_logging=false" + $ ./scripts/examples/gn_efr32_example.sh ./examples/lock-app/silabs/SiWx917 ./out/lock-app BRD4325A "chip_detail_logging=false chip_automation_logging=false chip_progress_logging=false" --wifi rs911x ``` ### Debug build / release build @@ -434,7 +205,7 @@ features can easily be toggled on or off. Here is a short list of options : `is_debug` ``` - $ ./scripts/examples/gn_efr32_example.sh ./examples/lighting-app/efr32 ./out/lighting-app BRD4164A "is_debug=false" + $ ./scripts/examples/gn_efr32_example.sh ./examples/lock-app/silabs/SiWx917 ./out/lock-app BRD4325A "is_debug=false" --wifi rs911x ``` ### Disabling LCD @@ -442,7 +213,7 @@ features can easily be toggled on or off. Here is a short list of options : `show_qr_code` ``` - $ ./scripts/examples/gn_efr32_example.sh ./examples/lighting-app/efr32 ./out/lighting-app BRD4164A "show_qr_code=false" + $ ./scripts/examples/gn_efr32_example.sh ./examples/lock-app/silabs/SiWx917 ./out/lock-app BRD4325A "show_qr_code=false" --wifi rs911x ``` ### KVS maximum entry count @@ -453,5 +224,5 @@ features can easily be toggled on or off. Here is a short list of options : Set the maximum Kvs entries that can be stored in NVM (Default 75) Thresholds: 30 <= kvs_max_entries <= 255 - $ ./scripts/examples/gn_efr32_example.sh ./examples/lighting-app/efr32 ./out/lighting-app BRD4164A kvs_max_entries=50 + $ ./scripts/examples/gn_efr32_example.sh ./examples/lock-app/silabs/SiWx917 ./out/lock-app BRD4325A kvs_max_entries=50 --wifi rs911x ``` diff --git a/examples/lock-app/silabs/efr32/README.md b/examples/lock-app/silabs/efr32/README.md index e4d4548670c273..492f7e191df08d 100644 --- a/examples/lock-app/silabs/efr32/README.md +++ b/examples/lock-app/silabs/efr32/README.md @@ -32,8 +32,8 @@ An example showing the use of CHIP on the Silicon Labs EFR32 MG12 and MG24. ## Introduction The EFR32 lock example provides a baseline demonstration of a door lock control -device, built using Matter and the Silicon Labs gecko SDK. It can be controlled -by a Chip controller over an Openthread or Wifi network.. +device, built using Matter and the Silicon Labs Gecko SDK. It can be controlled +by a Chip controller over an Openthread or Wi-Fi network.. The EFR32 device can be commissioned over Bluetooth Low Energy where the device and the Chip controller will exchange security information with the Rendez-vous @@ -42,7 +42,7 @@ EFR32 device which will then join the Thread network. If the LCD is enabled, the LCD on the Silabs WSTK shows a QR Code containing the needed commissioning information for the BLE connection and starting the -Rendez-vous procedure. +rendezvous procedure. The lighting example is intended to serve both as a means to explore the workings of Matter as well as a template for creating real products based on the @@ -132,7 +132,7 @@ Mac OS X ``` cd ~/connectedhomeip - ./scripts/examples/gn_efr32_example.sh ./examples/lock-app/efr32/ ./out/lock_app BRD4161A + ./scripts/examples/gn_efr32_example.sh ./examples/lock-app/silabs/efr32/ ./out/lock_app BRD4161A ``` - To delete generated executable, libraries and object files use: @@ -145,25 +145,25 @@ Mac OS X OR use GN/Ninja directly ``` - $ cd ~/connectedhomeip/examples/lock-app/efr32 + $ cd ~/connectedhomeip/examples/lock-app/silabs/efr32 $ git submodule update --init $ source third_party/connectedhomeip/scripts/activate.sh - $ export EFR32_BOARD=BRD4161A - $ gn gen out/debug --args="efr32_sdk_root=\"${EFR32_SDK_ROOT}\" silabs_board=\"${EFR32_BOARD}\"" + $ export SILABS_BOARD=BRD4161A + $ gn gen out/debug --args="efr32_sdk_root=\"${EFR32_SDK_ROOT}\" silabs_board=\"${SILABS_BOARD}\"" $ ninja -C out/debug ``` - To delete generated executable, libraries and object files use: ``` - $ cd ~/connectedhomeip/examples/lock-app/efr32 + $ cd ~/connectedhomeip/examples/lock-app/silabs/efr32 $ rm -rf out/ ``` * Build the example as Sleepy End Device (SED) ``` - $ ./scripts/examples/gn_efr32_example.sh ./examples/lighting-app/efr32/ ./out/lighting-app_SED BRD4161A --sed + $ ./scripts/examples/gn_efr32_example.sh ./examples/lock-app/silabs/efr32/ ./out/lock-app_SED BRD4161A --sed ``` or use gn as previously mentioned but adding the following arguments: @@ -175,16 +175,16 @@ Mac OS X * Build the example with pigweed RCP ``` - $ ./scripts/examples/gn_efr32_example.sh examples/lock-app/efr32/ out/lock_app_rpc BRD4161A 'import("//with_pw_rpc.gni")' + $ ./scripts/examples/gn_efr32_example.sh examples/lock-app/silabs/efr32/ out/lock_app_rpc BRD4161A 'import("//with_pw_rpc.gni")' ``` or use GN/Ninja Directly ``` - $ cd ~/connectedhomeip/examples/lock-app/efr32 + $ cd ~/connectedhomeip/examples/lock-app/silabs/efr32 $ git submodule update --init $ source third_party/connectedhomeip/scripts/activate.sh - $ export EFR32_BOARD=BRD4161A + $ export SILABS_BOARD=BRD4161A $ gn gen out/debug --args='import("//with_pw_rpc.gni")' $ ninja -C out/debug ``` @@ -205,7 +205,7 @@ arguments - On the command line: ``` - $ cd ~/connectedhomeip/examples/lock-app/efr32 + $ cd ~/connectedhomeip/examples/lock-app/silabs/efr32 $ python3 out/debug/chip-efr32-lock-example.flash.py ``` @@ -285,7 +285,7 @@ combination with JLinkRTTClient as follows: under File->New->Project Wizard->Examples->Thread : ot-rcp - User interface : **LCD** The LCD on Silabs WSTK shows a QR Code. This QR - Code is be scanned by the CHIP Tool app For the Rendez-vous procedure over + Code is be scanned by the chip-tool app For the Rendez-vous procedure over BLE * On devices that do not have or support the LCD Display like the BRD4166A Thunderboard Sense 2, @@ -332,11 +332,11 @@ combination with JLinkRTTClient as follows: **Push Button 1** Toggles the bolt state On/Off - You can provision and control the Chip device using the python controller, - Chip tool standalone, Android or iOS app + chip-tool standalone, Android or iOS app - [CHIPTool](https://github.com/project-chip/connectedhomeip/blob/master/examples/chip-tool/README.md) + [chip-tool](https://github.com/project-chip/connectedhomeip/blob/master/examples/chip-tool/README.md) -Here is some CHIPTool examples: +Here are some chip-tool examples: Pairing with chip-tool: ``` @@ -381,16 +381,16 @@ Here is some CHIPTool examples: ### Notes -- Depending on your network settings your router might not provide native ipv6 +- Depending on your network settings your router might not provide native IPv6 addresses to your devices (Border router / PC). If this is the case, you - need to add a static ipv6 addresses on both device and then an ipv6 route to + need to add a static IPv6 addresses on both devices and then an IPv6 route to the border router on your PC #On Border Router: \$ sudo ip addr add dev 2002::2/64 #On PC(Linux): \$ sudo ip addr add dev 2002::1/64 -#Add Ipv6 route on PC(Linux) \$ sudo ip route add /64 +#Add IPv6 route on PC(Linux) \$ sudo ip route add /64 via 2002::2 ## Memory settings @@ -399,14 +399,14 @@ While most of the RAM usage in CHIP is static, allowing easier debugging and optimization with symbols analysis, we still need some HEAP for the crypto and OpenThread. Size of the HEAP can be modified by changing the value of the `configTOTAL_HEAP_SIZE` define inside of the FreeRTOSConfig.h file of this -example. Please take note that a HEAP size smaller than 13k can and will cause a -Mbedtls failure during the BLE rendez-vous or CASE session +example. Please take note that a HEAP size smaller than 13k can and will cause an +Mbedtls failure during the BLE rendezvous or CASE session To track memory usage you can set `enable_heap_monitoring = true` either in the BUILD.gn file or pass it as a build argument to gn. This will print on the RTT console the RAM usage of each individual task and the number of Memory allocation and Free. While this is not extensive monitoring you're welcome to -modify `examples/platform/efr32/MemMonitoring.cpp` to add your own memory +modify `examples/platform/silabs/efr32/MemMonitoring.cpp` to add your own memory tracking code inside the `trackAlloc` and `trackFree` function ## OTA Software Update @@ -426,7 +426,7 @@ features can easily be toggled on or off. Here is a short list of options : `chip_progress_logging, chip_detail_logging, chip_automation_logging` ``` - $ ./scripts/examples/gn_efr32_example.sh ./examples/lighting-app/efr32 ./out/lighting-app BRD4164A "chip_detail_logging=false chip_automation_logging=false chip_progress_logging=false" + $ ./scripts/examples/gn_efr32_example.sh ./examples/lock-app/silabs/efr32 ./out/lock-app BRD4164A "chip_detail_logging=false chip_automation_logging=false chip_progress_logging=false" ``` ### Debug build / release build @@ -434,7 +434,7 @@ features can easily be toggled on or off. Here is a short list of options : `is_debug` ``` - $ ./scripts/examples/gn_efr32_example.sh ./examples/lighting-app/efr32 ./out/lighting-app BRD4164A "is_debug=false" + $ ./scripts/examples/gn_efr32_example.sh ./examples/lock-app/silabs/efr32 ./out/lock-app BRD4164A "is_debug=false" ``` ### Disabling LCD @@ -442,7 +442,7 @@ features can easily be toggled on or off. Here is a short list of options : `show_qr_code` ``` - $ ./scripts/examples/gn_efr32_example.sh ./examples/lighting-app/efr32 ./out/lighting-app BRD4164A "show_qr_code=false" + $ ./scripts/examples/gn_efr32_example.sh ./examples/lock-app/silabs/efr32 ./out/lock-app BRD4164A "show_qr_code=false" ``` ### KVS maximum entry count @@ -453,5 +453,5 @@ features can easily be toggled on or off. Here is a short list of options : Set the maximum Kvs entries that can be stored in NVM (Default 75) Thresholds: 30 <= kvs_max_entries <= 255 - $ ./scripts/examples/gn_efr32_example.sh ./examples/lighting-app/efr32 ./out/lighting-app BRD4164A kvs_max_entries=50 + $ ./scripts/examples/gn_efr32_example.sh ./examples/lock-app/silabs/efr32 ./out/lock-app BRD4164A kvs_max_entries=50 ``` diff --git a/examples/window-app/silabs/SiWx917/README.md b/examples/window-app/silabs/SiWx917/README.md index dda149285a8f91..0cda96d1b2c5dd 100644 --- a/examples/window-app/silabs/SiWx917/README.md +++ b/examples/window-app/silabs/SiWx917/README.md @@ -1,17 +1,16 @@ -# Matter EFR32 Window Covering Example +# Matter SiWx917 Window Covering Example -An example showing the use of CHIP on the Silicon Labs EFR32 MG12 and MG24. +An example showing the use of CHIP on the Silicon Labs SiWx917 SoC device.
-- [Matter EFR32 Window Covering Example](#matter-efr32-window-covering-example) +- [Matter SiWx917 Window Covering Example](#matter-siwx917-window-covering-example) - [Introduction](#introduction) - [Building](#building) - [Flashing the Application](#flashing-the-application) - [Viewing Logging Output](#viewing-logging-output) - [Running the Complete Example](#running-the-complete-example) - - [Notes](#notes) - - [OTA Software Update](#ota-software-update) + - [Notes](#notes) - [Building options](#building-options) - [Disabling logging](#disabling-logging) - [Debug build / release build](#debug-build--release-build) @@ -30,18 +29,18 @@ An example showing the use of CHIP on the Silicon Labs EFR32 MG12 and MG24. ## Introduction -The EFR32 window-covering example provides a baseline demonstration of a Window -Covering device, built using Matter and the Silicon Labs gecko SDK. It can be -controlled by a Chip controller over an Openthread or Wifi network. +The SiWx917 window-covering example provides a baseline demonstration of a Window +Covering device, built using Matter, the Silicon Labs Gecko SDK, and the Silicon Labs WiseMCU SDK. It can be controlled +by a Chip controller over a Wi-Fi network. -The EFR32 device can be commissioned over Bluetooth Low Energy where the device -and the Chip controller will exchange security information with the Rendez-vous -procedure. In the case of Thread, the Thread Network credentials are provided to -the EFR32 device which will then join the Thread network. +The SiWx917 device can be commissioned over Bluetooth Low Energy where the device +and the Chip controller will exchange security information with the rendezvous +procedure. The Wi-Fi Network credentials are provided to +the SiWx917 device which will then join the Wi-Fi network. If the LCD is enabled, the LCD on the Silabs WSTK shows a QR Code containing the needed commissioning information for the BLE connection and starting the -Rendez-vous procedure. Once the device is commissioned, the displays shows a +rendezvous procedure. Once the device is commissioned, the displays shows a representation of the window covering state. The window-covering example is intended to serve both as a means to explore the @@ -75,247 +74,44 @@ Silicon Labs platform. > [Hardware Requirements](https://github.com/SiliconLabs/matter/blob/latest/docs/silabs/general/HARDWARE_REQUIREMENTS.md) > in the Silicon Labs Matter Github Repo - MG12 boards: - - - BRD4161A / SLWSTK6000B / Wireless Starter Kit / 2.4GHz@19dBm - - BRD4162A / SLWSTK6000B / Wireless Starter Kit / 2.4GHz@10dBm - - BRD4163A / SLWSTK6000B / Wireless Starter Kit / 2.4GHz@10dBm, - 868MHz@19dBm - - BRD4164A / SLWSTK6000B / Wireless Starter Kit / 2.4GHz@19dBm - - BRD4166A / SLTB004A / Thunderboard Sense 2 / 2.4GHz@10dBm - - BRD4170A / SLWSTK6000B / Multiband Wireless Starter Kit / 2.4GHz@19dBm, - 915MHz@19dBm - - BRD4304A / SLWSTK6000B / MGM12P Module / 2.4GHz@19dBm - - MG21 boards: Currently not supported due to RAM limitation. - - - BRD4180A / SLWSTK6006A / Wireless Starter Kit / 2.4GHz@20dBm - - MG24 boards : - - - BRD2601B / SLWSTK6000B / Wireless Starter Kit / 2.4GHz@10dBm - - BRD2703A / SLWSTK6000B / Wireless Starter Kit / 2.4GHz@10dBm - - BRD4186A / SLWSTK6006A / Wireless Starter Kit / 2.4GHz@10dBm - - BRD4186C / SLWSTK6006A / Wireless Starter Kit / 2.4GHz@10dBm - - BRD4187A / SLWSTK6006A / Wireless Starter Kit / 2.4GHz@20dBm - - BRD4187C / SLWSTK6006A / Wireless Starter Kit / 2.4GHz@20dBm - * Build the example application: cd ~/connectedhomeip - ./scripts/examples/gn_efr32_example.sh ./examples/window-app/efr32/ ./out/window-app BRD4161A + ./scripts/examples/gn_efr32_example.sh ./examples/window-app/silabs/SiWx917/ ./out/window-app BRD4325A --wifi rs911x - To delete generated executable, libraries and object files use: $ cd ~/connectedhomeip $ rm -rf ./out/ - OR use GN/Ninja directly - - $ cd ~/connectedhomeip/examples/window-app/efr32 - $ git submodule update --init - $ source third_party/connectedhomeip/scripts/activate.sh - $ export EFR32_BOARD=BRD4161A - $ gn gen out/debug - $ ninja -C out/debug - -- To delete generated executable, libraries and object files use: - - $ cd ~/connectedhomeip/examples/window-app/efr32 - $ rm -rf out/ - -* Build the example as Sleepy End Device (SED) - - $ ./scripts/examples/gn_efr32_example.sh ./examples/window-app/efr32/ ./out/window-app_SED BRD4161A --sed - - or use gn as previously mentioned but adding the following arguments: - - $ gn gen out/debug '--args=silabs_board="BRD4161A" enable_sleepy_device=true chip_openthread_ftd=false' - -* Build the example with pigweed RCP - - $ ./scripts/examples/gn_efr32_example.sh examples/window-app/efr32/ out/window_app_rpc BRD4161A 'import("//with_pw_rpc.gni")' - - or use GN/Ninja Directly - - $ cd ~/connectedhomeip/examples/window-app/efr32 - $ git submodule update --init - $ source third_party/connectedhomeip/scripts/activate.sh - $ export EFR32_BOARD=BRD4161A - $ gn gen out/debug --args='import("//with_pw_rpc.gni")' - $ ninja -C out/debug - - [Running Pigweed RPC console](#running-pigweed-rpc-console) - -For more build options, help is provided when running the build script without -arguments - - ./scripts/examples/gn_efr32_example.sh - ## Flashing the Application -- On the command line: - - $ cd ~/connectedhomeip/examples/window-app/efr32 - $ python3 out/debug/chip-efr32-window-example.flash.py - -- Or with the Ozone debugger, just load the .out file. +- Flashing requires the SiWx917 SoC device to be configured in the Ozone Debugger. +- Once it's configured, it can be run with the Ozone Debugger by loading the .out file. + - > For detailed instructions, please refer to + > [Running the Matter Demo on SiWx917 SoC](https://github.com/SiliconLabs/matter/blob/latest/docs/silabs/wifi/RUN_DEMO_SiWx917_SoC.md) + > in the Silicon Labs Matter Github Repo ## Viewing Logging Output -The example application is built to use the SEGGER Real Time Transfer (RTT) -facility for log output. RTT is a feature built-in to the J-Link Interface MCU -on the WSTK development board. It allows bi-directional communication with an -embedded application without the need for a dedicated UART. - -Using the RTT facility requires downloading and installing the _SEGGER J-Link -Software and Documentation Pack_ -([web site](https://www.segger.com/downloads/jlink#J-LinkSoftwareAndDocumentationPack)). - -Alternatively, SEGGER Ozone J-Link debugger can be used to view RTT logs too -after flashing the .out file. - -- Download the J-Link installer by navigating to the appropriate URL and - agreeing to the license agreement. - -- [JLink_Linux_x86_64.deb](https://www.segger.com/downloads/jlink/JLink_Linux_x86_64.deb) -- [JLink_MacOSX.pkg](https://www.segger.com/downloads/jlink/JLink_MacOSX.pkg) - -* Install the J-Link software - - $ cd ~/Downloads - $ sudo dpkg -i JLink_Linux_V*_x86_64.deb - -* In Linux, grant the logged in user the ability to talk to the development - hardware via the linux tty device (/dev/ttyACMx) by adding them to the - dialout group. - - $ sudo usermod -a -G dialout ${USER} - -Once the above is complete, log output can be viewed using the JLinkExe tool in -combination with JLinkRTTClient as follows: - -- Run the JLinkExe tool with arguments to autoconnect to the WSTK board: - - For MG12 use: - - $ JLinkExe -device EFR32MG12PXXXF1024 -if JTAG -speed 4000 -autoconnect 1 - - For MG21 use: - - $ JLinkExe -device EFR32MG21AXXXF1024 -if SWD -speed 4000 -autoconnect 1 - -- In a second terminal, run the JLinkRTTClient to view logs: - - $ JLinkRTTClient +The example application's logging output can be viewed in the Ozone Debugger. ## Running the Complete Example -- It is assumed here that you already have an OpenThread border router - configured and running. If not see the following guide - [Openthread_border_router](https://github.com/project-chip/connectedhomeip/blob/master/docs/guides/openthread_border_router_pi.md) - for more information on how to setup a border router on a raspberryPi. - - Take note that the RCP code is available directly through - [Simplicity Studio 5](https://www.silabs.com/products/development-tools/software/simplicity-studio/simplicity-studio-5) - under File->New->Project Wizard->Examples->Thread : ot-rcp - -- User interface : **LCD** The LCD on Silabs WSTK shows a QR Code. This QR - Code is be scanned by the CHIP Tool app For the Rendez-vous procedure over - BLE - - * On devices that do not have or support the LCD Display like the BRD4166A Thunderboard Sense 2, - a URL can be found in the RTT logs. - - [SVR] Copy/paste the below URL in a browser to see the QR Code: - [SVR] https://project-chip.github.io/connectedhomeip/qrcode.html?data=CH%3AI34NM%20-00%200C9SS0 - - **LED 0** shows the overall state of the device and its connectivity. The - following states are possible: - - - _Short Flash On (50 ms on/950 ms off)_ ; The device is in the - unprovisioned (unpaired) state and is waiting for a commissioning - application to connect. - - - _Rapid Even Flashing_ ; (100 ms on/100 ms off)_ — The device is in the - unprovisioned state and a commissioning application is connected through - Bluetooth LE. - - - _Short Flash Off_ ; (950ms on/50ms off)_ — The device is fully - provisioned, but does not yet have full Thread network or service - connectivity. - - - _Solid On_ ; The device is fully provisioned and has full Thread - network and service connectivity. - - **LED 1** Shows the state of the window covering - - - _Solid On_ ; The window cover if fully open - - _Off_ ; The window cover if fully closed - - _Blinking slowly_ ; The window cover is half-open, either by tilt, or lift - - _Blinking quickly_ ; The window cover is being automatically open or closed - - **Push Button 0** Increase either tilt or lift, and factory reset - - - Pressed and release: The lift/tilt increases by 10% - - - Pressed and hold for 6 s: Initiates the factory reset of the device. - Releasing the button within the 6-second window cancels the factory reset - procedure. **LEDs** blink in unison when the factory reset procedure is - initiated. - - **Push Button 1** Decreases either tilt or lift, or switch the cover type - - - Pressed and release: The lift/tilt decreases by 10% - - - Press and hold for 3 s: Cycle between window covering type (Rollershade, Drapery, Tilt Blind - Lift and Tilt). - - **Push Button0 and Button1** Switch between lift and tilt - - - Pressing and release both buttons at the same time: switches between lift and tilt modes. Most window covering types support either lift only, or tilt only, but type 0x08 support both (default) - - - Pressing and hold both buttons at the same time: Cycles between window covering 1, and window covering 2. - -* Once the device is provisioned, it will join the Thread network is - established, look for the RTT log - - ``` -     [DL] Device Role: CHILD -     [DL] Partition Id:0x6A7491B7 -     [DL] \_OnPlatformEvent default: event->Type = 32778 -     [DL] OpenThread State Changed (Flags: 0x00000001) -     [DL] Thread Unicast Addresses: -     [DL]    2001:DB8::E1A2:87F1:7D5D:FECA/64 valid preferred -     [DL]    FDDE:AD00:BEEF::FF:FE00:2402/64 valid preferred rloc -     [DL]    FDDE:AD00:BEEF:0:383F:5E81:A05A:B168/64 valid preferred -     [DL]    FE80::D8F2:592E:C109:CF00/64 valid preferred -     [DL] LwIP Thread interface addresses updated -     [DL] FE80::D8F2:592E:C109:CF00 IPv6 link-local address, preferred) -     [DL] FDDE:AD00:BEEF:0:383F:5E81:A05A:B168 Thread mesh-local address, preferred) -     [DL] 2001:DB8::E1A2:87F1:7D5D:FECA IPv6 global unicast address, preferred) - ``` - - (you can verify that the device is on the thread network with the command - `router table` using a serial terminal (screen / minicom etc.) on the board - running the window-app example. You can also get the address list with the - command ipaddr again in the serial terminal ) - - You can provision the Chip device using Chip tool Android or iOS app or - through CLI commands on your OT BR - - The - [CHIPTool](https://github.com/project-chip/connectedhomeip/blob/master/examples/chip-tool/README.md) - can now be used to send ZCL commands to the window covering device. For + You can provision the [chip-tool](https://github.com/project-chip/connectedhomeip/blob/master/examples/chip-tool/README.md) + and send ZCL commands to the window covering device. For instance, to set the window covering lift by percentage: + - > $SSID and $PSK are the SSID and passcode of your Wi-Fi Access Point. + ``` - chip-tool pairing ble-thread 1 hex: 20202021 3840 + chip-tool pairing ble-wifi 1122 $SSID $PSK 20202021 3840 chip-tool onoff on 1 1 @@ -330,27 +126,16 @@ combination with JLinkRTTClient as follows: ### Notes -- Depending on your network settings your router might not provide native ipv6 - addresses to your devices (Border router / PC). If this is the case, you - need to add a static ipv6 addresses on both device and then an ipv6 route to +- Depending on your network settings your router might not provide native IPv6 + addresses to your devices (Router / PC). If this is the case, you + need to add a static IPv6 addresses on both devices and then an IPv6 route to the border router on your PC - # On Border Router : - $ sudo ip addr add dev 2002::2/64 - # On PC (Linux) : $ sudo ip addr add dev 2002::1/64 - # Add Ipv6 route on PC (Linux) - $ sudo ip route add /64 via 2002::2 - - - -## OTA Software Update - -For the description of Software Update process with EFR32 example applications -see -[EFR32 OTA Software Update](../../../docs/guides/silabs_efr32_software_update.md) + # Add IPv6 route on PC (Linux) + $ sudo ip route add /64 via 2002::2 ## Building options @@ -362,19 +147,19 @@ features can easily be toggled on or off. Here is a short list of options : chip_progress_logging, chip_detail_logging, chip_automation_logging - $ ./scripts/examples/gn_efr32_example.sh ./examples/lighting-app/efr32 ./out/lighting-app BRD4164A "chip_detail_logging=false chip_automation_logging=false chip_progress_logging=false" + $ ./scripts/examples/gn_efr32_example.sh ./examples/window-app/silabs/SiWx917 ./out/window-app BRD4325A "chip_detail_logging=false chip_automation_logging=false chip_progress_logging=false" --wifi rs911x ### Debug build / release build is_debug - $ ./scripts/examples/gn_efr32_example.sh ./examples/lighting-app/efr32 ./out/lighting-app BRD4164A "is_debug=false" + $ ./scripts/examples/gn_efr32_example.sh ./examples/window-app/silabs/SiWx917 ./out/window-app BRD4325A "is_debug=false" --wifi rs911x ### Disabling LCD show_qr_code - $ ./scripts/examples/gn_efr32_example.sh ./examples/lighting-app/efr32 ./out/lighting-app BRD4164A "show_qr_code=false" + $ ./scripts/examples/gn_efr32_example.sh ./examples/window-app/silabs/SiWx917 ./out/window-app BRD4325A "show_qr_code=false" --wifi rs911x ### KVS maximum entry count @@ -383,4 +168,4 @@ kvs_max_entries Set the maximum Kvs entries that can be stored in NVM (Default 75) Thresholds: 30 <= kvs_max_entries <= 255 - $ ./scripts/examples/gn_efr32_example.sh ./examples/lighting-app/efr32 ./out/lighting-app BRD4164A kvs_max_entries=50 + $ ./scripts/examples/gn_efr32_example.sh ./examples/window-app/silabs/SiWx917 ./out/window-app BRD4325A kvs_max_entries=50 --wifi rs911x diff --git a/examples/window-app/silabs/efr32/README.md b/examples/window-app/silabs/efr32/README.md index dda149285a8f91..45466c4a54aaf5 100644 --- a/examples/window-app/silabs/efr32/README.md +++ b/examples/window-app/silabs/efr32/README.md @@ -31,17 +31,17 @@ An example showing the use of CHIP on the Silicon Labs EFR32 MG12 and MG24. ## Introduction The EFR32 window-covering example provides a baseline demonstration of a Window -Covering device, built using Matter and the Silicon Labs gecko SDK. It can be -controlled by a Chip controller over an Openthread or Wifi network. +Covering device, built using Matter and the Silicon Labs Gecko SDK. It can be +controlled by a Chip controller over an Openthread or Wi-Fi network. The EFR32 device can be commissioned over Bluetooth Low Energy where the device -and the Chip controller will exchange security information with the Rendez-vous +and the Chip controller will exchange security information with the rendezvous procedure. In the case of Thread, the Thread Network credentials are provided to the EFR32 device which will then join the Thread network. If the LCD is enabled, the LCD on the Silabs WSTK shows a QR Code containing the needed commissioning information for the BLE connection and starting the -Rendez-vous procedure. Once the device is commissioned, the displays shows a +rendezvous procedure. Once the device is commissioned, the displays shows a representation of the window covering state. The window-covering example is intended to serve both as a means to explore the @@ -103,7 +103,7 @@ Silicon Labs platform. * Build the example application: cd ~/connectedhomeip - ./scripts/examples/gn_efr32_example.sh ./examples/window-app/efr32/ ./out/window-app BRD4161A + ./scripts/examples/gn_efr32_example.sh ./examples/window-app/silabs/efr32/ ./out/window-app BRD4161A - To delete generated executable, libraries and object files use: @@ -112,21 +112,21 @@ Silicon Labs platform. OR use GN/Ninja directly - $ cd ~/connectedhomeip/examples/window-app/efr32 + $ cd ~/connectedhomeip/examples/window-app/silabs/efr32 $ git submodule update --init $ source third_party/connectedhomeip/scripts/activate.sh - $ export EFR32_BOARD=BRD4161A + $ export SILABS_BOARD=BRD4161A $ gn gen out/debug $ ninja -C out/debug - To delete generated executable, libraries and object files use: - $ cd ~/connectedhomeip/examples/window-app/efr32 + $ cd ~/connectedhomeip/examples/window-app/silabs/efr32 $ rm -rf out/ * Build the example as Sleepy End Device (SED) - $ ./scripts/examples/gn_efr32_example.sh ./examples/window-app/efr32/ ./out/window-app_SED BRD4161A --sed + $ ./scripts/examples/gn_efr32_example.sh ./examples/window-app/silabs/efr32/ ./out/window-app_SED BRD4161A --sed or use gn as previously mentioned but adding the following arguments: @@ -134,14 +134,14 @@ Silicon Labs platform. * Build the example with pigweed RCP - $ ./scripts/examples/gn_efr32_example.sh examples/window-app/efr32/ out/window_app_rpc BRD4161A 'import("//with_pw_rpc.gni")' + $ ./scripts/examples/gn_efr32_example.sh examples/window-app/silabs/efr32/ out/window_app_rpc BRD4161A 'import("//with_pw_rpc.gni")' or use GN/Ninja Directly - $ cd ~/connectedhomeip/examples/window-app/efr32 + $ cd ~/connectedhomeip/examples/window-app/silabs/efr32 $ git submodule update --init $ source third_party/connectedhomeip/scripts/activate.sh - $ export EFR32_BOARD=BRD4161A + $ export SILABS_BOARD=BRD4161A $ gn gen out/debug --args='import("//with_pw_rpc.gni")' $ ninja -C out/debug @@ -158,7 +158,7 @@ arguments - On the command line: - $ cd ~/connectedhomeip/examples/window-app/efr32 + $ cd ~/connectedhomeip/examples/window-app/silabs/efr32 $ python3 out/debug/chip-efr32-window-example.flash.py - Or with the Ozone debugger, just load the .out file. @@ -227,7 +227,7 @@ combination with JLinkRTTClient as follows: under File->New->Project Wizard->Examples->Thread : ot-rcp - User interface : **LCD** The LCD on Silabs WSTK shows a QR Code. This QR - Code is be scanned by the CHIP Tool app For the Rendez-vous procedure over + Code is be scanned by the chip-tool app For the Rendez-vous procedure over BLE * On devices that do not have or support the LCD Display like the BRD4166A Thunderboard Sense 2, @@ -306,11 +306,11 @@ combination with JLinkRTTClient as follows: running the window-app example. You can also get the address list with the command ipaddr again in the serial terminal ) - You can provision the Chip device using Chip tool Android or iOS app or + You can provision the Chip device using chip-tool Android or iOS app or through CLI commands on your OT BR The - [CHIPTool](https://github.com/project-chip/connectedhomeip/blob/master/examples/chip-tool/README.md) + [chip-tool](https://github.com/project-chip/connectedhomeip/blob/master/examples/chip-tool/README.md) can now be used to send ZCL commands to the window covering device. For instance, to set the window covering lift by percentage: @@ -330,9 +330,9 @@ combination with JLinkRTTClient as follows: ### Notes -- Depending on your network settings your router might not provide native ipv6 +- Depending on your network settings your router might not provide native IPv6 addresses to your devices (Border router / PC). If this is the case, you - need to add a static ipv6 addresses on both device and then an ipv6 route to + need to add a static IPv6 addresses on both devices and then an IPv6 route to the border router on your PC # On Border Router : @@ -341,8 +341,8 @@ combination with JLinkRTTClient as follows: # On PC (Linux) : $ sudo ip addr add dev 2002::1/64 - # Add Ipv6 route on PC (Linux) - $ sudo ip route add /64 via 2002::2 + # Add IPv6 route on PC (Linux) + $ sudo ip route add /64 via 2002::2 @@ -362,19 +362,19 @@ features can easily be toggled on or off. Here is a short list of options : chip_progress_logging, chip_detail_logging, chip_automation_logging - $ ./scripts/examples/gn_efr32_example.sh ./examples/lighting-app/efr32 ./out/lighting-app BRD4164A "chip_detail_logging=false chip_automation_logging=false chip_progress_logging=false" + $ ./scripts/examples/gn_efr32_example.sh ./examples/window-app/silabs/efr32 ./out/window-app BRD4164A "chip_detail_logging=false chip_automation_logging=false chip_progress_logging=false" ### Debug build / release build is_debug - $ ./scripts/examples/gn_efr32_example.sh ./examples/lighting-app/efr32 ./out/lighting-app BRD4164A "is_debug=false" + $ ./scripts/examples/gn_efr32_example.sh ./examples/window-app/silabs/efr32 ./out/window-app BRD4164A "is_debug=false" ### Disabling LCD show_qr_code - $ ./scripts/examples/gn_efr32_example.sh ./examples/lighting-app/efr32 ./out/lighting-app BRD4164A "show_qr_code=false" + $ ./scripts/examples/gn_efr32_example.sh ./examples/window-app/silabs/efr32 ./out/window-app BRD4164A "show_qr_code=false" ### KVS maximum entry count @@ -383,4 +383,4 @@ kvs_max_entries Set the maximum Kvs entries that can be stored in NVM (Default 75) Thresholds: 30 <= kvs_max_entries <= 255 - $ ./scripts/examples/gn_efr32_example.sh ./examples/lighting-app/efr32 ./out/lighting-app BRD4164A kvs_max_entries=50 + $ ./scripts/examples/gn_efr32_example.sh ./examples/window-app/silabs/efr32 ./out/window-app BRD4164A kvs_max_entries=50