Problem with ZPS_tsAplZdpMgmtLqiRsp, ZigBee Pro on JN5168

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Problem with ZPS_tsAplZdpMgmtLqiRsp, ZigBee Pro on JN5168

883 Views
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

Tags (2)
0 Kudos
2 Replies

654 Views
limcb
Contributor IV

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

sAfZdpEvent.uLists.asNtList[i].u64ExtendedAddress;

654 Views
gibish
Contributor II

Thanks, it works :smileyhappy:

0 Kudos