OpenThread Daemon supporting CSL for nrf52840DK

Hi

I am trying to setup and test the OpenThread CSL feature on nrf52840DK with OpenThread daemon and RCP mode nrf52840DK.

I found there is a way to build the Daemon for the RCP mode nrf52840 in the link.

https://openthread.io/codelabs/openthread-hardware#1

When I try the "3. Clone repositories", I was able to build the Daemon. However the CSL feature is not enabled.

This is the command I used to build the OT Daemon for CSL enable but it fails.

"./script/cmake-build posix -DOT_DAEMON=ON -DOT_CSL_RECEIVER=ON -DOT_CSL_RECEIVER_LOCAL_TIME_SYNC=ON -DBUILD_TESTING=OFF"

The error message in the terminal...

In file included from ../../src/core/mac/mac_links.hpp:43,
from ../../src/core/mac/mac.hpp:52,
from ../../src/core/thread/mle.hpp:52,
from ../../src/core/thread/network_data.hpp:51,
from ../../src/core/utils/slaac_address.hpp:45,
from ../../src/core/common/settings.hpp:55,
from ../../src/core/instance/instance.hpp:80,
from ../../src/cli/cli.hpp:86,
from ../../src/cli/cli_coap.cpp:42:
../../src/core/mac/sub_mac.hpp:74:2: error: #error "Microsecond timer OPENTHREAD_CONFIG_PLATFORM_USEC_TIMER_ENABLE i
s required for " "OPENTHREAD_CONFIG_MAC_CSL_RECEIVER_ENABLE"
74 | #error "Microsecond timer OPENTHREAD_CONFIG_PLATFORM_USEC_TIMER_ENABLE is required for "\
| ^~~~~
../../src/core/mac/sub_mac.hpp:679:5: error: ‘TimeMicro’ does not name a type; did you mean ‘TimeMilli’?
679 | TimeMicro mCslSampleTimeLocal; // The CSL sample time of the current period based on local time.
| ^~~~~~~~~
| TimeMilli
../../src/core/mac/sub_mac.hpp:680:5: error: ‘TimeMicro’ does not name a type; did you mean ‘TimeMilli’?
680 | TimeMicro mCslLastSync; // The timestamp of the last successful CSL synchronization.
| ^~~~~~~~~
| TimeMilli
../../src/core/mac/sub_mac.hpp:682:5: error: ‘TimerMicro’ does not name a type; did you mean ‘TimerMilli’?
682 | TimerMicro mCslTimer;
| ^~~~~~~~~~
| TimerMilli
ninja: build stopped: subcommand failed.

Do you support the OT Daemon for CSL mode?

Thanks,

YC.

Parents
  • Hello,

    Try setting these when building the RCP in it's prj.conf file:

    CONFIG_OPENTHREAD_CSL_RECEIVER – Enables SSED (Synchronized Sleepy End Device) child mode.
    CONFIG_OPENTHREAD_CSL_AUTO_SYNC – Enables CSL autosynchronization.
    CONFIG_OPENTHREAD_CSL_TIMEOUT – Sets the default CSL timeout in seconds.
    CONFIG_OPENTHREAD_CSL_CHANNEL – Sets the default CSL channel

    And let me know if that doesn't work.

    Best regards,

    Edvin

  • Hi Edvin,

    I am trying to build the OpenThread Daemon which would communicate with the nrf52840DK RCP mode.

    These two steps what I did.

    • 1. Clone and install OpenThread. The script/bootstrap commands make sure the toolchain is installed and the environment is properly configured:
      $ mkdir -p ~/src
      $ cd ~/src
      $ git clone --recursive github.com/.../openthread.git
      $ cd openthread
      $ ./script/bootstrap

    • 2. Build OpenThread Daemon:
      $ script/cmake-build posix -DOT_DAEMON=ON -DOT_CSL_RECEIVER=ON

    And this is the compilation error message.

    ../../src/core/mac/sub_mac.hpp:74:2: error: #error "Microsecond timer OPENTHREAD_CONFIG_PLATFORM_USEC_TIMER_ENABLE is required for " "OPENTHREAD_CONFIG_MAC_
    CSL_RECEIVER_ENABLE"

    I tried to add the 4 CONFIGs but there is no the prj.conf find in the workspace I did the git clone at step 1.

    Could you show me how to add the 4 configuration in this workspace, please?

    Thanks,

    YC.

  • ddica78 said:

    I tried to add the 4 CONFIGs but there is no the prj.conf find in the workspace I did the git clone at step 1.

    These configs are not for the application running on your computer. These are for the nRF RCP project that you can get from the nRF Connect SDK (NCS). Building the NCS\nrf\samples\openthread\coprocessor is what gives you the .hex file that you should flash on the nRF52840. 

    For the openthread application that you are trying to build, I don't know what you need to do. I have never tried this. This is not our product/project/application. It is owned by OpenThread, so you need to reach out to them. Of course, if I was familiar with it, and knew what you needed to do, I would let you know. But I have never looked into it, unfortunately.

    Best regards,

    Edvin

Reply
  • ddica78 said:

    I tried to add the 4 CONFIGs but there is no the prj.conf find in the workspace I did the git clone at step 1.

    These configs are not for the application running on your computer. These are for the nRF RCP project that you can get from the nRF Connect SDK (NCS). Building the NCS\nrf\samples\openthread\coprocessor is what gives you the .hex file that you should flash on the nRF52840. 

    For the openthread application that you are trying to build, I don't know what you need to do. I have never tried this. This is not our product/project/application. It is owned by OpenThread, so you need to reach out to them. Of course, if I was familiar with it, and knew what you needed to do, I would let you know. But I have never looked into it, unfortunately.

    Best regards,

    Edvin

Children
No Data
Related