Problem with ZPS_tsAplZdpMgmtLqiRsp, ZigBee Pro on JN5168

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

Problem with ZPS_tsAplZdpMgmtLqiRsp, ZigBee Pro on JN5168

1,189 次查看
gibish
Contributor II

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

标记 (2)
0 项奖励
回复
2 回复数

960 次查看
limcb
Contributor IV

Hi, please try at // it doesn't work

sAfZdpEvent.uLists.asNtList[i].u64ExtendedAddress;

960 次查看
gibish
Contributor II

Thanks, it works :smileyhappy:

0 项奖励
回复