Skip to content

Commit

Permalink
[EFR32] Update example documentation for efr32 examples (#15527)
Browse files Browse the repository at this point in the history
* documentation update

* add libshell to wordlist

* update script helper
  • Loading branch information
mkardous-silabs authored Feb 24, 2022
1 parent cefeea2 commit a4d427d
Show file tree
Hide file tree
Showing 8 changed files with 42 additions and 42 deletions.
1 change: 1 addition & 0 deletions .github/.wordlist.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1347,3 +1347,4 @@ zephyrproject
Zigbee
zigbeealliance
zigbeethread
libshell
22 changes: 18 additions & 4 deletions examples/light-switch-app/efr32/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -103,13 +103,17 @@ Silicon Labs platform.
$ 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=efr32_board="BRD4161A" enable_sleepy_device=true chip_openthread_ftd=false'
$ gn gen out/debug '--args=efr32_board="BRD4161A" enable_sleepy_device=true chip_openthread_ftd=false chip_build_libshell=true'

* Build the example with pigweed RCP

Expand Down Expand Up @@ -251,7 +255,15 @@ combination with JLinkRTTClient as follows:

**Push Button 1**

- Sends a Toggle command to bound light app
- Sends a Toggle command to bound light app

**Matter shell**

- 'switch on' : Sends On command to bound device

- 'switch off' : Sends Off command to bound device

- 'switch toggle : Sends Toggle command to bound device

* You can provision and control the Chip device using the python controller,
Chip tool standalone, Android or iOS app
Expand All @@ -261,9 +273,11 @@ combination with JLinkRTTClient as follows:
Here is an example with the CHIPTool:

```
chip-tool pairing ble-thread 1 hex:<operationalDataset> 73141520 3840
chip-tool pairing ble-thread 1 hex:<operationalDataset> 20202021 3840
chip-tool accesscontrol write acl '[{"fabricIndex": 1, "privilege": 3, "authMode": 2, "subjects": [1], "targets": null }]' <lighting-node-id> 0
chip-tool binding bind <light nodeid> 0 1 6 1 1
chip-tool binding write binding '[{"fabricIndex": 1, "node": <lighting-node-id>, "endpoint": 1, "cluster":6}]' 1 1
```
### Notes
Expand Down
21 changes: 7 additions & 14 deletions examples/lighting-app/efr32/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -250,24 +250,17 @@ combination with JLinkRTTClient as follows:
* You can provision and control the Chip device using the python controller,
Chip tool standalone, Android or iOS app

[Python Controller](https://github.com/project-chip/connectedhomeip/blob/master/src/controller/python/README.md)

Here is an example with the Python controller:

```
chip-device-ctrl
connect -ble 3840 73141520 1234
zcl NetworkCommissioning AddOrUpdateThreadNetwork 1234 0 0 operationalDataset=hex:0e080000000000000000000300000b35060004001fffe00208dead00beef00cafe0708fddead00beef000005108e11d8ea8ffaa875713699f59e8807e0030a4f70656e5468726561640102c2980410edc641eb63b100b87e90a9980959befc0c0402a0fff8 breadcrumb=0
* You can provision and control the Chip device using the python controller,
Chip tool standalone, Android or iOS app

zcl NetworkCommissioning ConnectNetwork 1234 0 0 networkID=hex:dead00beef00cafe breadcrumb=0
[CHIPTool](https://github.com/project-chip/connectedhomeip/blob/master/examples/chip-tool/README.md)

close-ble
Here is an example with the CHIPTool:

resolve 1234
```
chip-tool pairing ble-thread 1 hex:<operationalDataset> 20202021 3840
zcl OnOff Toggle 1234 1 0
chip-tool onoff on 1 1
```
### Notes
Expand Down
18 changes: 4 additions & 14 deletions examples/lock-app/efr32/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -250,24 +250,14 @@ combination with JLinkRTTClient as follows:
- You can provision and control the Chip device using the python controller,
Chip tool standalone, Android or iOS app

[Python Controller](https://github.com/project-chip/connectedhomeip/blob/master/src/controller/python/README.md)
[CHIPTool](https://github.com/project-chip/connectedhomeip/blob/master/examples/chip-tool/README.md)

Here is an example with the Python controller:
Here is an example with the CHIPTool:

```
chip-device-ctrl
chip-tool pairing ble-thread 1 hex:<operationalDataset> 20202021 3840
connect -ble 3840 73141520 1234
zcl NetworkCommissioning AddOrUpdateThreadNetwork 1234 0 0 operationalDataset=hex:0e080000000000000000000300000b35060004001fffe00208dead00beef00cafe0708fddead00beef000005108e11d8ea8ffaa875713699f59e8807e0030a4f70656e5468726561640102c2980410edc641eb63b100b87e90a9980959befc0c0402a0fff8 breadcrumb=0 timeoutMs=1000
zcl NetworkCommissioning ConnectNetwork 1234 0 0 networkID=hex:dead00beef00cafe breadcrumb=0 timeoutMs=1000
close-ble
resolve 1234
zcl OnOff Toggle 1234 1 0
chip-tool onoff toggle 1 1
```
### Notes
Expand Down
2 changes: 1 addition & 1 deletion examples/ota-requestor-app/efr32/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ declare_args() {
chip_print_memory_usage = false

# PIN code for PASE session establishment.
setupPinCode = 73141520
setupPinCode = 20202021
setupDiscriminator = 3840

# Monitor & log memory usage at runtime.
Expand Down
2 changes: 1 addition & 1 deletion examples/ota-requestor-app/efr32/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ See `examples/lighting-app/efr32/README.md`

- In the chip-tool terminal enter:

./out/chip-tool pairing ble-thread 2 hex:<operationalDataset> 73141520 3840
./out/chip-tool pairing ble-thread 2 hex:<operationalDataset> 20202021 3840

where operationalDataset is obtained from the OpenThread Border Router.

Expand Down
16 changes: 9 additions & 7 deletions examples/window-app/efr32/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -289,21 +289,23 @@ combination with JLinkRTTClient as follows:
through CLI commands on your OT BR
The
[Python Controller](https://github.com/project-chip/connectedhomeip/blob/master/src/controller/python/README.md)
[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
instance, to set the window covering lift by percentage:
$ sudo chip-device-ctrl
chip-device-ctrl > set-pairing-thread-credential 16 0x1234 00112233445566778899aabbccddeeff
```
chip-tool pairing ble-thread 1 hex:<operationalDataset> 20202021 3840
chip-device-ctrl > connect -ble 3840 12345678 12344321
chip-tool onoff on 1 1
chip-device-ctrl > zcl WindowCovering WindowCoveringGoToLiftPercentage 12344321 1 1 percentageLiftValue=50
chip-tool windowcovering go-to-tilt-percentage 50 0 1 1
```
To see the supported window covering cluster commands, use:
chip-device-ctrl > zcl ? WindowCovering
```
chip-tool windowcovering
```
### Notes
Expand Down
2 changes: 1 addition & 1 deletion scripts/examples/gn_efr32_example.sh
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ if [ "$#" == "0" ]; then
setupDiscriminator
Discriminatoor value used for BLE connexion. (Default 3840)
setupPinCode
PIN code for PASE session establishment. (Default 73141520)
PIN code for PASE session establishment. (Default 20202021)
enable_sleepy_device
Enable Sleepy end device. (Default false)
Must also set chip_openthread_ftd=false
Expand Down

0 comments on commit a4d427d

Please sign in to comment.