Two suggestions:
1. If you want to read more about the sequence numbers, read up on how TCP does it.
2. How about a receive queue to help with missed packets.
Also, this is part of the RFM69 code....why wouldn't this work?
// should be polled immediately after sending a packet with ACK request
bool RFM69::ACKReceived(uint8_t fromNodeID) {
if (receiveDone())
return (SENDERID == fromNodeID || fromNodeID == RF69_BROADCAST_ADDR) && ACK_RECEIVED;
return false;
}
I'll have to check some of my code but I'm pretty sure I have used this code chunk for this very reason.
I checked....this is how I used the ACKReceived() function in some code:
radio.send(NODEID, &xmitData, sizeof(xmitData), true);
sentTime = millis();
while (millis() - sentTime < 2500)
{
if (radio.ACKReceived(NODEID))
---- act accordingly
}