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: ZCL General Location

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

Dear all,

In 07-5123-06-zigbee-cluster-library-specification, 3.13.2.4.5 RSSI Ping Command. Since the zdoIncomingMsg_t structure don’t have the field of RSSI value, how can the pfnLocationRsp function knows the value of RSSI?




// codes inside zclGeneral_ProcessInLocationClient()
case COMMAND_LOCATION_RSSI_PING: if ( pCBs->pfnLocationRsp ) { rsp.un.locationType = *pData; rsp.srcAddr = &(pInMsg->msg->srcAddr); rsp.cmdID = pInMsg->hdr.commandID; // Notify the Application pCBs->pfnLocationRsp( &rsp ); } break; //... other codes
typedef struct { osal_event_hdr_t hdr; zAddrType_t srcAddr; uint8 wasBroadcast; cId_t clusterID; uint8 SecurityUse; uint8 TransSeq; uint8 asduLen; uint16 macDestAddr; uint8 *asdu; uint16 macSrcAddr; } zdoIncomingMsg_t;

BR,

Barry

  • Hi Barry,

    The stack already calculates the RSSI average of neighbor devices, so you do not need that parameter in that callback, instead you can retrieve the RSSI average value from the neighbor table or association table, just look at the linkInfo->rxLqi that is in the entry associated to the device you are being asked for.

    Hope this helps!
  • Dear Luis,

    Thank you for your useful information. I did find a few places involving “linkInfo->rxLqi” inside Z-Stack. They are all inside ZDApp.c and ZDObject.c. These are relating to the following functions and structure:

     

    ZDO_ProcessMgmtLqiReq( zdoIncomingMsg_t *inMsg )

    ZDO_JoinConfirmCB( uint16 PanId, ZStatus_t Status )

     

    associated_devices_t

     

    However, inside Z-Stack API.pdf or other docs that I found from TI website, there is no description on the usage of those functions/structures. Would you please tell more specifically how can I access the neighbor table or association table inside the application framework layer? Thank you very much.

     

    BR,

    Barry

  • Hi Barry,

    You can look at this structures directly by including the header files assocList.h and nwk_util.h

    AssociatedDevList[]

    neighborTable[]

    for the association table there is this searching function AssocGetWithShort and I have not seen one that returns the neighbor, but you can search for it in the array.

    Hope this helps!