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.

how could the ZNP coordinator manage its association table?

Other Parts Discussed in Thread: CC2530, Z-STACK

Hi there

         there  is  a coordinator, which  is running the ZNP  mode(linux ).

         is there any  function could support for it to manage  its  association  table?

        i  mean  if  the association table is full , how could  the ZNP coordinator delete the  useless endpoint?

        and  could  we output the association table? because the CC2530 RAM is not support too many endpoint !

BR

  • You can use MT command UTIL_GET_DEVICE_INFO to get associated device list.
  • Hi Yiaki, 

    Suppose the association table is full assume this is the case 

    ****************************************************** Z- TOOLS Log **************************************************************************

    <TX>04:00:11.51 COM7 UTIL_GET_DEVICE_INFO (0x2700)

    <RX>04:00:11.52 COM7 UTIL_GET_DEVICE_INFO_RESPONSE (0x6700)
    Status: SUCCESS (0x0)
    IEEEAddr: 0x00124B0007DBFB37
    ShortAddress: 0x0000
    DeviceType: COORDINATOR (0x1)
    DeviceState: DEV_ZB_COORD (0x9)
    NumAssocDevices: 0x15
    AssocDevicesList: 0x75B4, 0x51C6, 0xC354, 0x8745, 0xEDCA, 0x3C28, 0x45D8, 0x0716, 0xFADF, 0xA859, 0x7EB9, 0xAC69, 0x1042, 0x9DCC, 0x745A, 0x25EB, 0x29FF, 0x3412, 0x9471, 0x4ECB, 0x31E4

    ************************************************************************************************************************************************************************

    If I would try to connect  a NEW node ( ZigBee Router or End Device ), will the device announce and other communication will happen ?

  • If association table is full, device cannot join and there won't be end node announcement.
  • Yes even I had noticed this Problem and cleared the association list using OSAL NV Delete option and found that Device announce is happening
    Now onwards,
    Suppose 20 nodes are connected and I am deleting the association list
    using osal_nv_delete ( ID=34, length = 170 )

    is there any other way to delete that List

    and all existing nodes which are connected with that particular Coordinator, what will happen to them,
    will it be able to communicate with the Coordinator like Before ?
  • I never clear association table in this way. I suppose the device need to do a rejoin to connect back to coordinator. You can use Ubiqua Packet Analyzer to check what will happen.
  • BY which way you have cleared the association Table?
  • I don't clear association table from my application. I always send leave request to device and wait response which would clear association table.
  • That's also a great way

    One more question is there that when we delete that Association List the length osal nv delete has to be given 170,
    however maximum device which can be connected to Coordinator is 21/20 that means maximum 42 bytes ( wrt network Address )

    so why we need to delete 170 length data?

    Is it like this particular ID ( 0x22) has been initialized with 170 length Or some thing else reason is there ?
  • association list is claimed as the following

    associated_devices_t AssociatedDevList[NWK_MAX_DEVICES];

    and associated_devices_t is defined as

    typedef struct
    {
    uint16 shortAddr; // Short address of associated device
    uint16 addrIdx; // Index from the address manager
    byte nodeRelation;
    byte devStatus; // bitmap of various status values
    byte assocCnt;
    byte age;
    linkInfo_t linkInfo;
    aging_end_device_t endDev;
    uint32 timeoutCounter;
    bool keepaliveRcv;
    } associated_devices_t;

    So, it's not only 2 bytes per device.
  • Hi,
    I have a problem where I need to clear association table item for device which no longer exists (broken, replaced). In that case leave request will never get response. Can you recommend what to do in that case?

    Thanks,
    Aleksandar
  • You can try to use API AssocRemove to remove item from association table.

  • Hi Aleksandar,

    You can implement your own interface to remove devices with the API exposed in AssocList.h and AddrMgr.h
    or you can try to remove the entry directly from the Nv as YiKai suggested with the existing MT API. Consider that you will need to parse the Nv as follow:

    (uint16 NumRecords), (associated_devices_t associated_device0), (associated_devices_t associated_device1), (associated_devices_t associated_device2), ... (associated_devices_t associated_deviceN)

    you will need to substract from NumRecords the number of entries that you want to remove and replace those entries with 0xFF's and write it back to ZCD_NV_DEVICE_LIST.
    After that you will need to reset the device in order to have the right effect (all other tables updated properly).

    Hope this helps!
  • YiKai and Luis thank you for an answer,

    However I'm worried about the following consequence: when proper leave message is executed all devices in network that operate with the missing one will update their tables (erase missing parent/child etc.). With the mechanism that you propose only the coordinator device will erase it and missing device will stay in tables of other devices.
    How to prevent this happening?

    Regards,
    Aleksandar
  • Child aging in Zigbee 3.0 handles such situation so I suggest you to use Z-Stack 3.0.
  • Thanks for info,

    however this issue hits us on router devices (not just end devices). Can you tell if Z-Stack 3.0 addresses this issue on router devices as well.

    Regards,
    Aleksandar
  • Yes, it supposes to address this issue on router.
  • Hi,

    this is big news for us. We will try to check it and hope it will work.

    Thanks
  • You are welcome.