AnsweredAssumed Answered

There is a problem when sending and receiving data.

Question asked by Gao Lei on Sep 14, 2018
Latest reply on Sep 17, 2018 by Daniel Chen

send: 

hAPduInst = PDUM_hAPduAllocateAPduInstance(apduZDP);
if (hAPduInst == PDUM_INVALID_HANDLE)
{
DBG_vPrintf(TRUE, "hAPduInst:===PDUM_INVALID_HANDLE\r\n");
}
else
{
offSet = PDUM_u16APduInstanceWriteNBO(hAPduInst, offSet, "b", 9);
eStat = ZPS_eAplAfBroadcastDataReq(hAPduInst, 0x0013, 0x01, 0x01,
(ZPS_teAplAfBroadcastMode)ZPS_E_BROADCAST_ALL, ZPS_E_APL_AF_UNSECURE, 0, NULL);
DBG_vPrintf(TRUE, "offSet:===%d\r\n", offSet);
DBG_vPrintf(TRUE, "eStat:===%d\r\n", eStat);
}
PDUM_eAPduFreeAPduInstance(hAPduInst);

 

receive:

if (sStackEvent.uEvent.sApsDataIndEvent.hAPduInst != PDUM_INVALID_HANDLE)
{
readByte = PDUM_u16APduInstanceReadNBO(sStackEvent.uEvent.sApsDataIndEvent.hAPduInst, 0, "b", &data);
DBG_vPrintf(TRUE, "readByte:===%d\r\n", readByte);
DBG_vPrintf(TRUE, "data:===%d\r\n", data);
}

 

result:

the hAPduInst  Instance is NULL and cannot read data correctly

 

Is it related to CLUSTER ID?

Outcomes