jgromes / RadioLib

Universal wireless communication library for embedded devices
https://jgromes.github.io/RadioLib/
MIT License
1.59k stars 395 forks source link

Module LLCC68 does not initialize #1329

Open jrhbcn opened 13 hours ago

jrhbcn commented 13 hours ago

I am using a EBYTE E220-900M22S module that comes with a LLCC68 chip connected to a ESP32 D1 mini. I am experimenting with the SX126x_Channel_Activity_Detection_Receive example. Using the LLCC86 module does not seem to work:

I have changed this part in the example:

LLCC68 radio = new Module(5, 32, 33, 25);
int state = radio.begin(BAND, SignalBandwidth, SpreadingFactor, CodingRate, SyncWord, TxPower, PreambleLength, 0, false);

And it gives the error:

[SX1262] Initializing ... RLB_DBG: 
RadioLib Info
Version:  "7.1.0.0"
Platform: "ESP32"
Compiled: "Nov 22 2024" "15:39:17"
RLB_DBG: SX126x not found! (1 of 10 tries) RADIOLIB_SX126X_REG_VERSION_STRING:
RLB_DBG: 00000320: 53 58 31 32 36 31 20 56 32 44 20 32 44 30 32 00  SX1261 V2D 2D02.
RLB_DBG: Expected string: LLCC68
...
RLB_DBG: SX126x not found! (10 of 10 tries) RADIOLIB_SX126X_REG_VERSION_STRING:
RLB_DBG: 00000320: 53 58 31 32 36 31 20 56 32 44 20 32 44 30 32 00  SX1261 V2D 2D02.
RLB_DBG: Expected string: LLCC68
RLB_DBG: No SX126x found!
failed, code -2

However, if I change to using the module SX1262 (LLCC68 is supposed to be pin compatible except that it does not support some configurations), then the module initializes, and it seems to receive messages from other LoRa modules:

[SX1262] Initializing ... RLB_DBG: 
RadioLib Info
Version:  "7.1.0.0"
Platform: "ESP32"
Compiled: "Nov 22 2024" "15:39:17"
RLB_DBG: Found SX126x: RADIOLIB_SX126X_REG_VERSION_STRING:
RLB_DBG: 00000320: 53 58 31 32 36 31 20 56 32 44 20 32 44 30 32 00  SX1261 V2D 2D02.
RLB_DBG: 
RLB_DBG: M      SX126x
success!
[SX1262] Starting to listen ... success!
success!
[SX1262] Data:          0xAAAA
[SX1262] RSSI:          -59.00 dBm
[SX1262] SNR:           9.00 dB
[SX1262] Frequency error:       -30079.69 Hz

What is happening? It seems the LLCC68 chip is actually returning the SX1261 string? Both SX1261 and SX1262 classes seem to work as intended (but not LLCC68)? Is this normal, or is it just a bogus chip?

jgromes commented 12 hours ago

There's been a couple other issues/discussions reporting this. The version string is stored in the module itself, so it looks like the module "thinks" it's an SX1261. So the question is whether there's an SX1261 inside that Ebyte module, or if the string is wrong and it really is LLCC68. I don't have that module, so I can't check this.

One way to figure this out by configuring a SF/BW configuration that the LLCC68 does not support (e.g. SF12, BW 125 kHz). If it is LLCC68, it should fail. If it is the more capable SX1261, it should have no issues and freely transmit. @jrhbcn if you could try taht, that would be great.

Since this came up a couple times already, I have added a note about this to LLCC68 examples, and the troubleshooting guide.