RCP + Channel Monitor/Manager

287 views
Skip to first unread message

nealsj...@gmail.com

unread,
Feb 17, 2021, 6:41:57 PM2/17/21
to openthread-users
Is it possible to enable the channel monitor/manager feature on an Openthread RCP build for a border router? Or is the only way to use this feature in a network with a border router is to have an additional, independent FTD device that is running the channel monitor/manager?

My intuition is that an RCP can't support the channel manager/monitor, because the RCP doesn't include the application layers required. The Openthread cli and ot-ctl also don't have hooks to enable the channel monitor and manager.

I'd obviously prefer to only use a single border router for small networks, so if anyone has any ideas on how to enable channel manager/monitor on an rcp, I'd appreciate it!

Jonathan Hui

unread,
Feb 17, 2021, 6:54:06 PM2/17/21
to nealsj...@gmail.com, openthread-users
The OpenThread CLI does implement commands for the channel manager and channel monitor features:
Unfortunately, we do not have those CLI commands documented - we should add that documentation.

--
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/8b3f82cc-e6af-4f98-9dfd-0eb1ab486027n%40googlegroups.com.

Gabe Kassel

unread,
Feb 18, 2021, 9:32:44 AM2/18/21
to Jonathan Hui, nealsj...@gmail.com, openthread-users
You can also observe this simply by building with channel monitor enabled. 

If you then turn on verbose logging from ot-daemon (e.g. ot-daemon -d5), you’ll see the channel monitor print on a regular cadence.

--
_______

Gabe Kassel
Technology Strategist | Office of the CTO

m 770.490.0431
e  ga...@eero.com

nealsj...@gmail.com

unread,
Feb 18, 2021, 1:50:01 PM2/18/21
to openthread-users
Hi Jonathan and Gary,

Thanks for the tips! I was able to issue the channel monitor/manager commands on a CLI device, and also view the monitor activity in logs.

Is there support for the manager/monitor commands in ot-ctl? I flashed an nRF52840 dev kit with rcp code built with the following command:

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

However ot-ctl does not recognize monitor/manager:
> channel monitor
channel monitor
Error 7: InvalidArgs

I'm using the latest otbr docker image on a raspberry pi 4.

nealsj...@gmail.com

unread,
Feb 18, 2021, 1:53:34 PM2/18/21
to openthread-users
sorry, gabe not gary!

Jonathan Hui

unread,
Feb 18, 2021, 2:00:31 PM2/18/21
to nealsj...@gmail.com, openthread-users
When using the RCP model, the channel manager/monitor features are implemented on the host side (i.e. in ot-daemon).

Did you specify the appropriate build flags when building ot-daemon as well?

--
Jonathan Hui



nealsj...@gmail.com

unread,
Feb 18, 2021, 2:32:48 PM2/18/21
to openthread-users
I did not build the docker image - I just pulled it from docker hub. Presumably that is not built with the channel monitor/manager features enabled.

Is there a way I can rebuild the image to add these features to the included ot-daemon? I'm not sure if the docker file is public.

Jonathan Hui

unread,
Feb 18, 2021, 2:43:36 PM2/18/21
to nealsj...@gmail.com, openthread-users

Set OTBR_OPTIONS='-DOT_CHANNEL_MANAGER=ON -DOT_CHANNEL_MONITOR=ON' to have those options passed to the ot-daemon build.

--
Jonathan Hui


nealsj...@gmail.com

unread,
Feb 18, 2021, 3:52:19 PM2/18/21
to openthread-users
Great, thanks for the pointer. Unfortunately, my github workflow and docker buildx experience is lacking and I'm not quite sure what I need to do with that yaml file to build my own image. Do I have use a fork of the repo and modify the workflow to point to my own docker hub? Can I build it locally?

I found this docker file, can I just run this with the correct build args? I'll try it and report back.

Again, thanks for all the help.

Jonathan Hui

unread,
Feb 18, 2021, 3:54:30 PM2/18/21
to nealsj...@gmail.com, openthread-users
Ah, yes, I meant to point to the actual Dockerfile: https://github.com/openthread/ot-br-posix/blob/master/etc/docker/Dockerfile

You should be able to build that locally.

--
Jonathan Hui



nealsj...@gmail.com

unread,
Feb 18, 2021, 9:39:04 PM2/18/21
to openthread-users
Okay, I was able to successfully build the docker image, however I think I may be missing some configuration flags. I built the image with the following command (based on the git workflow yaml):

sudo docker buildx build . -f etc/docker/Dockerfile -t <tag> linux/amd64,linux/arm/v7,linux/arm64 --build-arg REFERENCE_DEVICE=1 --build-arg BACKBONE_ROUTER=1 --build-arg OTBR_OPTIONS='-DOT_CHANNEL_MANAGER=ON -DOT_CHANNEL_MONITOR=ON' --build-arg NAT64=1 --build-arg DNS64=1 --push

After bringing a container up with the image I built, it fails with the following trace:

otbr_1  | RADIO_URL: spinel+hdlc+uart:///dev/ttyACM0
otbr_1  | TUN_INTERFACE_NAME: wpan0
otbr_1  | BACKBONE_INTERFACE: 
otbr_1  | NAT64_PREFIX: 64:ff9b::/96
otbr_1  | AUTO_PREFIX_ROUTE: true
otbr_1  | AUTO_PREFIX_SLAAC: true
otbr_1  | sed: can't read /etc/tayga.conf: No such file or directory
otbr_1  | sed: can't read /etc/bind/named.conf.options: No such file or directory
otbr_1  | +++ dirname /app/script/server
otbr_1  | ++ cd /app/script/..
otbr_1  | ++ [[ ! -n x ]]
otbr_1  | ++ echo 'Current platform is ubuntu'
otbr_1  | Current platform is ubuntu
otbr_1  | ++ STAGE_DIR=/app/stage
otbr_1  | ++ BUILD_DIR=/app/build
otbr_1  | ++ [[ -d /app/stage ]]
otbr_1  | ++ mkdir -v -p /app/stage
otbr_1  | mkdir: created directory '/app/stage'
otbr_1  | ++ [[ -d /app/build ]]
otbr_1  | ++ mkdir -v -p /app/build
otbr_1  | mkdir: created directory '/app/build'
otbr_1  | ++ export PATH=/app/stage/usr/bin:/app/stage/usr/sbin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
otbr_1  | ++ PATH=/app/stage/usr/bin:/app/stage/usr/sbin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
otbr_1  | +++ basename /app/script/server
otbr_1  | ++ TASKNAME=server
otbr_1  | ++ BEFORE_HOOK=examples/platforms/ubuntu/before_server
otbr_1  | ++ AFTER_HOOK=examples/platforms/ubuntu/after_server
otbr_1  | ++ [[ ! -f examples/platforms/ubuntu/before_server ]]
otbr_1  | ++ BEFORE_HOOK=/dev/null
otbr_1  | ++ [[ ! -f examples/platforms/ubuntu/after_server ]]
otbr_1  | ++ AFTER_HOOK=/dev/null
otbr_1  | + . script/_nat64
otbr_1  | ++ TAYGA_DEFAULT=/etc/default/tayga
otbr_1  | ++ TAYGA_CONF=/etc/tayga.conf
otbr_1  | ++ TAYGA_IPV4_ADDR=192.168.255.1
otbr_1  | ++ TAYGA_IPV6_ADDR=fdaa:bb:1::1
otbr_1  | ++ TAYGA_TUN_V6_ADDR=fdaa:bb:1::2
otbr_1  | ++ NAT44_SERVICE=/etc/init.d/otbr-nat44
otbr_1  | ++ WLAN_IFNAMES=eth0
otbr_1  | + . script/_dns64
otbr_1  | ++ BIND_CONF_OPTIONS=/etc/bind/named.conf.options
otbr_1  | ++ NAT64_PREFIX=64:ff9b::/96
otbr_1  | ++ DNS64_NAMESERVER_ADDR=127.0.0.1
otbr_1  | +++ echo 64:ff9b::/96
otbr_1  | +++ tr '"/"' '"/"'
otbr_1  | ++ DNS64_CONF='dns64 64:ff9b::/96 { clients { thread; }; recursive-only yes; };'
otbr_1  | ++ without NAT64
otbr_1  | ++ with NAT64
otbr_1  | ++ local value
otbr_1  | +++ printenv NAT64
otbr_1  | ++ value=1
otbr_1  | ++ [[ -z 1 ]]
otbr_1  | ++ [[ 1 == 1 ]]
otbr_1  | ++ test ubuntu = ubuntu
otbr_1  | ++ '[' ubuntu = raspbian ']'
otbr_1  | ++ '[' ubuntu = beagleboneblack ']'
otbr_1  | ++ '[' ubuntu = ubuntu ']'
otbr_1  | ++ RESOLV_CONF_HEAD=/etc/resolvconf/resolv.conf.d/head
otbr_1  | + main
otbr_1  | + . /dev/null
otbr_1  | + sudo sysctl --system
otbr_1  | /app/script/server: line 41: sudo: command not found

It appears that tayga and bind are not configured correctly. Also, sudo commands fail. I see in the Dockerfile that it should be installing sudo, so I am at a loss for why this fails.

nealsj...@gmail.com

unread,
Feb 18, 2021, 9:40:16 PM2/18/21
to openthread-users
I think the command that I used got truncated, here is the full build command:

sudo docker buildx build . -f etc/docker/Dockerfile -t <tag> --platform linux/amd64,linux/arm/v7,linux/arm64 --build-arg REFERENCE_DEVICE=1 --build-arg BACKBONE_ROUTER=1 --build-arg OTBR_OPTIONS='-DOT_CHANNEL_MANAGER=ON -DOT_CHANNEL_MONITOR=ON' --build-arg NAT64=1 --build-arg DNS64=1 --pus

Jonathan Hui

unread,
Feb 18, 2021, 11:13:31 PM2/18/21
to nealsj...@gmail.com, openthread-users
The following worked for me.

Build:

docker build --no-cache -t openthread/otbr --build-arg OTBR_OPTIONS='-DOT_CHANNEL_MANAGER=ON -DOT_CHANNEL_MONITOR=ON' -f etc/docker/Dockerfile .

Run with RCP at /dev/ttyACM0:

docker run --sysctl "net.ipv6.conf.all.disable_ipv6=0 net.ipv4.conf.all.forwarding=1 net.ipv6.conf.all.forwarding=1" -p 8080:80 --dns=127.0.0.1 -it --volume /dev/ttyACM0:/dev/ttyUSB0 --privileged openthread/otbr

Hope that helps.

--
Jonathan Hui



nealsj...@gmail.com

unread,
Feb 19, 2021, 4:42:59 PM2/19/21
to openthread-users
Thanks Jonathan,

I used that command to build a local image on my raspberry pi border router, and it is working. I can run the monitor and manager commands.

My attempts to build the image on an Ubuntu system (using buildx) for the raspberry pi resulted in an image that failed due to the issues I mentioned above.

Reply all
Reply to author
Forward
0 new messages