One thing I forgot to mention - I also added a change to make millis() store into unsigned longs, which fixes any issues with the 57 day millis() rollover according to posts I've seen on arduino.cc.
These fixes have been crash free for more than 48 hours. I am running about 8 nodes, that send ~5-15 packets every 10 seconds with gateway acknowledgment. Happy to share my codebase for the node/gateway logic if you want to test my exact setup.
Glad to hear that you are running crash fee! I'm also for 36h right now.
I was thinking to modify millis also, nice that you did it.
Some comments about other changes:
- I like the place where you added "interruptHandler();"
- DATALEN=0 really can be moved out
- good to see RF69_TX_LIMIT_GUARD_MS implemented
- "PAYLOADLEN < 3" can be included in previous IF statement without duplicating all this logic twice
- in sendACK "avoid RX deadlocks" is better to move one line before sendFrame because logic in receiveDone enables interrupts and can trigger RX. And ACK is send anyway if the timeout is triggered and network is still busy (as there are those weaknesses in my opinion I think that crash free is achieved with adding RF69_TX_LIMIT_GUARD_MS not fixing sendACK)
Overall I'm so happy that I wasn't alone with that problem and we have good team work to fix it!