Hi.
How can I send a LQI request to the coordinator?
This code does not request anything. No response is received.
// dstAddr = 0x0000, startIndex = 0
void send_mgmt_lqi_req(u16 dstAddr, u8 startIndex)
{
u8 buf[8];
buf[0] = startIndex; // StartIndex
printf("Sent Mgmt_LQI_req to 0x%04x with startIndex = %d\r\n", dstAddr, startIndex);
if(zb_isDeviceJoinedNwk()) {
epInfo_t dstEpInfo;
TL_SETSTRUCTCONTENT(dstEpInfo, 0);
dstEpInfo.profileId = ZDO_PROFILE_ID; //HA_PROFILE_ID;
dstEpInfo.dstAddrMode = APS_SHORT_DSTADDR_WITHEP;
dstEpInfo.dstEp = APP_ENDPOINT1;
dstEpInfo.dstAddr.shortAddr = dstAddr;
uint8_t apsCnt = 0;
u8 ret = af_dataSend(APP_ENDPOINT1, &dstEpInfo, MGMT_LQI_REQ_CLID, 1, buf, &apsCnt);
printf("af_dataSend ret: %d\r\n", ret);
}
}
How to do this correctly?
Thanks.
|