I would like to flash diode when I have connection to border router.
I was trying to use device roles but it looks not giving me full information that I'm connected to network and Border Router. I will be appreciated for hints how to make it fast and easy.
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;