network ACK failure in API response

while trying to communicate with a router node in api mode the controller returns the status with 0x21 corresponding to ntwrk ack failure…can any one shed some light on this…?
thanks in advance

What this means is that one of the ACKs within the Zigbee protocol failed to indicate that the packet was received. In this case, it is the Network ACK that failed. unless you are using Application level Acks and have received the corresponding ACK, I would suggest re-transmitting the packet.

What if there is no packet to re-transmit?

I’m receiving 0x21 = Network ACK Failure when I leave the network (by changing the EPID). But I’m not sending anything before changing the EPID so I’m not sure why I’m receiving this.

If you are using API mode, then you had to had provided a frame for it to transmit. It is that packet that you would need to re-transmit.