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

Programmatically set device role for Thread node

Hello! 

My issue is about setting the role for a thread device from my program, I'm programming the device using Segger Embedded Studio and the last SDK for Thread and Zigbee.

I want to know if there is a function for setting the device role. I've readed in another entry in this forum about the function otThreadSetRouterRoleEnabled(), but it seems that is no longer supported in recent versions of the SDK.

Thanks in advance!

Parents Reply
  • Hi Charlie,

    Ok, I have run the example of coap server and client system in 10 nrf52840 devices . and i have check that each devices roles. and roles are shown like leader, router,child and where is REED or FED .

    Is FED is called as Child?

    why REED role or FED role is not in the thread.h

    typedef enum
    {
        OT_DEVICE_ROLE_DISABLED = 0, ///< The Thread stack is disabled.
        OT_DEVICE_ROLE_DETACHED = 1, ///< Not currently participating in a Thread network/partition.
        OT_DEVICE_ROLE_CHILD    = 2, ///< The Thread Child role.
        OT_DEVICE_ROLE_ROUTER   = 3, ///< The Thread Router role.
        OT_DEVICE_ROLE_LEADER   = 4, ///< The Thread Leader role.
    } otDeviceRole;

    Is REED or Router can assign directly as per latest openThread version?

Children
Related