openthread / ot-reference-release

BSD 3-Clause "New" or "Revised" License
11 stars 27 forks source link

otbr ncs : otbr-agent service fails to start/restart #16

Closed siddhesh-grl closed 2 years ago

siddhesh-grl commented 2 years ago

@LuDuda @edmont I have built an otbr image with ncs REFERENCE_PLATFORM option, using the following command : REFERENCE_PLATFORM=ncs REFERENCE_RELEASE_TYPE=1.3 IN_CHINA=0 ./script/make-reference-release.bash

ot-reference-release commit : 2ba3395 OS Used : Ubuntu 20.04.3 LTS

The build gets completed. However when I try to restart the otbr-agent service (sudo service otbr-agent restart), I get an error. Attaching the output of sudo service otbr-agent status below.

to_ot

On checking the /dev/ttyACM* file, I observed that the rcp dongle port number has changed to /dev/ttyACM1. Before restarting the otbr-agent service, the rcp dongle port number was /dev/ttyACM0.

Note : After the first fail, I tried to edit the /etc/default/otbr-agent file. Therein, I changed the OTBR_AGENT_OPTS to /dev/ttyACM1, as shown below. OTBR_AGENT_OPTS="-I wpan0 -B eth0 spinel+hdlc+uart:///dev/ttyACM1 trel://wlan0"

After doing so, I ran the sudo service otbr-agent restart. However, after the restart, the port got reassigned to ttyACM0; and I got the same error as in the above screenshot.

simonlingoogle commented 2 years ago

I once had the similar issue when my Raspberry Pi device has poor power supply. Could it be due to insufficient power supply?

siddhesh-grl commented 2 years ago

I changed the power supply (5v, 2.4amps), and rechecked. Still the rcp dongle port was reassigned.

I also observed one thing: The rcp dongle port is reassigned only when it has the entry in /etc/default/otbr-agent file.

eg. Case 1:

Case 2:

Had it been a power supply issue, guess the rcp port would be resassigned every time the otbr-agent service would be restarted? However, here it seems to be reassigned only when it has an entry in the /etc/default/otbr-agent file.

Note : Currently I am building the otbr and firmware image using the REFERENCE_PLATFORM=ncs option, and getting this error. Earlier I used the REFERENCE_PLATFORM=nrf52840 option for the build. Therein, I did not face this issue of port reassignment on otbr-agent start/restart.

edmont commented 2 years ago

Hi @siddhesh-grl, currently we are not focusing on adding 1.3 support for the Nordic Connect SDK build. Notice that for the nrf52840 case the RCP firmware is built with the build_1_3_options_common options, but those are not enabled when selecting the ncs platform. In order to do that I guess the best approach should be adding a new config/ncs/overlay-rcp-1_3.conf with the desired Kconfig options. Not sure if this will make any difference in the RCP build though.

siddhesh-grl commented 2 years ago

Hi @edmont , I tried the Kconfig options by creating a overlay-rcp-1_3.conf file It is an exact copy of the overlay-rcp-1_2.conf with the extra build_1_3_options_common appended at the end.

Attaching the screenshot of the options below :

0000_kc

A new zip file with the rcp firmware got created for the new overlay-rcp-1_3.conf. I tried running the firmware on the rcp dongle. However, I still get the same issue as before. The rcp dongle port gets reassigned, whenever the otbr-agent service is started/restarted.

edmont commented 2 years ago

Discussed offline with @siddhesh-grl and seems that https://github.com/openthread/ot-reference-release/pull/18 is fixing the issue.

jwhui commented 2 years ago

Resolved by #18