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

NRF52840 zigbee router's neighbour table (management lqi) is not updating even if the end device is disconnected

I have created zigbee network using nordic dk board, i am trying to fetch all the active nodes in the network using zdo mgmt_lqi cli and i am getting those details but when i power off any device and then if i fetch the neighbour table i am getting that powered off device too. I have tried to fetch even after 15 minutes but still i am getting that device.

Is there any timeout is defined for this ? or how can i update this neighbour table details?

  • Hi,

    If you're using end device keep alive, then the router parent should delete a child from it's neighbor table if it doesn't receive a keep alive message during the timeout period. The end device timeout period can be configured with zb_set_ed_timeout, and how often the keep alive message is sent can be configured by zb_set_keepalive_timeout. Please note that you should set this period in such a way that the end device sends at least 3 keep alive messages during the end device timeout period. You can read more about end device keep alive here. There are also several examples that use this that you can take a look at to see how it's used, like the light control example, where you can find it at line 534 in main.c in the light switch code in v4.1.0 of the SDK.

    Best regards,

    Marte

  • Ok, this will work for end device but what for Router, will it work for Router too?

  • Can you please confirm ? Is it going to work with router too?

  • Hi,

    This will not work for the router, as it doesn't have the availability for the same keep alive functionality as the end device does. However, this should be handled by default by the Zigbee stack.

    This is done by using link status command in order to keep track of route symmetry. Every so often a router will send out a broadcast with a radius of 1. This broadcast indicates the link status, and the neighboring routers will keep track of these messages to determine which routers can hear them, and which they can hear in return.

    You can also find more information about neighbor tables and this in the Zigbee specification, in chapter 3.6.1.5:

    For devices using link status messages, the age fields for routers in the neighbor table are incremented every nwkLinkStatusPeriod. If the value exceeds nwkRouterAgeLimit, the outgoing cost field of the neighbor table entry is set to 0. In other words, if a device fails to receive nwkRouterAgeLimit link status messages from a router neighbor in a row, the old outgoing cost information is discarded. In this case, the neighbor entry is considered stale and may be reused if necessary to make room for a new neighbor. End devices do not issue link status messages and therefore should never be considered stale.

    In the SDK, the number of missed link status command frames before resetting the link costs to zero (nwkRouterAgeLimit in the Zigbee spec) is defined by ZB_NWK_ROUTER_AGE_LIMIT, and the time in seconds between link status command frames (nwkLinkStatusPeriod in the Zigbee spec) is defined by ZB_NWK_LINK_STATUS_PERIOD. These are by default 3 and 0xf, but they can be changed.

    Best regards,

    Marte

  • Ok I understood your point, but can you explain why am I getting following behavior?

    I have configured 1 Nordic Dk as Coordinator and 2nd as router, so when router is ON and I fetch neighbor table of coordinator then I got table with datils of router which is working fine, but my problem is when I turned off router and then fetch the table then again I am getting that router's detail in table, even after 15 minute I am getting that router in the table.

    My question is why am I getting that turned off router's details? it should be gone from the neighbor table details, that is not happening.

Related