Skip to content

Commit 04e3ccb

Browse files
authored
Merge pull request #2384 from arduino/mcmchris/nano-matter/otbr-tutorial-update
[PXCT-432] Nano Matter OTBR Tutorial Update
2 parents 54d87ea + 1d09366 commit 04e3ccb

File tree

3 files changed

+69
-3
lines changed

3 files changed

+69
-3
lines changed

content/hardware/03.nano/boards/nano-matter/tutorials/07.open-thread-border-router/content.md

Lines changed: 69 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,9 +55,11 @@ This tutorial's main objective is to guide you through the build and configurati
5555
### Software Requirements
5656

5757
- [Arduino IDE 2.0+](https://www.arduino.cc/en/software)
58+
- [Silicon Labs Core](https://docs.arduino.cc/tutorials/nano-matter/user-manual/#board-core-and-libraries)
5859
- [Simplicity Studio](https://www.silabs.com/developers/simplicity-studio)
5960
- [Visual Studio Code](https://code.visualstudio.com/)
6061

62+
6163
## Setting up the OTBR
6264

6365
### The RCP: Nano Matter
@@ -66,7 +68,32 @@ This section outlines the steps to build the RCP firmware for the Nano Matter.
6668

6769
![Nano Matter Configuration](assets/matter-banner.png)
6870

69-
#### Create a New Project
71+
#### Ready to Flash Binary
72+
73+
We recommend you to use this pre-compiled binary to flash your Nano Matter board.
74+
75+
- Download the `.hex` binary from [here](assets/nano-matter-ot-rcp-uart.zip) and locate it on a known directory.
76+
- Open any text editor and paste the following command:
77+
78+
```bash
79+
/Users/<username>/AppData/Local/Arduino15/packages/SiliconLabs/tools/openocd/0.12.0-arduino1-static/bin/openocd -d2 -s /Users/<username>/AppData/Local/Arduino15/packages/SiliconLabs/tools/openocd/0.12.0-arduino1-static/share/openocd/scripts/ -f interface/cmsis-dap.cfg -f target/efm32s2_g23.cfg -c "init; reset_config srst_nogate; reset halt; program <project-directory>; reset; exit"
80+
```
81+
82+
- Update the `username` field with yours.
83+
- Update the `project-directory` field with the binary directory you downloaded in the previous step.
84+
- Open the Command Prompt and paste the formatted command.
85+
- Connect the Nano Matter to your PC using a USB-C® cable.
86+
- Run the command and verify the download process was successful.
87+
88+
![Binary flash process](assets/binary-flash.png)
89+
90+
***Make sure to have the [Silicon Labs core](https://docs.arduino.cc/tutorials/nano-matter/user-manual/#board-core-and-libraries) installed on your Arduino IDE so you can use the __openocd__ tool for flashing.***
91+
92+
From here, jump directly to the [Matter Controller section](http://localhost:8000/tutorials/nano-matter/open-thread-border-router/#the-matter-controller-nano-esp32).
93+
94+
#### Build the Binary From Scratch (Optional)
95+
96+
If you want to build the Nano Matter program by yourself, follow the steps below:
7097

7198
- Download Simplicity Studio. Silicon Labs provides this IDE, which is designed to simplify the development process for Silicon Labs hardware platforms. Download latest version [here](https://www.silabs.com/developers/simplicity-studio).
7299

@@ -159,11 +186,20 @@ cd esp-idf
159186
. ./export.sh
160187
```
161188

189+
- Navigate to the `ot_rcp` example included in the `esp-idf` directory, and build it using the `esp32h2` target:
190+
191+
```bash
192+
cd examples/openthread/ot_rcp
193+
idf.py set-target esp32h2
194+
idf.py build
195+
```
196+
162197
- Clone the ESP Thread Border Router example repository:
163198

164199
```bash
200+
cd ..
165201
git clone -b v1.0 --recursive https://github.com/espressif/esp-thread-br.git
166-
cd /esp-thread-br/examples/basic_thread_border_router/
202+
cd esp-thread-br/examples/basic_thread_border_router/
167203
```
168204
- For the `sdkconfig` file to be generated, and we can later modify it with our Nano ESP32 custom settings, set the device target from the command line:
169205

@@ -281,6 +317,9 @@ scripts/examples/gn_build_example.sh examples/chip-tool out/debug
281317
```
282318

283319
![CHIP Tool environment set](assets/out-debug.png)
320+
321+
Wait for the packages installation process to finish.
322+
284323
- To check if the CHIP Tool runs correctly, execute the following command:
285324

286325
```bash
@@ -330,7 +369,9 @@ For example:
330369

331370
Connect through USB to the Nano ESP32 and run the following command from the Arduino IDE Serial Monitor:
332371

333-
`dataset active -x`
372+
```bash
373+
dataset active -x
374+
```
334375

335376
***This command will display the active Thread network dataset as a hexadecimal string.***
336377

@@ -342,6 +383,31 @@ For example:
342383
0e080000000000010000000300000f35060004001fffe00208dead00beef00cafe0708fd000db800a00000051000112233445566778899aabbccddeeff030e4f70656e5468726561642d455350010212340410104810e2315100afd6bc9215a6bfac530c0402a0f7f8
343384
```
344385

386+
If an **error** appears, for example:
387+
388+
```bash
389+
Error 23: NotFound
390+
```
391+
392+
This means that there is no active Thread Network dataset configured. The following steps will help fix the error:
393+
394+
- Check if the OpenThread is enabled, sending this command through the Serial Monitor:
395+
396+
```bash
397+
state
398+
```
399+
- If the response is **disabled**, it means OpenThread has not started. To start it, use:
400+
401+
```bash
402+
ifconfig up
403+
```
404+
```bash
405+
thread start
406+
```
407+
- Then, try `dataset active -x` command again.
408+
409+
Now you should see the dataset string.
410+
345411
### Matter Commissioning
346412

347413
Commissioning refers to setting up and integrating a new device into the Matter network.

0 commit comments

Comments
 (0)