Skip to content

Commit

Permalink
[border-router] Fixed SRP update issues
Browse files Browse the repository at this point in the history
Updated readmes.
  • Loading branch information
marius-preda committed Nov 7, 2023
1 parent f95c4aa commit 5240cc8
Show file tree
Hide file tree
Showing 6 changed files with 59 additions and 31 deletions.
2 changes: 1 addition & 1 deletion .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
branch = main
[submodule "openthread"]
path = third_party/openthread/repo
url = https://github.com/openthread/openthread.git
url = ../openthread.git
branch = main
[submodule "ot-br-posix"]
path = third_party/ot-br-posix/repo
Expand Down
9 changes: 6 additions & 3 deletions examples/all-clusters-app/nxp/rt/rw61x/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ The example supports:

- Matter over Wi-Fi. For that follow instructions from [README_Wifi.md][README_Wifi.md].
- Matter over Openthread. For that follow instructions from [README_Openthread.md][README_Openthread.md].
- Matter over Wi-Fi with Open Thead Border router support. For that follow instructions from
[README_Border_Router.md][README_Border_Router.md].
- Matter over Wi-Fi with Open Thread Border router support. For that follow instructions from
[README_Border_Router.md][README_Border_Router.md].

[README_Wifi.md]: README_Wifi.md
[README_Openthread.md]: README_Openthread.md
Expand Down Expand Up @@ -69,6 +69,8 @@ distribution (the demo-application was compiled on Ubuntu 20.04).

- Start building the application.

> **_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.
```
user@ubuntu:~/Desktop/git/connectedhomeip$ export NXP_SDK_ROOT=/home/user/Desktop/SDK_RW612/
user@ubuntu:~/Desktop/git/connectedhomeip$ source ./scripts/activate.sh
Expand All @@ -78,8 +80,9 @@ user@ubuntu:~/Desktop/git/connectedhomeip$ cd examples/all-clusters-app/nxp/rt/r
Optional GN options that can be added when building an application:

- To enable the [matter CLI](README.md#matter-shell), the argument ```chip_enable_matter_cli=true``` must be added to the *gn gen* command.
- To switch the device type to thermostat ```nxp_device_type=\"thermostat\"``` must be added to the *gn gen* command.
- To switch the SDK type used, the argument ```is_<sdk_type>=true``` must be added to the *gn gen* command (with <sdk_type> being either sdk_package or sdk_internal).
- By default, the RW612 A1 board revision will be chosen. To switch to an A0 revision, the argument ```board_version=\"A0\"``` must be added to the *gn gen* command.
- By default, the RW612 A1 board revision will be chosen. To switch to an A2 revision, the argument ```board_version=\"A2\"``` must be added to the *gn gen* command.
- To build the application in debug mode, the argument ```is_debug=true optimize_debug=false``` must be added to the *gn gen* command.
- To build with the option to have Matter certificates/keys pre-loaded in a specific flash area the argument ```chip_with_factory_data=1``` must be added to the *gn gen* command. (for more information see [Guide for writing manufacturing data on NXP devices](../../../../platform/nxp/doc/manufacturing_flow.md).
- To build the application with the OTA Requestor enabled, the arguments ```chip_enable_ota_requestor=true no_mcuboot=false``` must be added to the *gn gen* command. (More information about the OTA Requestor feature in [OTA Requestor README](README_OTA_Requestor.md)))
Expand Down
73 changes: 49 additions & 24 deletions examples/all-clusters-app/nxp/rt/rw61x/README_Border_Router.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,29 @@ To know how to flash and debug follow instructions from [README.md 'Flashing and

## Testing the example

To commission the Matter application on RW612 over Wi-Fi we can either use wifi-ble or onnetwork commissioning. This is described in [Building][building_section] and below.

[building_section]:#building

For ble-wifi:

```
./chip-tool pairing ble-wifi 1 <ssid> <password> 20202021 3840
```
If the Matter app is built using the BLE commissioning method there is also the option to use onnetwork commissioning by using Matter CLI WIFI commands to join the WIFI network:

```
> wifi connect <wifi_ssid> <wifi_passwd>
Done
```
For Wi-Fi credentials provided at compile time or set using CLI:

```
./chip-tool pairing onnetwork 1 20202021
```

To create or join a Thread network on the Matter Border Router we use the otcli command with the Matter CLI.

To get the list of Matter CLI commands type help:
Expand All @@ -63,15 +86,34 @@ To get the list of Matter CLI commands type help:
switch Switch commands. Usage: switch [on|off]
Done
```
Then we configure the Thread network parameters to start/join a network:

```
> otcli channel 21
> otcli panid 21
> otcli networkkey 00112233445566778899aabbccddeeff
> otlci ifconfig up
> otcli thread start
Then we configure the Thread network parameters to start/join a 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.

```
> otcli dataset init new
Done
> otcli 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
> otcli dataset panid 0xabcd
Done
> otcli dataset channel 25
Done
> dataset commit active
Done
> ifconfig up
Done
> thread start
Done
> otcli state
leader
Done
Expand All @@ -89,20 +131,3 @@ Then we can run the chip tool on the raspberry pi to commission a Matter over Th
./chip-tool pairing ble-thread 1 hex:<dataset> 20202021 3840
```

To commission the Matter application on RW612 over Wi-Fi we can use either use wifi-ble or onnetwork commissioning modes depending on how the application was built as described in the section [Building][building_section].

[building_section]:#building

For ble-wifi:

```
./chip-tool pairing ble-wifi 1 <ssid> <password> 20202021 3840
```
For Wi-Fi credentials provided at compile time:

```
./chip-tool pairing onnetwork 1 20202021
```
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
/* stack size increased for NVM/LITTLE_FS save in idle task */
#define configMINIMAL_STACK_SIZE ( ( uint16_t ) 2048 )
#ifndef configTOTAL_HEAP_SIZE
#define configTOTAL_HEAP_SIZE ( ( size_t ) ( 134 * 1024 ) )
#define configTOTAL_HEAP_SIZE ( ( size_t ) ( 150 * 1024 ) )
#endif
#define configAPPLICATION_ALLOCATED_HEAP 1
#define configSUPPORT_STATIC_ALLOCATION 0
Expand Down
2 changes: 1 addition & 1 deletion third_party/openthread/repo
Submodule repo updated from 86f473 to 0df7af

0 comments on commit 5240cc8

Please sign in to comment.