Skip to content

Commit

Permalink
Pull request project-chip#434: README Updates as per 917 SoC BLE Comm…
Browse files Browse the repository at this point in the history
…issioning 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 <mamehta@silabs.com>
Date:   Wed Dec 14 20:48:09 2022 +0530

    Updated as per review comments

commit 7175ca4ae139645da41b701bb2ad071c1187a6cd
Author: Manav Mehta <mamehta@silabs.com>
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 <mamehta@silabs.com>
Date:   Wed Dec 14 16:46:31 2022 +0530

    Light and Lock README updates for 917 SoC BLE commissioning support
  • Loading branch information
Manav Mehta authored and rerasool committed Dec 14, 2022
1 parent 17ed094 commit 6d8a919
Show file tree
Hide file tree
Showing 8 changed files with 240 additions and 935 deletions.
333 changes: 42 additions & 291 deletions examples/light-switch-app/silabs/SiWx917/README.md

Large diffs are not rendered by default.

58 changes: 29 additions & 29 deletions examples/light-switch-app/silabs/efr32/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down Expand Up @@ -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:

Expand All @@ -144,40 +144,40 @@ 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:

$ 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")'
$ ./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

Expand All @@ -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.
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -328,10 +328,10 @@ combination with JLinkRTTClient as follows:
- 'switch binding group <fabric index> <group id>' : 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:<operationalDataset> 20202021 3840
Expand All @@ -341,7 +341,7 @@ combination with JLinkRTTClient as follows:
chip-tool binding write binding '[{"fabricIndex": 1, "node": <lighting-node-id>, "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:<operationalDataset> 20202021 3840
Expand Down Expand Up @@ -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:
Expand All @@ -382,7 +382,7 @@ combination with JLinkRTTClient as follows:
`$ sudo ip addr add dev <Network interface> 2002::1/64`
#Add Ipv6 route on PC(Linux) \$ sudo ip route add <Thread global ipv6 prefix>/64
#Add IPv6 route on PC(Linux) \$ sudo ip route add <Thread global IPv6 prefix>/64
via 2002::2
<a name="running-pigweed-rpc-console"></a>
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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
64 changes: 30 additions & 34 deletions examples/lighting-app/silabs/SiWx917/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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=\"<ssid>\" psk=\"<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/

<a name="flashing"></a>

## Flashing the Application
Expand All @@ -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 <Network interface> 2002::1/64`
- Add Ipv6 route on PC(Linux)
`sudo ip route add <Router global ipv6 prefix>/64 via 2002::2`
- Add IPv6 route on PC(Linux)
`sudo ip route add <Router global IPv6 prefix>/64 via 2002::2`
## Memory settings
Expand All @@ -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)
Expand All @@ -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
Expand All @@ -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
Loading

0 comments on commit 6d8a919

Please sign in to comment.