AT_BUSY_ERROR after AT+PSEND

RUI3 4.0.6 RAK3172
I’m getting an AT_BUSY_ERROR after a AT+PSEND=
What could cause this error?
Here is the sequence.
+EVT:RXP2P:-12:13:…
+2.2ms
AT+PRECV=0
+0.5ms
OK
+82ms
AT+PSEND=…
+34ms
AT_BUSY_ERROR

Now I do have another radio transmitting at the same settings. Could it be receiving a packet from that radio just before it closes RX mode?
I’m only waiting 2.2ms before closing RX mode.
Knowing how the radio works there is a delay of before +EVT message is received. Would another packet being received cause this AT_BUSY_ERROR just before the RX mode was closed, in that gap?
How to prevent this? Can the radio be flushed before the AT+PSEND?

Thank you.

Guess you have CAD avtivated. Then the message means the packet was not send because CAD couldn’t find a free time on the frequency to send the packet.
(as discussed in our other thread)

Hi Bernd,

You can see here that AT+PSEND= is tried three times before success (OK). It’s 32 ms + AT+PSEND= delay, for a total 46 ms per try, or 92 ms total.
So it works pretty good. I have a while loop and will try until success. In my situation packets are typically a few hundred ms, not likely to take more than few seconds before success.

HI Frank,

Thanks for that test. I still think the CAD functionality can be improved. I hope we can get something even better in the next release (or a staging version in between)

Bernd,

In this example 7 PSEND tries before success. RAK3172 uses only the RX current, which is low.

Bernd,

According a paper by Semtech about the CAD (AN1200.125) it should take [tsymbol + )32/BW)].
i measure 32ms. Tsymbol = 2.048ms, 32/125000 = 0.25ms. Why then does CAD take 32ms?

I do not have an immediate answer. I will ask our R&D team.
The RUI3 sources are open, you can have a look by yourself how CAD works in RUI3 and how the timing is setup.

Can you share that document. I can’t find an AN1200.125 document.
About CAD I am using SX126x CAD Performance Evaluation AN1200.48 as a reference.

@frank_r

Can you give the attached test firmware a run?
This test firmware is setting up the CAD parameters differently.

It might be too tough settings, but I would appreciate if you can give it a try.

build.zip (252.8 KB)

Hi Bernd,

I have attached the document.
My feeling is all the internal handling of the CAD and the routine may look at the CAD a few times
to increase the probability of detected a LoRa carrier results in the the 32ms delay.

I my case after monitoring the scope for a a few days, I’ve seen a few occasions where are there are several attempts before the the PSEND succeeds. Every attempts shifts the sequence by 32ms, thus changing the sequence by 120ms, which is the approximate air time of the second LoRa broadcast. I have 2 nodes running, one at 5s and the other at 30s.
Thank you.

(Attachment cad-ensuring-lora-packets.pdf is missing)

Hi @frank_r
Can you send the document as direct message to me. It seems the forum didn’t attach it to your message.

I checked the documents I have, and 32 ms is definitely too long. If you have time, can you try the custom AT command firmware I attached in my last message?

(Attachment cad-ensuring-lora-packets.pdf is missing)

Hello Bernd,

Tried sending it to you directly, pdf are not accepted as attachment.
You can download the document here, from the Samtech website
https://www.semtech.com/uploads/technology/LoRa/cad-ensuring-lora-packets.pdf

Frank.