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.

CC2530: How to force remove entry from neighbor table

Part Number: CC2530
Other Parts Discussed in Thread: Z-STACK

We currently have an issue with our CC2530 running Z-Stack 2.6.3. It is a coordinator which neighbor table gets full. If there are no other ZR on the network new joins are impossible. When requesting a ZE node to leave the network we can create an additional slot in the neighbor table for a new ZR. This works as expected in the case that the ZDO_MGMT_LEAVE_REQ succeeds, if for some reason the node that should leave the network does not respond to the ZDO_MGMT_LEAVE_REQ the neighbor table is not updated and remains full.

Is it possible to (force) remove a node from the neighbor table even if it did not successfully left the network? This in order to prevent nodes from remaining in the neighbor table even though they shouldn't.

  • Hi Robin,

    Have you considered calling the ZDApp_LeaveUpdate API directly from your application?  You could at least further investigate this code to determine the functions used to remove routing/neighbor table entries and security information.

    Regards,
    Ryan

  • Hi Ryan,

    Thanks for your response, I've been looking to the source of ZDApp.c and indeed it seems that calling ZDApp_LeaveUpdate directly from our application would resolve my issue. However, I am unsure how to do that, this doesn't seem to be a documented command in the Z-Stack Monitor & Test API. In the source ZDApp_LeaveUpdate is listed under 'local functions', do we need to alter the firmware in order to make this public/external?

    Best,

    Robin

  • Hi Robin,

    If you are trying to use the default MT API without altering the ZNP firmware then have you tried ZDO_SEC_DEVICE_REMOVE and/or ZDO_EXT_SEC_APS_REMOVE_REQ?

    Regards,
    Ryan

  • Thanks, I tried ZDO_SEC_DEVICE_REMOVE which gives me a "ZNPSimpleResponse { status: 'ZNwkUnknownDevice' }" for all devices in the current neighbor list (as returned by LQI). I expect that 'extended address' as payload for ZDO_SEC_DEVICE_REMOVE should be the IEEE address of the node I am trying to remove from the neighbor list?

    So far no luck with ZDO_EXT_SEC_APS_REMOVE_REQ, these requests seem to time out.

  • Correct, you are trying to remove a device entry by its extended address.  Make sure you that the byte order of data is from LSB to MSB.  I recommend debugging the ZNP firmware to further determine the cause of a time out.

    Regards,
    Ryan