Skip to content

Commit

Permalink
[Bouffalolab] Cherry-pick: Remove platform limit for tool installatio…
Browse files Browse the repository at this point in the history
…n and update readme (#24053)

* update readme

* remove platform limit on bflb-iot-tool

* update readme

* remove RPC descriptions

* Fix restyle
  • Loading branch information
wy-hh authored Dec 13, 2022
1 parent ab48bfc commit f6d4766
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 38 deletions.
52 changes: 15 additions & 37 deletions examples/lighting-app/bouffalolab/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,13 +88,6 @@ and BL706 develop board `XT-ZB6-DevKit`.
./scripts/build/build_examples.py --target bouffalolab-xt-zb6-devkit-light-115200 build
```
- Build lighting app with RPC enabled and UART baudrate 115200.
```
./scripts/build/build_examples.py --target bouffalolab-bl602-iot-matter-v1-light-rpc build
./scripts/build/build_examples.py --target bouffalolab-xt-zb6-devkit-light-rpc build
```
## Download image
- Using script `*.flash.py`.
Expand All @@ -104,9 +97,11 @@ and BL706 develop board `XT-ZB6-DevKit`.
`chip-bl702-lighting-example.flash.py` will generate under build output
folder for BL602 or BL702 building.
> Note, different build options will generate different output folder.
> Note, make sure terminal is under Matter build environment.
> Note 1, `*.flash.py` should be ran under Matter build environment; if
> python module `bflb_iot_tool` is not found, please try to do
> `source scripts/bootstrap.sh` or install as
> `pip3 install bflb-iot-tool`.<br> Note 2, different build options will
> generate different output folder.
Download operation steps as below, please check `help` option of script for
more detail.
Expand Down Expand Up @@ -145,7 +140,8 @@ and BL706 develop board `XT-ZB6-DevKit`.
> Note, better to append --erase option to download image for BL602
> develop board at first time.
- Using `Bouffalo Lab` GUI flash tool`BLDevCube`
- Using `Bouffalo Lab` GUI flash tool `BLDevCube`, please download on
[this page](https://dev.bouffalolab.com/download).
- Hold BOOT pin and reset chip, put the board in download mode.
- Select `DTS` file;
- Select Partition Table under
Expand Down Expand Up @@ -173,11 +169,10 @@ and BL706 develop board `XT-ZB6-DevKit`.
- To do factory reset, press BOOT button over 4 seconds, release BOOT button
after led blink stopped.
## Test with chip-tool
## Test Commission and Control with chip-tool
Please follow [chip_tool_guide](../../../docs/guides/chip_tool_guide.md) and
[guide](../../chip-tool/README.md) to build and use Matter official test
chip-tool.
[guide](../../chip-tool/README.md) to build and use chip-tool for test.
### Prerequisite for Thread Protocol
Expand All @@ -193,7 +188,7 @@ router to get Thread network credential.
sudo ot-ctl dataset active -x
```

#### Commissioning over BLE
### Commissioning over BLE

- Reset the board or factory reset the board

Expand All @@ -213,10 +208,10 @@ sudo ot-ctl dataset active -x
```

> `<node_id>`, which is node ID assigned to device within chip-tool
> fabric<br> > `<wifi_ssid>`, Wi-Fi network SSID<br> > `<wifi_passwd>`,
> Wi-FI network password<br> > `<thread_operational_dataset>`, Thread
> network credential which running `sudo ot-ctl dataset active -x` command
> on border router to get.<br>
> fabric<br> `<wifi_ssid>`, Wi-Fi network SSID<br> `<wifi_passwd>`, Wi-FI
> network password<br> `<thread_operational_dataset>`, Thread network
> credential which running `sudo ot-ctl dataset active -x` command on border
> router to get.

### Cluster control

Expand Down Expand Up @@ -254,7 +249,7 @@ After successful commissioning, cluster commands available to control the board.
./chip-tool identify identify 10 <node_id> 1
```

## OTA software upgrade with ota-provider-app
## Test OTA software upgrade with ota-provider-app

Please take [guide](../../ota-provider-app/linux/README.md) for more detail on
ota-provider-app build and usage.
Expand Down Expand Up @@ -308,20 +303,3 @@ ota-provider-app build and usage.
where `<node_id_to_lighting_app>` is node id of BL602/BL702 lighting app.
- After OTA software upgrade gets done, BL602/BL702 will get reboot
automatically.

## Run RPC Console

- Build chip-console following this
[guide](../../common/pigweed/rpc_console/README.md)

- Start the console

```
$ chip-console --device /dev/ttyUSB0 -b 2000000
```

- Get or Set the light state

`rpcs.chip.rpc.Lighting.Get()`
`rpcs.chip.rpc.Lighting.Set(on=True, level=128)`
2 changes: 1 addition & 1 deletion scripts/requirements.bouffalolab.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
bflb-iot-tool>=1.8.0 ; platform_machine != 'aarch64' and sys_platform == 'linux'
bflb-iot-tool>=1.8.0

0 comments on commit f6d4766

Please sign in to comment.