JN5168 ZigBee UnicastAckDataRequests are sent twice over the air

Discussion created by lpcware Employee on Jun 15, 2016
Latest reply on Nov 7, 2017 by Dheeraj Sawant
Content originally posted in LPCWare by Alessandro DR on Thu Oct 30 08:28:25 MST 2014
Hello, I'm posting here because I did not find any other NXP/Jennic support community, so feel free to move the post or point me to the right place.

My basic goal is to send custom data between a node and the Coordinator on JN5168 ZigBee MCUs.
I populate my hAPduInst (Handle of APDU instance to be sent) and send it using the following function

uint16 u16NwkAddress = 0x00;  /* coordinator */
ZPS_teStatus zpsStatus = ZPS_eAplAfUnicastAckDataReq(s_hAPduInst,
0xFDDD,/* custom cluster */
147,/* source endpoint */
147,/* dest endpoint */
u16NwkAddress,/* dest address */
0 /* default radius */,
NULL);/* we won't track the TSN */
if (ZPS_E_SUCCESS == zpsStatus)

My payloads are quite huge so I enabled fragmentation in both coordinator and nodes. When I send 4 payloads in a loop using ZPS_eAplAfUnicastAckDataReq I see that some are sent over the air twice, even if there are 4 "SUCCESS" on debug output.
How can I solve this bug? Any suggestion on how to investigate the situation is welcome.

I started from JN-AN-1135-Smart-Energy-HAN-Solutions project and customized it.

My IDE and libraries are:
JN-SW-4041 Jennic toolchain v1.1
JN-SW-4064 ZigBee Smart Energy 1.x v993

Thank you.