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
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?