jgromes / RadioLib

Universal wireless communication library for embedded devices
https://jgromes.github.io/RadioLib/
MIT License
1.49k stars 376 forks source link

Non Blocking CAD (Channel Activity Detection) - RFM95 #396

Closed HarrisonPace closed 2 years ago

HarrisonPace commented 2 years ago

Is your feature request related to a problem? Please describe.

I have been developing a LoRa mesh network program using a RFM95 module (clone) [HPD13A], included with the TTGO LoRa32 v2.1 Development Board. One of the challenges I have faced in implementing the API is the lack of an interrupt based CAD (Channel Activity Detection) feature.

Describe the solution you'd like

I would like to see a similar implementation to the transmit and receive examples where a callback function is triggered upon completion of the detection.

Describe alternatives you've considered

I have used alternative libraries when using the SX1262 platform (i.e. https://github.com/beegee-tokyo/SX126x-Arduino), which provides a callback function for CAD. Although this library doesn't have the flexibility of Radios.

Additional context N/A

jgromes commented 2 years ago

Turns out this was quite easy to implement. I also added this feature for SX126x, there's examples for both.

HarrisonPace commented 2 years ago

Thanks for your prompt response!