Using a RAK3172 with Arduino and wanted to do CAD. Looking at the API documentation I didn’t see anything on it. However, looking at the source code it definitely shows there are some API hooks and they are available in the Arduino environment. Was wondering if there is any documentation on the CAD capabilities.
From my poking around…
api.lorawan.psend - has third parameter - bool Channel – Activity Detection enable parameter
api.lorawan.registerPSendCADCallback() - register the callback for CAD.
Seems like I just enable it on the send and register a callback which I am guessing will get called if the channel is in use, otherwise the packet will be sent. So in the callback I just queue the packet and attempt to resend some random time later (Maybe allow this is happen X number of times before giving up).