Hello!
How can I read the value of u64ExtendedAddress of ZPS_tsAplZdpMgmtLqiRsp ? (ZigBee Pro, JN5168)
I do the next (fragments of code from Coordinator):
ZPS_tsAplZdpMgmtLqiRsp LqiRsp;
PRIVATE void vHandleStackEvent(ZPS_tsAfEvent sStackEvent)
{
if (ZPS_EVENT_NONE != sStackEvent.eType)
{
switch (sStackEvent.eType)
{
case ZPS_EVENT_APS_DATA_INDICATION:
{
if (sStackEvent.uEvent.sApsDataIndEvent.u16ClusterId==0x8031) // is input cluster "Mgmt_Lqi_req" (0x0031) ?
{
ZPS_tsAfZdpEvent sAfZdpEvent;
zps_bAplZdpUnpackResponse(&sStackEvent, &sAfZdpEvent);
LqiRsp = sAfZdpEvent.uZdpData.sMgmtLqiRsp;
}
}
break;
}
}
}
Once per 5 second I do code:
PRIVATE void vLqiRequest(void)
{
PDUM_thAPduInstance hAPduInst;
hAPduInst = PDUM_hAPduAllocateAPduInstance(apduZDP);
ZPS_tsAplZdpMgmtLqiReq sMgmtLqiReq;
ZPS_tuAddress uDstAddr;
uDstAddr.u16Addr = 0x00;
sMgmtLqiReq.u8StartIndex = 0;
ZPS_eAplZdpMgmtLqiRequest(hAPduInst, uDstAddr, FALSE, NULL, &sMgmtLqiReq);
}
And once per 1 second I read data:
ZPS_tsAplZdpNtListEntry *tl;
uint8 counT;
uint64 addrT;
countT = LqiRsp.u8NeighborTableEntries; // it works
tl = (LqiRsp.psNetworkTableList);
addrT = tl->u64ExtendedAddress; // it doesn't work
I tried in different ways to obtain u64ExtendedAddress, but in some cases the program aborted, or I got some address, but not real MAC
Hi, please try at // it doesn't work
sAfZdpEvent.uLists.asNtList[i].u64ExtendedAddress;
Thanks, it works :smileyhappy: