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.

Access Neighbor Table



Hi,

 Can anyone tell me how to access the a device's own neighbor table? As the ZDP_MgmtLqiReq() I guess can only be used to retrieve other device's neighbor table.

I would really appreciate any help..

Thanks.

Abhishek.

  • Hi,

    the table can be obtained by using the ZDP_MgmtLQIReq() with the appropriate (device's) short address.

    regards,

    Ilya 

  • Hi Ilya,

    Thanks for responding.

    It seems that you can only add the short address of other devices not of the same device in the function. I want to access the neighbor table of the same device in which I flash the program.

    What do you think?

    Abhishek.

  • Hi Abhishek,

    Yes, I meant that it is possible to address the node by itself  by pointing its short address in the command.

    regards,

    Ilya

  • Hi Ilya ,

    I traced to a function called AF_DataRequest in ZDP_MgmtLqiReq , in which it checks for a condition as shown below:

    // First, make sure the destination is not its self, then check for an existing route.
    if ( (dstAddr->addr.shortAddr != NLME_GetShortAddr())
    && (RTG_CheckRtStatus( dstAddr->addr.shortAddr, RT_ACTIVE, (MTO_ROUTE | NO_ROUTE_CACHE) ) != RTG_SUCCESS) )
    {
    // A valid route to a concentrator wasn't found
    return ( afStatus_NO_ROUTE );
    }
    }

    Do you thinks its gonna be a problem?

    Abhishek.

  • HI

    you can try this aPI

    neighborEntry_t    entry;

    NLME_GetRequest( nwkNeighborTable, index, &entry );

    index is from 0 to the max neighbortable items

    and you can use this api to get this numbel

      NLME_GetRequest( nwkNumNeighborTableEntries, 0, &maxItems );

  • Hi Abhishek,

    I'd like to refine what kind of problem you mean. Have you tried to point out the own short address of a node in the command? What is the result?

    It should be mentioned that the node must be in a network and the ZCD_NV_ZDO_DIRECT_CB or ZDO_ MSG_CB_REGISTER/ZDO_ MSG_CB_INCOMING commands should be used in a appropriate way.

    regards,

    Ilya