JN5168 - Nwk Address Request

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

JN5168 - Nwk Address Request

584 Views
jianalai
Contributor II

I have used the following function to request the short address but i cannot use the function too frequent at the same time and will get the error (stack dump). Meanings i have called the ZPS_eAplZdpNwkAddrRequest() frequently within a few seconds then my device will get an error and after that will reboot. Currently i have connected up to 60 nodes, 10 routers and 50 end devices.

ZPS_teStatus ZPS_eAplZdpNwkAddrRequest(
PDUM_thAPduInstance hAPduInst,
ZPS_tuAddress uDstAddr,
bool bExtAddr,
uint8 *pu8SeqNumber,
ZPS_tsAplZdpNwkAddrReq *psZdpNwkAddrReq);

Error.png

Example of nwk address request codes:

Request=TRUE;
memcpy(&MacAddress,&UARTRX_buffer[1],sizeof(uint64));

b_hAPduInst = PDUM_hAPduAllocateAPduInstance(apduMyData);
DBG_vPrintf(TRUE,"\nMAC = %016llx",MacAddress);

DstAddr.u16Addr = 0xFFFF;
psZdpNwkAddrReq.u64IeeeAddr=MacAddress;
psZdpNwkAddrReq.u8RequestType=0x00;
psZdpNwkAddrReq.u8StartIndex=0;
ZPS_eAplZdpNwkAddrRequest(
b_hAPduInst,
DstAddr,
FALSE,
&u8Seq,
&psZdpNwkAddrReq);

Example of nwk address response codes:

case ZPS_EVENT_APS_DATA_INDICATION:
{
DBG_vPrintf(TRACE_APP, "APP: vCheckStackEvent: ZPS_EVENT_AF_DATA_INDICATION\n");

/* Process incoming cluster messages ... */
DBG_vPrintf(TRACE_APP, " Profile :%x\r\n",sStackEvent.uEvent.sApsDataIndEvent.u16ProfileId);
DBG_vPrintf(TRACE_APP, " Cluster :%x\r\n",sStackEvent.uEvent.sApsDataIndEvent.u16ClusterId);
DBG_vPrintf(TRACE_APP, " EndPoint:%x\r\n",sStackEvent.uEvent.sApsDataIndEvent.u8DstEndpoint);
DBG_vPrintf(TRACE_APP, " ShortAddr:%x\r\n",sStackEvent.uEvent.sApsDataIndEvent.uDstAddress.u16Addr);
if(Request==TRUE)
{
ZPS_tsAfZdpEvent sAfZdpEvent;
zps_bAplZdpUnpackResponse(&sStackEvent,&sAfZdpEvent);
DBG_vPrintf(TRUE,"\nAddr = %x,",sAfZdpEvent.uZdpData.sNwkAddrRsp.u16NwkAddrRemoteDev);
Request=FALSE;
}

}
break;

0 Kudos
1 Reply

395 Views
mario_castaneda
NXP TechSupport
NXP TechSupport

Hi Jia Na Lai,

Are you asking Nwk Address Request for all the nodes constantly? 

Are you using this address, and why are you requesting many times? 

Remember that you memory is limited and you will need free the memory that you won't need.

Best Regards,

Mario

0 Kudos