CAD function

Can anyone please explain the difference between Radio.StartCad and Radio.SetRxDutyCycle?

I am clear with the SetRxDutyCycle function but not sure what is the difference between CAD and duty cycle? Don’t they both just detect preamble only?

Can you provide a little more context - device, software, hardware etc

I am using semtech SX1262 for LoRa (STM32WL) and using STM32CubeIDE.
I am a bit confused about CAD, should I use CAD or Duty Cycle on receiver end to listen to preamble sent by Transmitter?

Are you using LoRa to LoRa?

It is a significant task to write a LoRaWAN stack - which is what we cover here in relation to the TTN. A general LoRa question is off topic here I’m afraid.

Ok, thanks.

CAD does not detect preamble only, it detects LoRa modulation in general, i.e. even a payload will be detect by a CAD (which stands for Channel Activity Detection). It is particularly useful in listen-before-talk.

1 Like

So is it the right approach to think that CAD is a replacement for RxDutyCycle?

No the goal of each function are very different:

  • with RxDutyCyle, you check regularly if a packet arrives: if you get a preamble you continue the reception of the packet, otherwise you go to sleep, and will retry at a later time.
  • with CAD you just check is there any activity at the moment on the channel with a particular SF. You typically use this not to receive an incoming packet, but so that you can send a packet without collision with a packet currently being transmitted. Check the chapter 6.1.5 it explain this maybe better than me.

Sorry gents, but this is not the forum you are looking for.

Unless it is explicitly LoRaWAN on TTN, it’s not on topic.