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

  • I use 6 nodes. One of them is NCP. 

    If I create thread network and time passes, some nodes go to this state. 

    Time is cca 5min - 1hour.

    Usually 1-4 nodes form 5 (except NCP) go to OT_CHANGED_THREAD_NETIF_STATE  

    Why is called function ThreadNetif::Down(void)?

    Is any way to wake up node which is in OT_CHANGED_THREAD_NETIF_STATE ? 

    messages from debuger :

    <info> app: Thread version: OPENTHREAD/20180926-00632-g2279ef61; NRF52840; May 23 2019 20:44:20
    <info> app: Network name: OpenThread
    <info> app: Thread interface has been enabled.
    <info> app: 802.15.4 Channel : 11
    <info> app: 802.15.4 PAN ID : 0xABCD
    <info> app: Radio mode: : rx-on-when-idle
    <info> app: State changed! Flags: 0x047F133D Current role: 1

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

    <info> app: State changed! Flags: 0x020012A4 Current role: 2

    <info> app: State changed! Flags: 0x00000064 Current role: 3

    (cca 30 min without activity)


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

     

  • from RTT viewer:

    ERROR: Failed to read RTT data. Disconnecting.

    LOG: RTT Viewer disconnected.

  • Hi Fran,

    The OT_CHANGED_THREAD_NETIF_STATE flag does not give us much information, is just mean that the Thread network interface goes down. Sorry for the late answer here. I want to try to see if I can reproduce the issue at my end. I will let you know when I have new information.

    Best regards,

    Marjeris

  • Hi Fran,

    Could you send me the code for each of your nodes? I have made this case private so you can share your code. I was not able to reproduce the issue using the simple_coap_server and ncp example out of the box with our DKs. Have you done any modification to the examples?

    And can you explain more in detail what do you mean when you say the nodes stop responding? What is the state of the LED0? Are you able to connect using the CLI interface? What happens if you press reset after the node gets detached from the network? Do they reconnect or not?

    BR,

    Marjeris

Reply
  • Hi Fran,

    Could you send me the code for each of your nodes? I have made this case private so you can share your code. I was not able to reproduce the issue using the simple_coap_server and ncp example out of the box with our DKs. Have you done any modification to the examples?

    And can you explain more in detail what do you mean when you say the nodes stop responding? What is the state of the LED0? Are you able to connect using the CLI interface? What happens if you press reset after the node gets detached from the network? Do they reconnect or not?

    BR,

    Marjeris

Children
No Data
Related