diff --git a/examples/br/README-OTBR.md b/examples/br/README-OTBR.md index 5338fcef..4ac4800c 100644 --- a/examples/br/README-OTBR.md +++ b/examples/br/README-OTBR.md @@ -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 @@ -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 +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: diff --git a/openthread b/openthread index 86f47304..0df7afb0 160000 --- a/openthread +++ b/openthread @@ -1 +1 @@ -Subproject commit 86f473048ec5a8f4fb4a89e22eb35de9ecff384c +Subproject commit 0df7afb081528bcef7d3b86f4a2c57743a5c6779 diff --git a/src/rw/rw612/README.md b/src/rw/rw612/README.md index 88ff7e27..c7668e90 100644 --- a/src/rw/rw612/README.md +++ b/src/rw/rw612/README.md @@ -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) @@ -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. @@ -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 @@ -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