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

state chaneged flags

from SDK 3.1 for thread and zigbee  in simple coap server

after any time it go to disabled mode and no response 

what means the flags? why is it disabled and do not response? 

<info> app: State changed! Flags: 0x02002044 Current role: 1

Thanks!

Parents
  • Hi Frantisek,

    If you do a search in the code inside thread_simple_coap_server example you will see that the NRF_LOG module will print "State changed! Flags: 0x%08x Current role: %d\r\n" inside the thread_state_changed_callback function in main.c. The device role retrieve from otThreadGetDeviceRole(). Role 1 means the node is "detached", and the device is not currently participating in the Thread network.

    The flags that are passed as part of otStateChangedCallback to thread_state_changed_callback_set() are found here.

    You can see the bits are set with flag 0x02002044 are:

    OT_CHANGED_THREAD_ROLE

    OT_CHANGED_THREAD_RLOC_REMOVED

    OT_CHANGED_IP6_MULTICAST_UNSUBSRCRIBED

    OT_CHANGED_THREAD_NETIF_STATE

    The last one means that the Thread network interface state have changed and ThreadNetif::Down(void) has been called.

    Can you post all the logs from the RTT terminal and steps to reproduce the issue? Also how many nodes do you have and what exactly did you do before this happened?

    Best regards,

    Marjeris

Reply
  • Hi Frantisek,

    If you do a search in the code inside thread_simple_coap_server example you will see that the NRF_LOG module will print "State changed! Flags: 0x%08x Current role: %d\r\n" inside the thread_state_changed_callback function in main.c. The device role retrieve from otThreadGetDeviceRole(). Role 1 means the node is "detached", and the device is not currently participating in the Thread network.

    The flags that are passed as part of otStateChangedCallback to thread_state_changed_callback_set() are found here.

    You can see the bits are set with flag 0x02002044 are:

    OT_CHANGED_THREAD_ROLE

    OT_CHANGED_THREAD_RLOC_REMOVED

    OT_CHANGED_IP6_MULTICAST_UNSUBSRCRIBED

    OT_CHANGED_THREAD_NETIF_STATE

    The last one means that the Thread network interface state have changed and ThreadNetif::Down(void) has been called.

    Can you post all the logs from the RTT terminal and steps to reproduce the issue? Also how many nodes do you have and what exactly did you do before this happened?

    Best regards,

    Marjeris

Children
Related