Skip to content

Commit 8415647

Browse files
committed
add readme file for the thread br app example
1 parent d8f5caf commit 8415647

File tree

2 files changed

+82
-0
lines changed

2 files changed

+82
-0
lines changed
+82
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
# Matter ESP32 Thread Border Router Example
2+
3+
A prototype application that demonstrates OpenThread Border Router on ESP32-S3 + ESP32-H2
4+
Thread Border Router DevKit Board.
5+
6+
Please
7+
[setup ESP-IDF and CHIP Environment](../../../docs/guides/esp32/setup_idf_chip.md)
8+
and refer
9+
[building and commissioning](../../../docs/guides/esp32/build_app_and_commission.md)
10+
guides to get started.
11+
12+
---
13+
14+
- [OpenThread Border Router DevKit Board](#openthread-border-router-board)
15+
- [OpenThread RCP](#openthread-rcp)
16+
- [OpenThread CLI](#openthread-cli)
17+
- [Setup Thread Network](#setup-thread-network)
18+
- [Commissioning Thread End Devices](#commissioning-thread-end-devices)
19+
20+
---
21+
22+
### Thread Border Router Board
23+
24+
The ESP Thread border router board provides an integrated module of an ESP32-S3 and an ESP32-H2.
25+
26+
![br_dev_kit](./image/esp-thread-border-router-board.png)
27+
28+
### OpenThread RCP
29+
30+
We need to flash an OpenThread RCP(Radio Co-Processor) on ESP32-H2 of the Border Router Board before setting
31+
up the Thread Border example. Connect the USB1 port of the Border Router Board to your host machine. Then
32+
build and flash the RCP firmware
33+
34+
```
35+
cd $IDF_PATH/examples/openthread/ot_rcp
36+
idf.py set-target esp32-h2
37+
idf.py build
38+
idf.py -p {port} erase-flash flash
39+
```
40+
41+
### OpenThread CLI
42+
43+
After you build this example and flash it to the ESP32-S3 of Border Router Board, you can access a standard
44+
OpenThread CLI via the device console with a `matter otcli` prefix.
45+
46+
For instance, you can get the state:
47+
```
48+
> matter otcli state
49+
Detached
50+
Done
51+
```
52+
53+
### Setup Thread Network
54+
55+
You can choose to setup Thread network with the [OpenThread CLI](#openthread-cli).
56+
57+
```
58+
> matter otcli dataset set active <dataset-tlvs>
59+
> matter otcli dataset commit active
60+
> matter otcli ifconfig up
61+
> matter otcli thread start
62+
```
63+
64+
Or you can send SetActiveDatasetRequest command to the Thread BR after commissioning it as a
65+
Matter-Over-Wi-Fi device to setup the Thread network.
66+
67+
```
68+
./chip-tool pairing ble-wifi 1 <ssid> <password> 20202021 3840
69+
./chip-tool generalcommissioning arm-fail-safe 180 1 1 0
70+
./chip-tool threadborderroutermanagement set-active-dataset-request hex:<dataset-tlvs> 1 1 1
71+
```
72+
73+
The Thread BR with enable the Thread network interface and start Thread network after it receives
74+
SetActiveDatasetRequest command.
75+
76+
### Commissioning Thread End Devices
77+
78+
After setting up the Thread network, you can commission a Thread End-device to the Thread network.
79+
80+
```
81+
./chip-tool pairing ble-wifi 2 hex:<dataset_tlvs> <pincode> <discriminator>
82+
```
Loading

0 commit comments

Comments
 (0)