nopnop2002 / esp-idf-sx126x

SX1262/SX1268/LLCC68 Low Power Long Range Transceiver driver for esp-idf
MIT License
79 stars 18 forks source link

Hello,Does the demo support CAD mode? Does LLCC68 support? #10

Closed niubbbbbbbb closed 1 year ago

nopnop2002 commented 1 year ago

What is CAD mode?

LLCC68 is used for Ra-01SC.
LLCC68 is compatible with SX126X.
However, there are the following restrictions:

niubbbbbbbb commented 1 year ago

CAD is Channel Activity Detection

nopnop2002 commented 1 year ago

This library does not support CAD.

niubbbbbbbb commented 1 year ago

Do you have support CAD's library?

niubbbbbbbb commented 1 year ago

Can CAD functions be added to this library? Is there any problem in adding CAD functions to the library

nopnop2002 commented 1 year ago

there is no problem in adding CAD functions to the library.

niubbbbbbbb commented 1 year ago

thanks

nopnop2002 commented 1 year ago

I added SetCadParams() and SetCad().

You can specify the following constants in SetCadParams().

//SX126X_CMD_SET_CAD_PARAMS
#define SX126X_CAD_ON_1_SYMB                          0x00        //  7     0     number of symbols used for CAD: 1
#define SX126X_CAD_ON_2_SYMB                          0x01        //  7     0                                     2
#define SX126X_CAD_ON_4_SYMB                          0x02        //  7     0                                     4
#define SX126X_CAD_ON_8_SYMB                          0x03        //  7     0                                     8
#define SX126X_CAD_ON_16_SYMB                         0x04        //  7     0                                     16
#define SX126X_CAD_GOTO_STDBY                         0x00        //  7     0     after CAD is done, always go to STDBY_RC mode
#define SX126X_CAD_GOTO_RX                            0x01        //  7     0     after CAD is done, go to Rx mode if activity is detected

At the end of the search period, the device triggers the IRQ CADdone if it has been enabled. If a valid signal has been detected it also generates the IRQ CadDetected. These can be read using GetIrqStatus().

niubbbbbbbb commented 1 year ago

That means you can use the CAD function directly, right

nopnop2002 commented 1 year ago

yes. you are right. If you use the CAD function, you need to read the datasheet.

niubbbbbbbb commented 1 year ago

Thank you so much, brother