This example functions as a contact sensor uses a test Vendor ID (VID) and a Product ID (PID) of 0x8005.
Supported board:
bl704ldk
Please refer to the following documents for more information
- Bouffalo Lab - Platform overview
- Bouffalo Lab - Getting Started
- Bouffalo Lab - OTA upgrade
- Bouffalo Lab - Matter factory data generation
./scripts/build/build_examples.py --target bouffalolab-bl704ldk-contact-sensor-thread-mtd-littlefs build
-
Reset the board or factory reset the board
-
Enter build out folder of chip-tool and running the following command to do BLE commission
-
Thread
```shell ./out/linux-x64-chip-tool/chip-tool pairing ble-thread <deivce_node_id> hex:<thread_operational_dataset> 20202021 3840 ```
<deivce_node_id>
, which is node ID assigned to device within chip-tool<thread_operational_dataset>
, Thread network credential which runningsudo ot-ctl dataset active -x
command on border router to get.
-
-
Start chip-tool with interactive mode
./chip-tool interactive start
-
Subscribe booleanstate under chip-tool interactive mode
booleanstate subscribe state-value <min-interva> <max-interval> <deivce_node_id> 1
<min-interva>
, min interval to report to boolean state of contact sensor<max-interva>
, max interval to report to boolean state of contact sensor<deivce_node_id>
, node id of contact sensor
-
Press down
INT
button, boolean state True will report to chip-toolGPIO 20 connects to
INT
button. -
After press down
INT
button overmin-interva>
seconds, and releaseINT
button, boolean state False will report to chip-tool