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.

CC2652P: how to retrieve all the devices associated with a coordinator or router?

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

Hi,

I assume both coordinator and router devices keep a list of their child devices in their association table, and we can access that list through the global variable AssociatedDeviceList referenced here:

// assoc_list.h

// Node Relations
#define PARENT              0
#define CHILD_RFD           1
#define CHILD_RFD_RX_IDLE   2
#define CHILD_FFD           3
#define CHILD_FFD_RX_IDLE   4
#define NEIGHBOR            5
#define OTHER               6
#define NOTUSED             0xFF

typedef struct
{
  uint16_t shortAddr;                 // Short address of associated device
  uint16_t 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_t timeoutCounter;
  bool keepaliveRcv;
  uint8_t ctrl;
} associated_devices_t;

/*********************************************************************
 * GLOBAL VARIABLES
 */
//extern byte _numAssocDev;
extern associated_devices_t AssociatedDevList[];

My question is about nodeRelation. Does CHIL_RFD and CHILD_FFD mean reduced function device and full function device? How are full/reduction function devices defined? Router as full function devices and sleep end device as reduced function devices? There is also the NEIGHBOR bit. Does that indicate the device is a device that belongs to the same parent but not a child?

Please advise,

Thanks.

ZL

  • Hi LZ,

    Routers joining through the local device are classified as CHILD_FFD_RX_IDLE.  Sleepy ZED are CHILD_RFD whereas non-sleepy are CHILD_RFD_RX_IDLE.  You can check the neighbor table if you are interested in viable routers which are within reliable radio range.  See AssocCount/AssocMakeList APIs for more information.

    Regards,
    Ryan

  • Hi Ryan,

    To clarify: FFD = router, RFD = ZED, and RX_IDLE indicates whether device sleeps. I was under the impression that all routers are non-sleepy. Is CHILD_FFD just defined for the sake of completeness?

    I also noticed CHILD and NEIGHBOR are included in relations, does that mean both parent and neighbor devices are also included in AssociatedDeviceList array?

    Thanks,

    ZL

  • I was under the impression that all routers are non-sleepy. Is CHILD_FFD just defined for the sake of completeness?

    Yes

    I also noticed CHILD and NEIGHBOR are included in relations, does that mean both parent and neighbor devices are also included in AssociatedDeviceList array?

    No

    CHILD_FFD and NEIGHBOR are not used in the Zigbee implementation.  PARENT is used on the ZED for the only device it is associated with.

    Regards,
    Ryan

  • Hi Ryan,

    Thanks for the clarification. I will assume PARENT is also included in routers AssociatedDeviceList array. With that, I think I have all the information we need to port our TI-15.4 stack based application to Z-Stack, and shall be able to start field test in the coming weeks.

    With your prompt and on-point answers, the porting process took a lot shorter than I anticipated.

    Happy holidays,

    ZL

  • Glad I could help ZL, please know that from today until January 2nd I will be out of the office.  I look forward to working with you in 2024.

    Regards,
    Ryan