This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Issue Running Open Thread Border Agent on Raspberry Pi 3 with NRF52840 as Network Co-processor (NCP)

Hi,

I am trying to implement a Thread Border Router on Raspberry Pi 3 with NRF52840DK as a Network Co-processor (NCP).

I have followed the below steps to install the Thread Border Router on Raspberry Pi 3.

Step 1: Cloned open thread border router(OTBR) repository

$ git clone github.com/.../ot-br-posix.git --depth 1

Step 2: Build and Installed OTBR on Raspberry Pi

$ cd ot-br-posix
$ ./script/bootstrap
$ INFRA_IF_NAME=wlan0 ./script/setup

Step 3: Built and Flashed nrf/samples/openthread/coprocessor example on NRF52840DK from NRF Connect SDK (NCS) v1.6.1

$ west build -b nrf52840dk_nrf52840 --build_dir build_nrf52840dk_nrf52840

$ west flash --snr 683344644 --build-dir build_nrf52840dk_nrf52840/

Step 4: Connected the NRF52840DK to Raspberry Pi 3 over USB.

Step 5: Found the emulated NRF52840DK UART port.

In this case it is /dev/ttyACM0

Step 6: Updated the /etc/default/otbr-agent settings file to.

pi@raspberrypi:/etc/default $ cat otbr-agent
# Default settings for otbr-agent. This file is sourced by systemd

# Options to pass to otbr-agent
OTBR_AGENT_OPTS="-I wpan0 -B wlan0 spinel+hdlc+uart:///dev/ttyACM0 trel://wlan0"

Step 7: Rebooted the Raspberry Pi

Step 8: Checked the otbr-agent service status

pi@raspberrypi:/etc/default $ sudo service otbr-agent status
● otbr-agent.service - Border Router Agent
    Loaded: loaded (/lib/systemd/system/otbr-agent.service; enabled; vendor preset: enabled)
    Active: activating (auto-restart) (Result: exit-code) since Fri 2021-09-10 19:52:56 BST; 180ms ago
  Process: 2035 ExecStart=/usr/sbin/otbr-agent $OTBR_AGENT_OPTS (code=exited, status=6)
Main PID: 2035 (code=exited, status=6)

The service starts and keeps on exiting with status code 6. I have even tried restarting the service but still no luck. Can someone tell me if I am missing anything?

Parents
  • Step 3: Built and Flashed nrf/samples/openthread/coprocessor example on NRF52840DK from NRF Connect SDK (NCS) v1.6.1

    Hi Mohinish,

    I am sorry for the late reply, I will be looking into this today. Do you remember if you have configured the co-processor sample as NCP or RCP before building and flashing into the nRF52840 DK?

    For using the co-processor sample together with the Openthread border router you will need to configure the sample as a radio co-processor (RCP), the default for the sample is for NCP architecture.

    Can you try following the steps in Configuring a radio co-processor when building the co-processor sample: https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/ug_thread_tools.html#configuring-a-radio-co-processor 

    And running this line:

    west build -p always -b nrf52840dk_nrf52840 nrf/samples/openthread/coprocessor/ -- -DOVERLAY_CONFIG="overlay-rcp.conf ../cli/overlay-thread_1_2.conf"

    instead of

    west build -b nrf52840dk_nrf52840 --build_dir build_nrf52840dk_nrf52840

    Remember also to --erase when flashing. Do also step 2.b for dissabling the mass storage functionality.

    Let me know if this helps.

    Best regards,

    Marjeris

  • Hi Marjeris,

    I tried building as per your suggestion but still getting the error. Below I have put the otbr-agent service logs:

    Sep 16 18:57:20 raspberrypi systemd[1]: otbr-agent.service: Main process exited, code=exited, status=3/NOTIMPLEMENTED
    Sep 16 18:57:20 raspberrypi systemd[1]: otbr-agent.service: Failed with result 'exit-code'.
    Sep 16 18:57:25 raspberrypi systemd[1]: otbr-agent.service: Service RestartSec=5s expired, scheduling restart.
    Sep 16 18:57:25 raspberrypi systemd[1]: otbr-agent.service: Scheduled restart job, restart counter is at 632.
    Sep 16 18:57:26 raspberrypi otbr-agent[1543]: [INFO]-UTILS---: Running 0.3.0-3bdb2fe63
    Sep 16 18:57:26 raspberrypi otbr-agent[1543]: [INFO]-UTILS---: Thread version: 1.2.0
    Sep 16 18:57:26 raspberrypi otbr-agent[1543]: [INFO]-UTILS---: Thread interface: wpan0
    Sep 16 18:57:26 raspberrypi otbr-agent[1543]: [INFO]-UTILS---: Backbone interface: wlan0
    Sep 16 18:57:26 raspberrypi otbr-agent[1543]: [INFO]-UTILS---: Radio URL: spinel+hdlc+uart:///dev/ttyACM0?uart-baudrate=1000000
    Sep 16 18:57:26 raspberrypi otbr-agent[1543]: [INFO]-UTILS---: Radio URL: trel://wlan0
    Sep 16 18:57:26 raspberrypi otbr-agent[1543]: [INFO]-PLAT----: RCP reset: RESET_POWER_ON
    Sep 16 18:57:26 raspberrypi otbr-agent[1543]: [NOTE]-PLAT----: RCP API Version: 3
    Sep 16 18:57:26 raspberrypi otbr-agent[1543]: [CRIT]-PLAT----: RCP API Version 3 is not in the supported range [4-4]
    Sep 16 18:57:26 raspberrypi otbr-agent[1543]: [CRIT]-PLAT----: CheckRcpApiVersion() at ../../third_party/openthread/repo/src/lib/spinel/radio_spinel_impl.hpp:412: RadioSpinelIncompatible
    Sep 16 18:57:26 raspberrypi systemd[1]: otbr-agent.service: Main process exited, code=exited, status=3/NOTIMPLEMENTED
    Sep 16 18:57:26 raspberrypi systemd[1]: otbr-agent.service: Failed with result 'exit-code'.

    I would also like to know how I can implement OTBR with NRF52840 as NCP. Can you point me to some tutorial?

  • Hi Mohinish,

    Unknown said:
    Sep 16 18:57:26 raspberrypi otbr-agent[1543]: [CRIT]-PLAT----: RCP API Version 3 is not in the supported range [4-4]

    Based on the log report it seems to be some mismatch between APIs, I am checking if there is a recommended commit of the OT-BR example that should be used with NCS v1.6.1.

  • Hi again,

    Before NCS v1.7 we didn't officially support OT-BR with NCS RCP. If using NCS v.16.99 (latest) you can use the recommended commit for OT-BR: https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/ug_thread_tools.html#installing-otbr-manually-raspberry-pi

    Or you can work with OT-BR master and vanilla nRF52xxx RCP, built directly through OpenThread, not through NCS, has described in https://openthread.io/codelabs/openthread-border-router#1

    NCS v.1.7 will be released with better support for OT-BR.

Reply Children
No Data
Related