There is a problem when sending and receiving data.

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

There is a problem when sending and receiving data.

1,145 Views
2433841893
Contributor I

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?

Labels (1)
0 Kudos
Reply
3 Replies

922 Views
2433841893
Contributor I

can you tell me how to send a array?

What is the format of the send array?

0 Kudos
Reply

922 Views
danielchen
NXP TechSupport
NXP TechSupport

Hi

I guess you are using Wireless stack, I would suggest you post it in NXP Wireless connectivity space.

Please also check below link for how to passing arrays as arguments to a function.

How to pass arrays to a function in C Programming? 

Regards

Daniel

0 Kudos
Reply

922 Views
2433841893
Contributor I

Sorry, it has been solved, it is my fault.

0 Kudos
Reply