This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

LP-CC2652RB: Zigbee device stack internal state when Coordinator crashes down

Part Number: LP-CC2652RB


Hello!

Please again I need help about two questions:

 

  1. My zigBee plant is made of one coordinator, three routers and 15 end devices, all them working properly:

I was able to send and receive data from all devices, using zigbee2mqtt application.

At this development level, I need to take the right possible actions when something on the network goes wrong.

So, as suggested by your support, on each device I continuously monitor the variable:

“deviceState == zstack_DevState_DEV_ROUTER”  /  “deviceState == zstack_DevState_DEV_END_DEVICE”.

 

But I wonder this variable does not fall down to “zstack_DevState_HOLD”  when I turn off Coordinator! Even after 30 seconds….

I was using this variable to know my device is joined on network… but something is wrong……

 

The variable is very useful at the moment the device for the first time gets joined to network, but thereafter it seems to be useless….unless I unjoin the device from the network, to original state.

 

So (if I do not misunderstand your suggestions) the question is: excluding periodic application level data read/write, how can I be sure I’m joined to Coordinator?

 

  1. A related question: is there some way at application startup I can understand my device  is already registered on the network? (some data written in Flash memory….)

 

Thanks for your kind collaboration

Luigi

  • zstack_DevState_HOLD would only be reached when device is initialized but not started automatically. After router device or end device joins network, it won't go back to zstack_DevState_HOLD. For Zigbee router device, it is designed to be able to work without coordinator so it will keep zstack_DevState_DEV_ROUTER state even coordinator is turned off. For Zigbee end device, it could be in zstack_DevState_NWK_ORPHAN or zstack_DevState_NWK_BACKOFF state if it loses parent node connection.

  • Hello Luigi,

    Zigbee devices are capable of moving in/out of radio range with respect to other nodes within the network.  If a routing device loses the coordinator as a neighbor, then it can perform network routing to find a new route to the coordinator.  End devices who have lost the coordinator as a parent can find another router to take on this role instead.  As YK mentioned, a coordinator is not vital to maintain a network.  The exception is that joining devices typically must be approved by the coordinator Trust Center during commissioning.  Application messages will reveal whether the coordinator is responsive or not.  

    Z-Stack API Guide
    Zigbee Fundamentals SLA
    Z-Stack Overview

    Regards,
    Ryan

  • Hi Rayan, Chen
    please again consider the ZigBee network of our product, as if it were based on a Host device which through Zigbee2Mqtt connects to a single Coordinator, which in turn sends and/or receives application data from Routers or End Devices.
    In other words, the Host sends or receives data from the various end devices / routers, through the coordinator.
    
    Routers and End devices, at the application level, have the same input output functions.
    
    At the level of these devices it is mandatory to understand if the Coordinator is online!
    
    So please can you suggest us a way to understand from these two types of devices whether the coordinator is online or not?
    The method we currently use is based on the periodic writing of a variable to the host which consequently writes one to the end device / router.
    If no feedback is received, the Coordinator is considered offline.
    
    We believe there should be a more performant method, operating at a lower layer of the application requiring less data traffic.....
    
    Thank you
  • If the coordinator is a direct neighbor or parent, you can use neighbor lists (Zstackapi_ZdoMgmtLqiReq()/ZDO_MGMT_LQI_REQ or stackapi_ZdoMgmtNwkDiscReq()/ZDO_MGMT_NWK_DISC_REQ) or orphan device state for the ZR or ZED, respectively, to determine the ZC's status.  Otherwise, periodic check-ins like the workaround you've described are the best method.

    Regards,
    Ryan

  • You can try to request endpoint of coordinator periodically from your router and end device. If you cannot get endpoint response from coordinator then your device knows the coordinator is not reachable.

  • Good morning Mr. Che;  please can you suggest us a way to request a endpoint of coordinator periodically ?
    Where we can get coordinator endpoint information  on the End Device? Thank for your attention .

    BR


  • I believe YK is referring to Zstackapi_ZdoActiveEndpointReq()/ZDO_ACTIVE_EP_REQ where DstAddr and NWKAddrOfInterest attributes are 0x0000 (ZC).

    Regards,
    Ryan

  • Ok you all. Still many thanks!

    We'll try to follow your suggestions.

    A related question: is there some way that at application startup I can understand my device  is/was registered on the network? (some data written in Flash memory….)

    This allows me redoing  JOIN request if I found device (previously joined) unjoined!

    B.R.

    Luigi

  • You can refer to the bdbAttribute bdbNodeIsOnANetwork which is read from the ZCD_NV_BDBNODEISONANETWORK NV item.

    Regards,
    Ryan

  • Thank you!

    BR

    Luigi