ot-br-posix icon indicating copy to clipboard operation
ot-br-posix copied to clipboard

otbr fails to start on openWRT with invalid argument

Open silabs-NikhilS opened this issue 3 years ago • 9 comments

Hi, I am trying to run otbr on a openWRT platform. The openWRT is running on a Raspberry Pi 3B+.

To build the otbr, I followed the build instructions on https://github.com/openthread/ot-br-posix/tree/main/etc/openwrt/openthread-br and could build the otbr after the fix #898. However when I try to run the otbr on openWRT I get following error-

otbr-agent[1519]: [CRIT]-PLAT----: get802154RadioUrl() at /home/nikhils/dev/ot-br-posix/third_party/openthread/repo/src/posix/platform/system.cpp:94: InvalidArgument

Here is more from info on the otbr-service

root@OpenWrt:~# otbr-agent -v
otbr-agent[1519]: [INFO]-UTILS---: Running 0.3.0-8ef580a89
otbr-agent[1519]: [INFO]-UTILS---: Thread version: 1.2.0
otbr-agent[1519]: [INFO]-UTILS---: Thread interface: wpan0
otbr-agent[1519]: [INFO]-UTILS---: Backbone interface:
otbr-agent[1519]: [CRIT]-PLAT----: get802154RadioUrl() at /home/nikhils/dev/ot-br-posix/third_party/openthread/repo/src/posix/platform/system.cpp:94: InvalidArgument

Has anyone come across this error before? I have modified the /etc/init.d/otbr-agent to represent the right port of the RCP which is running on Silabs BRD4162A.

Thanks Nik

silabs-NikhilS avatar Jun 17 '21 19:06 silabs-NikhilS

@silabs-NikhilS , are you specifying a radio url when starting otbr-agent? The README includes the following example:

/usr/sbin/otbr-agent 'spinel+hdlc+uart:///dev/ttyUSB0?uart-baudrate=115200'

jwhui avatar Jun 19 '21 00:06 jwhui

@jwhui Yes, I specify the comm port for RCP in /etc/inint.d/otbr-agent as mentioned in the README. Then I use service otbr-agent start to start the otbr

See the contents of my /etc/init.d/otbr-agent file below-

START=90

USE_PROCD=1

start_service() {
        procd_open_instance
        procd_set_param command /usr/sbin/otbr-agent 'spinel+hdlc+uart:///dev/ttyACM0?uart-baudrate=115200'
        procd_close_instance
}

silabs-NikhilS avatar Jun 21 '21 09:06 silabs-NikhilS

@silabs-NikhilS I had the same problem, did you solve it?

mrninhvn avatar Jan 18 '22 09:01 mrninhvn

@mrninhvn Unfortunately I could not spend more time on it so it remians unresolved.

silabs-NikhilS avatar Jan 18 '22 18:01 silabs-NikhilS

@mrninhvn You can use the '-d' parameter to print more information as follow,

/usr/sbin/otbr-agent -d 7 -I wpan0 "spinel+hdlc+uart:///dev/ttyACM0?uart-baudrate=115200"

lancersky avatar Jan 19 '22 01:01 lancersky

@mrninhvn You can use the '-d' parameter to print more information as follow,

/usr/sbin/otbr-agent -d 7 -I wpan0 "spinel+hdlc+uart:///dev/ttyACM0?uart-baudrate=115200"

root@OpenWrt:~# /usr/sbin/otbr-agent -v otbr-agent[2229]: [INFO]-UTILS---: Running 0.3.0-0b75a60c6-dirty otbr-agent[2229]: [INFO]-UTILS---: Thread version: 1.2.0 otbr-agent[2229]: [INFO]-UTILS---: Thread interface: wpan0 otbr-agent[2229]: [INFO]-UTILS---: Backbone interface: otbr-agent[2229]: 49d.18:41:34.393 [CRIT]-PLAT----: get802154RadioUrl() at system.cpp:99: InvalidArgument

/usr/sbin/otbr-agent -d 7 -I wpan0 'spinel+hdlc+uart:///dev/ttyACM0?uart-baudrate=115200' doesn't print any thing.

mrninhvn avatar Jan 19 '22 04:01 mrninhvn

No printing is normal when you run /usr/sbin/otbr-agent -d 7 -I wpan0 'spinel+hdlc+uart:///dev/ttyACM0?uart-baudrate=115200'

~# ps | grep otbr-agent
15319 root      3484 S    /usr/sbin/otbr-agent -d 7 -I wpan0 spinel+hdlc+uart:///dev/ttyACM0?uart-baudrate=115200
19466 root      1128 R    grep otbr-agent

You can open another SSH Terminal to see logread's output. And you can also use the ot-ctl command normally.

~# ot-ctl state
disabled
Done

lancersky avatar Jan 19 '22 12:01 lancersky

No printing is normal when you run /usr/sbin/otbr-agent -d 7 -I wpan0 'spinel+hdlc+uart:///dev/ttyACM0?uart-baudrate=115200'

~# ps | grep otbr-agent
15319 root      3484 S    /usr/sbin/otbr-agent -d 7 -I wpan0 spinel+hdlc+uart:///dev/ttyACM0?uart-baudrate=115200
19466 root      1128 R    grep otbr-agent

You can open another SSH Terminal to see logread's output. And you can also use the ot-ctl command normally.

~# ot-ctl state
disabled
Done

I see, but it not work for me, still same error.

mrninhvn avatar Jan 19 '22 12:01 mrninhvn

This is the log for normal startup.

~# /usr/sbin/otbr-agent -v -I wpan0 'spinel+hdlc+uart:///dev/ttyACM0?uart-baudrate=460800'
otbr-agent[29156]: [INFO]-UTILS---: Running thread-reference-20200818-1424-ge736d2488
otbr-agent[29156]: [INFO]-UTILS---: Thread version: 1.2.0
otbr-agent[29156]: [INFO]-UTILS---: Thread interface: wpan0
otbr-agent[29156]: [INFO]-UTILS---: Backbone interface: 
otbr-agent[29156]: [INFO]-UTILS---: Radio URL: spinel+hdlc+uart:///dev/ttyACM0?uart-baudrate=460800
otbr-agent[29156]: 50d.07:00:51.902 [INFO]-PLAT----: RCP reset: RESET_POWER_ON
otbr-agent[29156]: 50d.07:00:51.911 [NOTE]-PLAT----: RCP API Version: 5
otbr-agent[29156]: [INFO]-UTILS---: Set state callback: OK
otbr-agent[29156]: 00:00:00.021 [INFO]-SRP-----: [server] selected port 53535
otbr-agent[29156]: 00:00:00.021 [INFO]-N-DATA--: Publisher: Publishing DNS/SRP service unicast (ml-eid, port:53535)
otbr-agent[29156]: 00:00:00.022 [INFO]-N-DATA--: Publisher: DNS/SRP service - State: NoEntry -> ToAdd
otbr-agent[29156]: [INFO]-BA------: Publish meshcop service OpenThread BorderRouter._meshcop._udp.local.
otbr-agent[29156]: [INFO]-MDNS----: Add service: OpenThread BorderRouter._meshcop._udp (ref: 0xb6e97360)
otbr-agent[29156]: [INFO]-ADPROXY-: Publish all hosts and services
otbr-agent[29156]: [INFO]-ADPROXY-: Started
otbr-agent[29156]: [INFO]-DPROXY--: started
otbr-agent[29156]: [INFO]-BA------: Start Thread Border Agent: OK
otbr-agent[29156]: [INFO]-UBUS----: Connected as 5733f196
otbr-agent[29156]: [INFO]-UBUS----: Uloop run
otbr-agent[29156]: [INFO]-APP-----: Border router agent started.

lancersky avatar Jan 20 '22 01:01 lancersky

Closing stale issue.

jwhui avatar Jun 27 '23 22:06 jwhui