Thread co-processor sample does not work on nRF52840 board (using ot-cli tool)

Hello,

I have been trying to run the Thread co-processor sample for a whole day with no success. I have tried everything including the steps from OpenThread website. I originally wanted to run a Thread Border Router but now I'd just be happy to create a Thread network with a nRF52840 DK board.

I have built the Thread co-processor sample as below:

west build -b nrf52840dk_nrf52840 -d build_nrf52840dk_nrf52840 -- -DCONF_FILE=prj.conf -DOVERLAY_CONFIG=overlay-rcp.conf

and flashed the board:

west flash --erase --build-dir ./build_nrf52840dk_nrf52840/

I then verified the flash memory and it is ok.

This is the git commit id of the sample d391915ad

Now, when I run the ot-cli tool this is what I get:

sudo ./build/posix/src/posix/ot-cli 'spinel+hdlc+uart:///dev/ttyACM0?uart-baudrate=1000000?uart-flow-control' --verbose
./build/posix/src/posix/ot-cli[19719]: Running OPENTHREAD/thread-reference-20200818-ncs1-rc3-560-g02e61a2ed; POSIX; Apr 3 2022 14:31:53
./build/posix/src/posix/ot-cli[19719]: Thread version: 2
./build/posix/src/posix/ot-cli[19719]: 49d.17:45:10.943 [CRIT]-PLAT----: Too many rcp failures, exiting
./build/posix/src/posix/ot-cli[19719]: 49d.17:45:10.943 [CRIT]-PLAT----: BSD TCP function() at radio_spinel_impl.hpp:2249: Failure

I have added the "?uart-flow-control" parameter despite it is not present in your guide here https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/ug_thread_tools.html#running-the-openthread-posix-applications and the sample has uart flow control enabled. Anyway it does not work even without the uart flow control parameter. 

I ran out of idesa... please help.

Thank you. 

  • Hi,

    It looks like the line number in the log output does not match the location in the file radio_spinel_impl.hpp that would print this message, if you are using the correct commits. This indicates that you either are using a different commit, or have changed the OpenThread files.

    We will look at updating the documentation to reflect the correct OpenThread commit version to use, but from your images, it looks like you have used the correct version.

    When building the ot-cli/daemon, make sure to delete the build directory before building if you have done any changes in Git, if not, the changes may not be detected and rebuilt using Cmake.

    Best regards,
    Jørgen

  • Hi Jorgen,

    I always delete the build folder first.

    Should try again with openthread library git commit id 02e61a2edd80417e9b8f9a5f4c1b2dad4ac486b4 ??

    If yes, the nrf-connect sdk remains commit (which include the RCP code for the nrf52840) remains the same right?

    Thank you

  • Yes, please try again with that commit for OpenThread and nRF Connect SDK v1.9.1 tag.

  • Hi, I bought a nRF52840 dongle and I am following the steps showed here: developer.nordicsemi.com/.../ug_thread_tools.html

    I get this error when I try to upgrade the firmware over USB:

    Traceback (most recent call last):
    File "/home/marco/.local/bin/nrfutil", line 8, in <module>
    sys.exit(cli())
    File "/usr/lib/python3/dist-packages/click/core.py", line 764, in __call__
    return self.main(*args, **kwargs)
    File "/usr/lib/python3/dist-packages/click/core.py", line 717, in main
    rv = self.invoke(ctx)
    File "/usr/lib/python3/dist-packages/click/core.py", line 1137, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
    File "/usr/lib/python3/dist-packages/click/core.py", line 1137, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
    File "/usr/lib/python3/dist-packages/click/core.py", line 956, in invoke
    return ctx.invoke(self.callback, **ctx.params)
    File "/usr/lib/python3/dist-packages/click/core.py", line 555, in invoke
    return callback(*args, **kwargs)
    File "/home/marco/.local/lib/python3.8/site-packages/nordicsemi/__main__.py", line 1022, in usb_serial
    do_serial(package, port, connect_delay, flow_control, packet_receipt_notification, baud_rate, serial_number, False,
    File "/home/marco/.local/lib/python3.8/site-packages/nordicsemi/__main__.py", line 978, in do_serial
    dfu.dfu_send_images()
    File "/home/marco/.local/lib/python3.8/site-packages/nordicsemi/dfu/dfu.py", line 127, in dfu_send_images
    self._dfu_send_image(self.manifest.application)
    File "/home/marco/.local/lib/python3.8/site-packages/nordicsemi/dfu/dfu.py", line 88, in _dfu_send_image
    self.dfu_transport.open()
    File "/home/marco/.local/lib/python3.8/site-packages/nordicsemi/dfu/dfu_transport_serial.py", line 216, in open
    self.__set_prn()
    File "/home/marco/.local/lib/python3.8/site-packages/nordicsemi/dfu/dfu_transport_serial.py", line 360, in __set_prn
    self.__get_response(DfuTransportSerial.OP_CODE['SetPRN'])
    File "/home/marco/.local/lib/python3.8/site-packages/nordicsemi/dfu/dfu_transport_serial.py", line 491, in __get_response
    raise NordicSemiException('Unexpected Executed OP_CODE.\n' \
    pc_ble_driver_py.exceptions.NordicSemiException: Unexpected Executed OP_CODE.
    Expected: 0x02 Received: 0x7E

    I got it to work once after many attempts so I don't know if it has to do with hardware or firmware. Anyway when the USB finally worked I then got the following error by running ot-daemon.

    ./build/posix/src/posix/ot-daemon[86122]: Running OPENTHREAD/thread-reference-20200818-ncs1-rc3-560-g02e61a2ed; POSIX; Apr 14 2022 15:31:24
    ./build/posix/src/posix/ot-daemon[86122]: Thread version: 3
    ./build/posix/src/posix/ot-daemon[86122]: 50d.00:12:33.962 [CRIT]-PLAT----: RCP is missing required capabilities: tx-security tx-timing
    ./build/posix/src/posix/ot-daemon[86122]: 50d.00:12:33.962 [CRIT]-PLAT----: BSD TCP function() at radio_spinel_impl.hpp:391: RadioSpinelIncompatible

    NOTE: I have checked out openthread library commit 02e61a2edd80417e9b8f9a5f4c1b2dad4ac486b4

  • Hello,

    I have tried commit id 02e61a2edd80417e9b8f9a5f4c1b2dad4ac486b4 for modules/lib/openthread together with nrf Connect SDK 1.9.0 tag as suggested.

    I confirm that building both RCP and openthread daemon to Thread version 1.1 (-DOT_THREAD_VERSION=1.1) works (RCP does not crash at least) while building Thread version 1.2 does not. Here the error:

    ./build/posix/src/posix/ot-daemon[86721]: Running OPENTHREAD/thread-reference-20200818-ncs1-rc3-560-g02e61a2ed; POSIX; Apr 20 2022 15:46:54
    ./build/posix/src/posix/ot-daemon[86721]: Thread version: 3
    ./build/posix/src/posix/ot-daemon[86721]: 50d.00:58:05.020 [CRIT]-PLAT----: RCP is missing required capabilities: tx-security tx-timing
    ./build/posix/src/posix/ot-daemon[86721]: 50d.00:58:05.020 [CRIT]-PLAT----: BSD TCP function() at radio_spinel_impl.hpp:391: RadioSpinelIncompatible

    I know that opentherm library is broken due to some TCP defines recently added: 

    github.com/.../7552

    I have also tried the docker image as described in your guide and it fails. It think the reason is because it uses Thread version 1.2

    Apr 20 15:02:21 71a299c2e677 otbr-agent[239]: [INFO]-UTILS---: Running 0.3.0-f0bd21664
    Apr 20 15:02:21 71a299c2e677 otbr-agent[239]: [INFO]-UTILS---: Thread version: 1.2.0
    Apr 20 15:02:21 71a299c2e677 otbr-agent[239]: [INFO]-UTILS---: Thread interface: wpan0
    Apr 20 15:02:21 71a299c2e677 otbr-agent[239]: [INFO]-UTILS---: Backbone interface: eth0
    Apr 20 15:02:21 71a299c2e677 otbr-agent[239]: [INFO]-UTILS---: Radio URL: spinel+hdlc+uart:///dev/ttyACM0?uart-baudrate=1000000
    Apr 20 15:02:21 71a299c2e677 otbr-web[267]: [INFO]-WEB-----: Running 0.3.0-f0bd21664
    Apr 20 15:02:21 71a299c2e677 otbr-web[267]: [INFO]-WEB-----: Border router web started on wpan0
    Apr 20 15:02:21 71a299c2e677 otbr-web[267]: [ERR ]-WEB-----: OpenThread daemon is not running.
    Apr 20 15:02:22 71a299c2e677 avahi-daemon[211]: Server startup complete. Host name is 71a299c2e677.local. Local service cookie is 1620168904.
    Apr 20 15:02:22 71a299c2e677 rsyslogd: rsyslogd's groupid changed to 101
    Apr 20 15:02:22 71a299c2e677 rsyslogd: rsyslogd's userid changed to 101
    Apr 20 15:02:22 71a299c2e677 rsyslogd: [origin software="rsyslogd" swVersion="8.32.0" x-pid="144" x-info="http://www.rsyslog.com"] start
    Apr 20 15:02:23 71a299c2e677 otbr-agent[239]: 50d.01:06:17.236 [CRIT]-PLAT----: BSD TCP function() at radio_spinel_impl.hpp:2226: RadioSpinelNoResponse

    I am working around this but I suggest you to try the same and eventually fix the docker image by getting latest openthread main. It would also make sense to update modules/lib/openthread as the fix has been recently merged in:

    github.com/.../7570

    Thank you. 

Related