Determining if an ACK was needed would be your next problem. Peeking into the LMIC code suggests that
LMIC.OP_POLL
might tell you if an ACK is pending.
OP_POLL = 0x0010, // send empty UP frame to ACK confirmed DN/fetch more DN data
But if sleeping until the next uplink is due does not give you the additional automatic ACK, then that’s even better of course. Are you saying that the code you posted last indeed achieves that, so no empty ACK is transmitted?
I don’t know if sleeping in the event handler causes any problem; it feels like it’s preventing LMIC from doing proper housekeeping. As for sleeping, beware for rollover of the clock: Lmic plus rfm95w staying awake for long periods - #9 by tomtor.
See also Serial.flush()
.
I’d ask that in The hard RAK831 cafe part 3. Also, please see How do I format my forum post? [HowTo]