Skip to content
/ ot-nxp Public
forked from openthread/ot-nxp

Commit

Permalink
[RW612] Updated readme and ot submodule
Browse files Browse the repository at this point in the history
Signed-off-by: Marius Preda <[email protected]>
  • Loading branch information
marius-preda committed Nov 6, 2023
1 parent f8bc88d commit 2b4d1f8
Show file tree
Hide file tree
Showing 3 changed files with 97 additions and 8 deletions.
53 changes: 50 additions & 3 deletions examples/br/README-OTBR.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,11 @@ To learn more about building and running the examples please check:
[rt1060-page]: ../../src/imx_rt/rt1060/README.md
[rw612-page]: ../..src/rw/rw612/README.md

Current border router example supports wifi or ethernet. The default is WIFI. To use ethernet, add the following options to the build command:

```bash
$ ./script/build_rw612 -DOT_NXP_LWIP_ETH=ON -DOT_NXP_LWIP_WIFI=OFF
```

## How to run the OTBR application

Expand All @@ -45,12 +50,54 @@ Note: For this demonstration, Ubuntu 21.10 with mDNSResponder was tested. Avahi

It is important that the Border Router and the PC to reside on the same Wi-Fi network

To set wifi credentials (SSID and password), please update the corresponding sections from the file indicated below, then perform a clean build:
To connect to the wifi network we can use the follwing cli command:

```
> wifi connect <wifi_ssid> <wifi_passwd>
done
```
To see the IP addresses assigned to each interface use:

```
> lwip ipaddr
en2:
#0: FE80::D4D1:71FF:FEC8:6B42
preferred static
#1: FD37:C34C:FBD3:FD30:D4D1:71FF:FEC8:6B42
preferred pref_lft: forever valid_lft: forever
[NXP OTBR CMake file][cmake-page]
IPv4 Address: 192.168.2.207/24
Gateway : 192.168.2.1
[cmake-page]:examples/br/CMakeLists.txt
ot1:
#0: FE80::8E0:2E65:6468:39C1
deprecated static
#1: FDB9:BDB1:412E:A443:4141:1B14:CE94:9111
deprecated static
#2: FDB9:BDB1:412E:A443:0:FF:FE00:FC00
deprecated static
#3: FDB9:BDB1:412E:A443:0:FF:FE00:FC10
deprecated static
#4: FDB9:BDB1:412E:A443:0:FF:FE00:FC38
deprecated static
#5: FD37:C34C:FBD3:FD34:E0D:BCDF:6294:40D6
preferred static
#6: FDB9:BDB1:412E:A443:0:FF:FE00:FC11
deprecated static
lo0:
#0: ::1
deprecated static
IPv4 Address: 127.0.0.1/8
Gateway : 127.0.0.1
Done
```

To start the Thread network see the steps from this [readme][rw612-page]:

[rw612-page]: ../..src/rw/rw612/README.md

### Advertising proxy functionality:

Expand Down
2 changes: 1 addition & 1 deletion openthread
50 changes: 46 additions & 4 deletions src/rw/rw612/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ Download [the latest SDK from the link.](https://mcuxpresso.nxp.com/). Creating
Click on "Build MCUXpresso SDK" button. On the next page select the desired Host OS and ALL for Toolchain/IDE. Additionaly `SELECT ALL` components and then press `DOWNLOAD SDK` button.
Once the SDK zip archive is downloaded, unzip it, and access the contents.

> **_NOTE:_** When using the SDK version 2.13.1 in order to build the OpenThread RW612 configurations the 2 additional files `fwk_lfs_config.h` and `fwk_lfs_config.c` must be downloaded from [SDK_2_13_1_RW61X_OT_LFS_Config](https://mcuxpresso.nxp.com/en/dashboard?download=60c36b53bf8c1ba245bc757a1a69cdbc) and copied to SDK location `.../middleware/wireless/framework/platform/rw61x/configs/` .
> **_NOTE:_** When using the SDK version 2.13.2 to build and run the OpenThread RW612 OTBR examples the LWIP component must be downloaded from the [LWIP NXP GitHub](https://github.com/nxp-mcuxpresso/lwip/tree/mcux_release_2.13.3_rw610_rfp2). Take the latest commit from the indicated branch and copy to SDK location `.../middleware/lwip` . The lwip folder in `.../middleware/` must be completely overwritten by the contents downloaded from GitHub.
![Board Selection](../../../doc/img/rw612/sdk-build.jpg)

Expand Down Expand Up @@ -87,6 +87,13 @@ After a successful build, the `elf` and `binary` files are found in `build_rw612
- ot-cli-rw612 (the elf image)
- ot-cli-rw612.bin (the binary)

- ot-br-rw612 (the elf image)
- ot-br-rw612.bin (the binary)

For border router features see dedicated [README][otbr-readme-page] file.

[otbr-readme-page]:../../../examples/br/README-OTBR.md

## Flash Binaries

To flash the binaries we use the JLink from Segger. You can download it and install it from https://www.segger.com/products/debug-probes/j-link.
Expand Down Expand Up @@ -135,10 +142,41 @@ J-Link> loadbin path/to/binary,0x08000000
- No parity
- No flow control

3. Open a terminal connection on the first board and start a new Thread network.
3. Open a terminal connection on the first board and start a new Thread network.

Note that setting channel, panid, and network key is not enough anymore because of an Open Thread stack update.

We first need to initialize a new dataset. Using `dataset` command we visualize the newly generated dataset.

```bash
> dataset init new
Done
> dataset
Active Timestamp: 1
Channel: 25
Channel Mask: 0x07fff800
Ext PAN ID: 42af793f623aab54
Mesh Local Prefix: fd6e:c358:7078:5a8d::/64
Network Key: f824658f79d8ca033fbb85ecc3ca91cc
Network Name: OpenThread-b870
PAN ID: 0xb870
PSKc: f438a194a5e968cc43cc4b3a6f560ca4
Security Policy: 672 onrc 0
Done
>
```
To change network parameters use:

```bash
> dataset panid 0xabcd
Done
> dataset channel 25
Done
```
Then commit the new dataset:

```bash
> panid 0xabcd
> dataset commit active
Done
> ifconfig up
Done
Expand All @@ -151,12 +189,16 @@ Done
```bash
> state
Leader
> dataset active -x
0e08000000000001000035060004001fffe0020842af793f623aab540708fd6ec35870785a8d0510f824658f79d8ca033fbb85ecc3ca91cc030f4f70656e5468726561642d623837300102b8700410f438a194a5e968cc43cc4b3a6f560ca40c0402a0f7f8000300000b
Done
>
```

5. Open a terminal connection on the second board and attach a node to the network.

```bash
> panid 0xabcd
> dataset set active 0e08000000000001000035060004001fffe0020842af793f623aab540708fd6ec35870785a8d0510f824658f79d8ca033fbb85ecc3ca91cc030f4f70656e5468726561642d623837300102b8700410f438a194a5e968cc43cc4b3a6f560ca40c0402a0f7f8000300000b
Done
> ifconfig up
Done
Expand Down

0 comments on commit 2b4d1f8

Please sign in to comment.