RAK11720 Channel Activity Detection

Hi there.

I’m currently working with the RAK11720 + RUI3 framework v4.1.1 with Lora P2P. For the project I’m working on, It is required to have CAD enable to avoid as best as possible packet collisions, so it is enabled on system startup.
I noticed that sometimes, code flow was stopping randomly, when they were attempting to send data and after researching what was going on, I found that api.lora.psend was getting stuck when CAD is found.

The exact location where send process is being stuck is here

So basically this while is waiting for either a CAD being performed without errors (Read from IRQ status) or CAD flag being cleared (From Sx126x driver). The first condition is well meet when no CAD is detected AND none of other IRQ flags are set (CadDetected included). The second condition is supposed to be cleared when Sx126x driver calls their interrupt handler, but I couldn’t see a way in the current implementation where this may happen during while execution.

So just for test, writing event processing explicitly inside while execution to give it a chance to process the Sx126x interrupt handler, solve the issue I have.

I wonder if this is a RUI3 bug or I’m missing/messing something with my code that is generating the main event queue not being called.

Regards

Thanks for reporting this @EdisonAgudelo
I am using CAD as well, but not on the RAK11720. I will forward this to our R&D team for investigation.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.