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

OpenThread Sleepy end device failure

Hello,

I am currently running the openthread client example provided in the NCS and I am trying to toggle the client as a sleepy end device. However, in the toggle_minimal_sleepy_end_device() function, otThreadSetLinkMode(instance, mode) returns OT_ERROR_INVALID_ARGS and "Failed to set MLE link mode configuration" is thus logged to the console. I have added

CONFIG_OPENTHREAD_MTD=y
CONFIG_OPENTHREAD_MTD_SED=y

in the prj.conf file as explained in https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/ug_thread_configuring.html, and the client is correctly initialized as an MTD (child) and does not become either thread leader or router.

I have also the same with the server example, but the same thing happens there as well when calling toggle_minimal_sleepy_end_device().

For the record, the instance pointer returned from openthread_get_default_instance() in toggle_minimal_sleepy_end_device() is not NULL, and the booleans in the mode bit field returned from otThreadGetLinkMode(instance) evaluates to true, false, true, true - respectively. Thus, mode.mDeviceType indicates that the "sender" is an FTD, which i reckon is the problem here. 

Is there anything else I need to do regarding the configuring?

And there is one more thing: When adding the two prj.config lines shown above, the client is not able to send unicast messages to the server. Multicast works as before. That is, I am able to provision the device as before, receiving the IPv6 address of the server, but when trying to send a message, the device halts and needs a restart. Why is this?

  • Hello,

    Indeed, it looks like the SED call succeeds on tag v.1.3.0. It still fails the latest release of the master branch. Do you know how the power management is handled for the SED's on tag v1.3.0 compared to the latest release? The toggle_minimal_sleepy_end_device() function is updated with power management features on the master branch.

  • I tried on the latest master branch again, and at it looks like the MTD is entering sleep mode. At least, no mesh link error occurs. However, it is not obvious to me how the poll period and communication with the SED works. I am not able to communicate with the SED with multicast messages, which is sort of expected. My understanding is that the SED needs to poll its parent for data, but I am not aware of how this is done. Do you have any details on this?

Related