Channel manager change blows out dataset

274 views
Skip to first unread message

nealsj...@gmail.com

unread,
Mar 11, 2021, 3:31:03 PM3/11/21
to openthread-users
Hello,

I am working with a small network of one docker-based border router and one nRF52840 SED. My border router image is built off of commit a734b6b. I have built and enabled channel monitoring/management on my border router following this post. I also added a volume to my docker compose such that network parameters survive reboot or container instantiation as discussed here.

Despite this, I have noticed an odd behavior. If the channel manager causes a channel change (automatically or manually with a command), it creates a new empty pending dataset, sets that dataset channel to the new channel, but doesn't carry over any other parameters, including master key, panid, or network name. These parameters are still set out of band and can be queried from ot-ctl, but they are not part of the dataset any longer. The network functions normally and my SED correctly switches channels, until I reboot my border router or restart my container.

If I reboot my device or restart the container, none of these parameters are saved (because the active dataset is empty) and it populates them with random values. Due to the master key change, my SED can not rejoin the network.

Is this behavior intended? How can I use the channel manager without it erasing network parameters besides the channel?


Attached is an ot-ctl trace before reboot:

> dataset
dataset
Active Timestamp: 430
Channel: 25
Channel Mask: 0x07fff800
Ext PAN ID: 1111111122222222
Mesh Local Prefix: fd78:a9e2:dc9:2619::/64
Master Key: 00112233445566778899aabbccddeeff
Network Name: OpenThread
PAN ID: 0xface
PSKc: be20cb6d1de43841677ba1cae161469b
Security Policy: 672, onrcb
Done
> dataset active
dataset active
Active Timestamp: 430
Channel: 25
Channel Mask: 0x07fff800
Ext PAN ID: 1111111122222222
Mesh Local Prefix: fd78:a9e2:dc9:2619::/64
Master Key: 00112233445566778899aabbccddeeff
Network Name: OpenThread
PAN ID: 0xface
PSKc: be20cb6d1de43841677ba1cae161469b
Security Policy: 672, onrcb
Done
> channel manager change 12
channel manager change 12
Done
> dataset pending
dataset pending
Pending Timestamp: 27
Active Timestamp: 539
Channel: 12
Delay: 113223
Done
> dataset active
dataset active
Active Timestamp: 539
Channel: 12
Done
> channel
channel
12
Done
> masterkey
masterkey
00112233445566778899aabbccddeeff
Done
> panid
panid
0xface
Done


Attached is an ot-ctl trace after reboot:
> state
state
leader
Done
> channel
channel
12
Done
> dataset
dataset
Done
> dataset active
dataset active
Active Timestamp: 539
Channel: 12
Done
> masterkey
masterkey
062da435dd53a551fb3cf3addf164113
Done
> panid
panid
0xe6a9
Done

Jonathan Hui

unread,
Mar 11, 2021, 3:50:51 PM3/11/21
to nealsj...@gmail.com, openthread-users
Thanks for reporting this issue.

I recently merged a fix for this issue with openthread/openthread#6227 and a follow-up fix with openthread/openthread#6262.

Hope that helps.

--
Jonathan Hui



--
You received this message because you are subscribed to the Google Groups "openthread-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to openthread-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/openthread-users/da543929-d47b-44f2-b057-56216c3e9bc9n%40googlegroups.com.

nealsj...@gmail.com

unread,
Mar 11, 2021, 7:14:47 PM3/11/21
to openthread-users
I rebuilt and flashed my RCP, and updated the ot-br-posix repo openthread submodule to the latest main commit and rebuilt my docker image. However, I am still experiencing the same behavior.

I may have not updated the repository in ot-br-posix correctly. How have you verified that your commits fixed the problem?

Jonathan Hui

unread,
Mar 11, 2021, 10:29:40 PM3/11/21
to nealsj...@gmail.com, openthread-users
Here is the console output from a basic test:

$ ./ot-cli-ftd 1
> dataset init new
Done
> dataset commit active
Done
> ifconfig up
Done
> thread start
Done
> state
leader
Done
> dataset active
Active Timestamp: 1
Channel: 17
Channel Mask: 0x07fff800
Ext PAN ID: b4cd6fc5582498e0
Mesh Local Prefix: fd18:d90:8172:61a3::/64
Master Key: e6cbbc16db49c5c44b5339ae0bc51082
Network Name: OpenThread-b7bf
PAN ID: 0xb7bf
PSKc: 0f91025ed20989e24ec4fbfb3ccd5214

Security Policy: 672, onrcb
Done
> dataset pending
Error 23: NotFound
> dataset clear
Done
> dataset channel 11
Done
> dataset updater start
Done
> dataset pending
Pending Timestamp: 1
Active Timestamp: 2
Channel: 11
Channel Mask: 0x07fff800
Delay: 27868
Ext PAN ID: b4cd6fc5582498e0
Mesh Local Prefix: fd18:d90:8172:61a3::/64
Master Key: e6cbbc16db49c5c44b5339ae0bc51082
Network Name: OpenThread-b7bf
PAN ID: 0xb7bf
PSKc: 0f91025ed20989e24ec4fbfb3ccd5214

Security Policy: 672, onrcb
Done
> Dataset update complete: OK
> dataset active
Active Timestamp: 2
Channel: 11
Channel Mask: 0x07fff800
Ext PAN ID: b4cd6fc5582498e0
Mesh Local Prefix: fd18:d90:8172:61a3::/64
Master Key: e6cbbc16db49c5c44b5339ae0bc51082
Network Name: OpenThread-b7bf
PAN ID: 0xb7bf
PSKc: 0f91025ed20989e24ec4fbfb3ccd5214

Security Policy: 672, onrcb
Done
> dataset pending
Error 23: NotFound


--
Jonathan Hui



nealsj...@gmail.com

unread,
Mar 12, 2021, 3:23:28 PM3/12/21
to openthread-users
Hi Jonathan,

Thanks for the command trace. However, my currently built border router docker image ot-ctl does not appear to support the command "dataset updater start".

What commits are you working off of for your border router and RCP?

Jonathan Hui

unread,
Mar 12, 2021, 3:37:59 PM3/12/21
to nealsj...@gmail.com, openthread-users
I tested with 96fe3d

The `dataset updater` CLI command requires the DATASET_UPDATER feature to be enabled - see src/cli/cli_dataset.cpp#L914.

I also tested with the `channel manager change` command and that worked as well.

--
Jonathan Hui



nealsj...@gmail.com

unread,
Mar 12, 2021, 6:01:44 PM3/12/21
to openthread-users
I was able to build RCP firmware with the dataset updater flag enabled:
make -f examples/Makefile-nrf52840 USB=1 CHANNEL_MONITOR=1 CHANNEL_MANAGER=1 BORDER_AGENT=1 BORDER_ROUTER=1 DATASET_UPDATER=1

I pulled my ot-br-posix repo up to main, and now I am running into compatibility issues between my border agent and RCP.

After starting my docker image, I eventually get a message that indicates that my RCP is missing required capabilities:
otbr-agent[155]: [CRIT]-PLAT----: RCP is missing required capabilities: tx-security tx-timing

Are there more required build flags that I am missing for either the RCP or the docker image?

Jonathan Hui

unread,
Mar 12, 2021, 6:13:21 PM3/12/21
to nealsj...@gmail.com, openthread-users
Yeah, we just merged openthread/ot-br-posix#712 that enables Thread 1.2 features by default.

You could try reverting to the previous behavior by specifying BORDER_ROUTING=0 and BACKBONE_ROUTER=0 when building the docker image. You could also roll back your ot-br-posix repo to an earlier commit. Alternatively, you could try specifying THREAD_VERSION=1.2 when building the RCP image.

We're in the midst of making some relatively significant changes to OTBR, so please bear with us during this transition period.

--
Jonathan Hui



nealsj...@gmail.com

unread,
Mar 15, 2021, 2:29:03 PM3/15/21
to openthread-users
Thanks for the clarification! I understand a lot is changing now.

I was able to replicate your success with an RCP image built from commit 96fe3d with the following command:

make -f examples/Makefile-nrf52840 USB=1 CHANNEL_MONITOR=1 CHANNEL_MANAGER=1 BORDER_AGENT=1 BORDER_ROUTER=1 DATASET_UPDATER=1

And a border router docker image built from commit 737a28 with the following command:
docker build --no-cache -t openthread/otbr --build-arg OTBR_OPTIONS='-DOT_CHANNEL_MANAGER=ON -DOT_CHANNEL_MONITOR=ON -DOT_DATASET_UPDATER=1' --build-arg BACKBONE_ROUTER=0 --build-arg BORDER_ROUTING=0 -f etc/docker/Dockerfile .
Reply all
Reply to author
Forward
0 new messages