It’s pretty easy with current MCCI LMIC code, you just have to enable the function in
#define LMIC_USE_INTERRUPTS 1
The original LMIC arduino library does - as far as i see - not and did never include this function.
Using hardware interrupts instead of polling has in my opinion more advantages than disadvantages: Is frees up CPU from polling and thus allows a more “sharp” timing for the time critical opening of RX-windows. This saves power and thus is relevant for all real low power applications. While power savings maybe not significant with Class A devices, it will with Classes B / C.
Another advantage, also for Class A, might be that in busy multithreaded applications (like paxcounter) timing by hardware works better than by software, because by software will cause more jitter, and this could result to missed RX packets. That’s the reason why i decided to switch paxcounter code to use interrupts.
Only disadvantage in my opinion is, that the used GPIO pins for LORA_IRQ (= DIO0) , and LORA_DIO1 must be connected to interrupt capable pins of CPU. This might be an issue on hardware with small CPU footprint, but on a ESP32 system you have lots of suitable GPIOs, and as far as i see it works with all Heltec, TTGO, Pycom etc. development boards. So why not using it?
There was an issue, that broke the interrupt function working in MCCI LMiC on ESP32, but recently i spotted the bug in the HAL code, and made a PR for it. This was merged in MCCI LMIC master last week and since then i have some test clients up and running on interrupts, so far working smooth and i don’t see any RX packet loss any more.