Hi Sir,
Thanks for the response, I have changed the parameter Maximum Number of Transmitted Simultaneous Fragmented Messages to a non-zero value on both the coordinator side and router side(Rx parameter), again tried to send larger data with the help of function
void Send_Data(uint8_t *data, uint8_t len)
{
int result = storeHexValuesInArray(data,data_packet,sizeof(data_packet) / sizeof(data_packet[0]));
uint8 pSeqNum;
PDUM_thAPduInstance hAPduInst = PDUM_hAPduAllocateAPduInstance(apduZDP);
uint16 u16Offset = 0;
uint16 i;
PDUM_eAPduInstanceSetPayloadSize(hAPduInst, result*sizeof(int));
DBG_vPrintf(TRUE, "Result %d \n", result);
for (i = 0; i < result ; i++) {
uint32 singleByte = (uint32)data_packet[i];
PDUM_u16APduInstanceWriteNBO(hAPduInst, u16Offset + i * sizeof(int), "w",singleByte);
DBG_vPrintf(TRUE, "%02x ", singleByte);
}
DBG_vPrintf(TRUE, "Size : %d\n Sending : \n", PDUM_u16APduInstanceGetPayloadSize(hAPduInst));
if (hAPduInst == PDUM_INVALID_HANDLE) {
DBG_vPrintf(TRUE, "PDUM_INVALID_HANDLE\n");
return;
} else {
ZPS_teStatus eStatus;
ZPS_teAplAfSecurityMode eSecurityMode = (ZPS_E_APL_AF_SECURE_NWK);
eStatus = ZPS_eAplAfUnicastAckDataReq(hAPduInst,
0x0013,
0,
0,
u16add,
eSecurityMode,
0,
&pSeqNum);
if (eStatus != ZPS_E_SUCCESS)
DBG_vPrintf(TRUE, "ZPS_E_state %x\n", eStatus);
else if (eStatus == ZPS_E_SUCCESS)
DBG_vPrintf(TRUE, "Send success\n");
PDUM_eAPduFreeAPduInstance(hAPduInst);
}
}
i am putting around 150 bytes of data into APDU but only receiving around 80 bytes, I am receiving data through this function
void vDataReceive(PDUM_thAPduInstance hAPduInst) {
int add16 = ZPS_u16NwkNibGetNwkAddr(ZPS_pvAplZdoGetNwkHandle());
uint16 u16Offset = 0;
uint16 payloadSize = PDUM_u16APduInstanceGetPayloadSize(hAPduInst);
DBG_vPrintf(TRUE, "Payloadsize = %d\n", payloadSize);
for(int i = 0; i < payloadSize/4; i++)
PDUM_u16APduInstanceReadNBO(hAPduInst, u16Offset + i * sizeof(int),"w", &received[i]);
PDUM_eAPduFreeAPduInstance(hAPduInst);
shell_write("Data Received for this Node\n");
for(int i = 0; i<payloadSize/4; i++)
DBG_vPrintf(TRUE, "%02x ",received[i]);
}
Please let me know where i am going wrong or what changes i can implement to send data about 1024 bytes.