OpenThread RCP not working NCS 1.7.0 and nRF52840DK

Hello,

I am attempting to configure a Raspberry Pi as an OpenThread router, using the nRF52840DK for the RCP. Everything built fine. When the Raspberry Pi boots the avahi-daemon.service ant otbr-web.service is running. The otbr-agent.service attempts to run but times out.

Any idea how to get this working

Parents
  • Hi Allen,

    The logs from otbr-agent.service would be useful. I beleive you can get these using the command:

    journalctl -xe

    Also, where did you get the RCP code from?

    Regards,
    Sigurd Hellesvik

  • Sigurd, Thanks for the tip. I will check out the baud rate.

    Regarding the logs. This is what I see
    init() at ../../third_party/openthread/repo/src/lib/spinel/radio_spinel_impl.hpp:258: Radio
    otbr-agent.service: Main process exited, code-exited, status=3/NOTIMPLEMENTED

    In a different ticket it said that the USB needed to be moved to the nRF USB connector after programming. I changed the power source switch to USB but the board will not power on with this configuration. Is there another switch to flip?

  • The word "baud" does not appear in any of the nrf52840dk dts files. In the uart configuration there is a "current-speed", I assume this is what you are referring to? Both uart0 and uart1 are configured as 115200. However in the "nRF openthread coprocessor" and sample project there is an overlay that changes the speed to 1000000.

    Since this is over USB, which uart is changed and why does it matter since it is just a communications channel. (not connected to a physical serial interface)

Reply
  • The word "baud" does not appear in any of the nrf52840dk dts files. In the uart configuration there is a "current-speed", I assume this is what you are referring to? Both uart0 and uart1 are configured as 115200. However in the "nRF openthread coprocessor" and sample project there is an overlay that changes the speed to 1000000.

    Since this is over USB, which uart is changed and why does it matter since it is just a communications channel. (not connected to a physical serial interface)

Children
  • Hi

    I am sorry, I meant "nrf52840dk_nrf52840.overlay" of course.
    The overlay file will overwrite the settings of the default Device Tree.
    The current-speed is equal to baud rate use.

    So what I suggest is that you change the overlay file to:

    &uart0 {
        current-speed = <115200>;
        status = "okay";
        hw-flow-control;
    };
    
    &uart1 {
        current-speed = <115200>;
        status = "okay";
    };

    It should be enough to change only uart0, but changing both should not do any harm either.

    UART vs USB

    The nRF52840 has an UART and an USB driver. In the nRF52840DK, the USB driver is connected to the nRF USB connector.
    UART0 is connected via the debugger chip to the USB you use to program the nRF52840DK.
    When you use printk or log and read it via a serial monitor on your computer, it is the UART0 that writes.

    For some older samples, the nRF USB was used for the RCP sample. But if you use the coprocessor from nRF Connect SDK, you should connect to the J2 USB connector.

    Regards,
    Sigurd Hellesvik

  • I the uart is already set to the correct speed. If I look at zephyr.dts it is 115200. In hex of course. 

  • Sigurd,

    According to the zephyr.dts file the baud rate is set correctly.

    FYI, I followed the instructions from OpenThread and that worked! I would like to resolve the NRF Connect SDK issue.

  • Regards,

    To explicitly set the baud rate for the OTBR, tou can edit your /etc/default/otbr-agent file to look like this:

    OTBR_AGENT_OPTS="-I wpan0 -B wlan0 spinel+hdlc+uart:///dev/ttyACM0?uart-baudrate=1000000 trel://wlan0

    Just change the number so that the baudrate is similar for both.
    Maybe this will help.

    Can you elaborate on what you mean by "the NRF Connect SDK issue"?

    Regards,
    Sigurd Hellesvik

Related