@@ -4,7 +4,13 @@ This example functions as a light bulb device type, with on/off and level
4
4
capabilities and uses a test Vendor ID (VID) and a Product ID (PID)
5
5
of ** 0x8005** .
6
6
7
- The steps were verified on ` Bouffalo Lab ` BL602 and BL706 development board.
7
+ Current supported boards:
8
+
9
+ - ` BL602DK `
10
+ - ` BL706DK `
11
+ - ` BL704LDK `
12
+
13
+ Legacy supported boards:
8
14
9
15
- ` BL602-IoT-Matter-V1 ` , [ here] ( https://www.amazon.com/dp/B0B9ZVGXD8 ) to
10
16
purchase.
@@ -21,10 +27,6 @@ The steps were verified on `Bouffalo Lab` BL602 and BL706 development board.
21
27
22
28
BL602/BL604 is combo chip-set for Wi-Fi 802.11b/g/n and BLE 5.0 base-band/MAC.
23
29
24
- ### BL602-IoT-Matter-V1
25
-
26
- <img src =" ../../platform/bouffalolab/doc/chart/BL602-IoT-Matter_V1.png " style =" zoom :25% ;" />
27
-
28
30
## BL70x
29
31
30
32
BL70x is combo chip-set for BLE and IEEE 802.15.4/ZigBee/Thread.
@@ -35,16 +37,34 @@ BL70x is combo chip-set for BLE and IEEE 802.15.4/ZigBee/Thread.
35
37
general name.
36
38
37
39
BL70x has fully certified with all Thread 1.3 features, included Thread ` SSED `
38
- and Thread Border Router with ` DUA manager ` .
39
-
40
- ### ` XT-ZB6-DevKit `
41
-
42
- <img src =" ../../platform/bouffalolab/doc/chart/bl706_dev_board.jpg " style =" zoom :23% ;" />
40
+ and Thread Border Router.
41
+
42
+ ## Solutions introduction
43
+
44
+ ` Bouffalo Lab ` has full connectives support for Matter Applications.
45
+
46
+ - Wi-Fi 4/6 application, we have
47
+ - BL602, Wi-Fi 4 application.
48
+ - BL706 + BL602, Wi-Fi 4 application. BL602 runs as a normal WLAN
49
+ transceiver; TCP/IP stack runs as BL706 side. We recommend this solution
50
+ is for Openthread Border Router application and Matter ZigBee bridge.
51
+ - Openthread Border Router application, please refer to Openthread
52
+ Border Router application
53
+ - Matter ZigBee Bridge application, please contact ` Bouffalo Lab ` for
54
+ support.
55
+ - Thread application, we have
56
+ - B70X
57
+ - Ethernet application, we have
58
+ - BL706. It supports single Matter application, and also Openthread Border
59
+ Router application and Matter ZigBee bridge
60
+ - Openthread Border Router application, please refer to Openthread
61
+ Border Router application
62
+ - Matter ZigBee application, please contact ` Bouffalo Lab ` for
63
+ support.
43
64
44
65
## Initial setup
45
66
46
- The following steps in this document were validated on Ubuntu 18.04/20.04 and
47
- Mac OS.
67
+ The following steps in this document were validated on Ubuntu 20.04.
48
68
49
69
- Install dependencies as specified in the ** connectedhomeip** repository:
50
70
[ Building Matter] ( https://github.com/project-chip/connectedhomeip/blob/master/docs/guides/BUILDING.md ) .
@@ -58,77 +78,67 @@ Mac OS.
58
78
source ./scripts/activate.sh -p bouffalolab
59
79
```
60
80
61
- > After environment setup `Bouffalo Lab` flash tool, `bflb-iot-tool`,
62
- > imports under this environment. If not, please try
63
- > `scripts/bootstrap.sh -p bouffalolab` for matter environment update.
64
-
65
81
- Setup build environment for `Bouffalo Lab` SoC
66
82
67
- Run `setup.sh` to install `Bouffalo Lab` SDK to /opt/bouffalolab_sdk
68
-
69
83
```
70
- cd third_party/bouffalolab/repo
71
- sudo bash scripts/setup.sh
84
+ ./integrations/docker/images/stage-2/chip-build-bouffalolab/setup.sh
72
85
```
73
86
74
- Please execute following command to export `BOUFFALOLAB_SDK_ROOT` before
75
- building.
87
+ Script `setpu.sh` requires to select install path, and please execute
88
+ following command to export `BOUFFALOLAB_SDK_ROOT` before building.
76
89
77
90
```
78
- export BOUFFALOLAB_SDK_ROOT=/opt/bouffalolab_sdk
91
+ export BOUFFALOLAB_SDK_ROOT="Your install path"
79
92
```
80
93
81
94
## Build CHIP Lighting App example
82
95
83
- The following steps take examples for `BL602-IoT-Matter-V1` BL602 board,
84
- `BL706DK` BL706 board, and `BL704LDK` BL704L board .
96
+ The following steps take examples for `BL602DK`, `BL704LDK` and `BL706DK`.
85
97
86
98
- Build lighting app with UART baudrate 2000000
87
99
88
100
```
89
- ./scripts/build/build_examples.py --target bouffalolab-bl602-iot-matter-v1-light build
90
- ./scripts/build/build_examples.py --target bouffalolab-bl706dk-light build
91
- ./scripts/build/build_examples.py --target bouffalolab-bl706dk-light-ethernet build
92
- ./scripts/build/build_examples.py --target bouffalolab-bl706dk-light-wifi build
101
+ ./scripts/build/build_examples.py --target bouffalolab-bl602dk-light build
93
102
./scripts/build/build_examples.py --target bouffalolab-bl704ldk-light build
94
- ```
95
-
96
- - Build lighting app with UART baudrate 115200
97
-
98
- ```
99
- ./scripts/build/build_examples.py --target bouffalolab-bl602-iot-matter-v1-light-115200 build
100
- ./scripts/build/build_examples.py --target bouffalolab-bl706dk-light-light-115200 build
101
- ./scripts/build/build_examples.py --target bouffalolab-bl704ldk-light-light-115200 build
103
+ ./scripts/build/build_examples.py --target bouffalolab-bl706dk-light build
102
104
```
103
105
104
106
- Build lighting app with RPC enabled and UART baudrate 115200.
105
107
106
108
```
107
- ./scripts/build/build_examples.py --target bouffalolab-bl602-iot-matter-v1- light-rpc build
108
- ./scripts/build/build_examples.py --target bouffalolab-bl706dk -light-light-rpc build
109
- ./scripts/build/build_examples.py --target bouffalolab-bl704ldk -light-light-rpc build
109
+ ./scripts/build/build_examples.py --target bouffalolab-bl602dk-light- light-rpc-115200 build
110
+ ./scripts/build/build_examples.py --target bouffalolab-bl704ldk -light-light-rpc-115200 build
111
+ ./scripts/build/build_examples.py --target bouffalolab-bl706dk -light-light-rpc-115200 build
110
112
```
111
113
112
114
### Build options with build_examples.py
113
115
114
- - `-shell`, enable UART command line
115
- - `-115200`, set UART baudrate to 115200 for log and command line
116
+ - `-wifi`, to specify that connectivity Wi-Fi is enabled for Matter
117
+ application.
118
+
119
+ - BL602 uses `-wifi` by default
120
+ - BL702 needs specify to use BL706 + BL602 for Wi-Fi connectivity.
121
+
122
+ - `-thread`, to specify that connectivity Thread is enabled for Matter
123
+ application.
124
+
125
+ - BL70X uses `-thread` by default.
126
+
127
+ - `-ethernet`, to specify that connectivity Ethernet is enabled for Matte
128
+ application.
129
+
130
+ - BL706 needs specify to use Ethernet connectivity.
131
+
132
+ - `-easyflash`, to specify that `easyflash` is used for flash storage access.
133
+ - `-mfd`, enable Matter factory data feature, which load factory data from
134
+ `MFD` partition
135
+ - `-shell`, enable command line
116
136
- `-rpc`, enable Pigweed RPC feature
137
+ - `-115200`, set UART baudrate to 115200 for log and command line
117
138
- `-cdc`, enable USB CDC feature, only support for BL706, and can't work with
118
139
Ethernet Board
119
140
- `-resetCnt`, enable feature to do factory reset when continues power cycle
120
141
is greater than 3
121
- - `-mfd`, enable Matter factory data feature, which load factory data from
122
- `DTS` region and `MFD` partition
123
- - Please contact to `Bouffalo Lab` for Matter factory data support.
124
- - `-mfdtest`, enable Matter factory data module, but only load factory data
125
- from `FactoryDataProvider.cpp` file.
126
- - `-wifi`, to specify that connectivity Wi-Fi is enabled for Matter
127
- application.
128
- - `-ethernet`, to specify that connectivity Ethernet is enabled for Matter
129
- application.
130
- - `-thread`, to specify that connectivity Thread is enabled for Matter
131
- application.
132
142
- `-mot`, to specify to use openthread stack under
133
143
`third_party/openthread/repo`
134
144
- Without `-mot` specified, Matter Thread will use openthread stack under
@@ -147,12 +157,6 @@ The following steps take examples for `BL602-IoT-Matter-V1` BL602 board,
147
157
- `chip-bl702-lighting-example.flash.py` for BL702
148
158
- `chip-bl702l-lighting-example.flash.py` for BL702L
149
159
150
- > Note 1, `*.flash.py` should be ran under Matter build environment; if
151
- > python module `bflb_iot_tool` is not found, please try to do
152
- > `source scripts/bootstrap.sh` or install as
153
- > `pip3 install bflb-iot-tool`.<br> Note 2, different build options will
154
- > generate different output folder.
155
-
156
160
Download operation steps as below, please check `help` option of script for
157
161
more detail.
158
162
@@ -167,45 +171,25 @@ The following steps take examples for `BL602-IoT-Matter-V1` BL602 board,
167
171
- Type following command for image download. Please set serial port
168
172
accordingly, here we use /dev/ttyACM0 as a serial port example.
169
173
170
- - `bl602-iot-matter-v1`, `bl706dk` and `bl704ldk` without additional
171
- build options
172
-
173
- ```shell
174
- ./out/bouffalolab-bl602-iot-matter-v1-light/chip-bl602-lighting-example.flash.py --port /dev/ttyACM0
175
- ./out/bouffalolab-bl706dk-light/chip-bl702-lighting-example.flash.py --port /dev/ttyACM0
176
- ./out/bouffalolab-bl704ldk-light/chip-bl702l-lighting-example.flash.py --port /dev/ttyACM0
177
- ```
174
+ - `BL602DK`, `BL704LDK` and `BL706DK`.
178
175
179
- - `bl706dk` with 115200 baudrate setting
180
176
181
177
```shell
182
- ./out/bouffalolab-bl706dk-light-115200/chip-bl702-lighting-example.flash.py --port /dev/ttyACM0
178
+ ./out/bouffalolab-bl602dk-light/chip-bl602-lighting-example.flash.py --port /dev/ttyACM0
179
+ ./out/bouffalolab-bl704ldk-light/chip-bl702l-lighting-example.flash.py --port /dev/ttyACM0
180
+ ./out/bouffalolab-bl706dk-light/chip-bl702-lighting-example.flash.py --port /dev/ttyACM0
183
181
```
184
182
185
- - To wipe out flash and download image, please append `--erase` to the
186
- above command .
183
+ - To wipe out flash and download image, please append `--erase`
184
+ option. Take BL602DK as example .
187
185
188
186
```shell
189
- ./out/bouffalolab-bl602-iot-matter-v1-light/chip-bl602-lighting-example.flash.py --port /dev/ttyACM0 --erase
190
- ./out/bouffalolab-bl706dk-light-115200/chip-bl702-lighting-example.flash.py --port /dev/ttyACM0 --erase
191
- ./out/bouffalolab-bl704ldk-light/chip-bl702l-lighting-example.flash.py --port /dev/ttyACM0 --erase
187
+ ./out/bouffalolab-bl602dk-light/chip-bl602-lighting-example.flash.py --port /dev/ttyACM0 --erase
192
188
```
193
189
194
190
> Note, better to append --erase option to download image for BL602
195
191
> develop board at first time.
196
192
197
- - Using `Bouffalo Lab` GUI flash tool `BLDevCube`, please download on
198
- [this page](https://dev.bouffalolab.com/download).
199
- - Hold BOOT pin and reset chip, put the board in download mode.
200
- - Select `DTS` file;
201
- - Select Partition Table under
202
- `examples/platform/bouffalolab/bl602/flash_config` or
203
- `examples/platform/bouffalolab/bl702/flash_config`
204
- - Select Firmware Bin;
205
- - Select Chip Erase if need;
206
- - Choose Target COM port.
207
- - Then click Create & Download.
208
-
209
193
## Run the example
210
194
211
195
- You can open the serial console. For example, if the device is at
@@ -249,13 +233,13 @@ sudo ot-ctl dataset active -x
249
233
- Enter build out folder of chip-tool and running the following command to do
250
234
BLE commission
251
235
252
- - BL602
236
+ - Wi-Fi
253
237
254
238
``` shell
255
239
./chip-tool pairing ble-wifi < node_id> < wifi_ssid> < wifi_passwd> 20202021 3840
256
240
```
257
241
258
- - BL706
242
+ - Thread
259
243
260
244
` ` ` shell
261
245
./chip-tool pairing ble-thread < node_id> hex:< thread_operational_dataset> 20202021 3840
@@ -308,34 +292,26 @@ After successful commissioning, cluster commands available to control the board.
308
292
Please take [guide](../../ota-provider-app/linux/README.md) for more detail on
309
293
ota-provider-app build and usage.
310
294
311
- # ## Create the Matter OTA image with Bouffalolab OTA `bin.xz.hash` format image
312
-
313
- - ` Bouffalo Lab` OTA ` bin.xz.hash` format image
295
+ # ## Create the Matter OTA image
314
296
315
- - Build ` Bouffalo Lab` OTA image as following execution using python
316
- script ` * .flash.py` under firmware build out folder,
317
- ` shell ./< output_firmware_name> .flash.py --build` After script executed,
318
- a folder ` ota_images` and an image ` FW_OTA.bin.xz.hash` will be
319
- generated. ` FW_OTA.bin.xz.hash` is compressed with hash verification for
320
- build out firmware.
297
+ ` Bouffalo Lab` Matter OTA image contains two parts:
321
298
322
- - ` bin.xz.hash` image
299
+ - ` Bouffalo Lab` OTA bootable image:
300
+ - Add boot parameters, signature/encryption if specified
301
+ - And specify whether image has be compressed.
302
+ - Add Matter recognition header by
303
+ [ota_image_tool.py](../../../docs/guides/openthread_border_router_pi.md).
323
304
324
- After compile done, the build script will call
325
- ` < output_firmware_name> .flash.py` to generate ` Bouffalo Lab` OTA format
326
- image as above, and put it under out folder with name likes
327
- ` < output_firmware_name> .bin.xz.hash`
305
+ Script ` * .flash.py` builds ` Bouffalo Lab` bootable image and call
306
+ [ota_image_tool.py](../../../docs/guides/openthread_border_router_pi.md) to add
307
+ Matter recognition header. Take ` BL602DK` as example.
328
308
329
- * Build Matter ` * .ota` OTA image with ` Bouffalo Lab` OTA image under
330
- ** connectedhomeip** repo folder
331
-
332
- ` ` ` shell
333
- $ ./src/app/ota_image_tool.py create -v 0xFFF1 -p 0x8005 -vn 10 -vs " 1.0" -da sha256 < FW_OTA.bin.xz.hash> lighting-app.ota
334
-
335
- ` ` `
309
+ ` ` ` shell
310
+ ./out/bouffalolab-bl602dk-light/chip-bl602-lighting-example.flash.py --build-ota --vendor-id < vendor id> --product-id < product id> --version < version> --version-str < version string> --digest-algorithm < digest algorithm>
311
+ ` ` `
336
312
337
- > lighting-app.ota should have greater software version which is defined by
338
- > macro ` CHIP_DEVICE_CONFIG_DEVICE_SOFTWARE_VERSION` in CHIPProjectConfig.h
313
+ > lighting-app.ota should have greater software version which is defined by
314
+ > macro ` CHIP_DEVICE_CONFIG_DEVICE_SOFTWARE_VERSION` in CHIPProjectConfig.h
339
315
340
316
# ## Start ota-provider-app
341
317
0 commit comments