Tried BSP 3.3.3 - no joy - output below - all connected through b2b - nothing other than the esp and lora/antenna with psram enabled for the camera. No its not the pins - definitions are correct as far as I can see…please have a look:
=== Updated RadioLib Test for Wio-SX1262 on XIAO ESP32S3 ===
Pins: NSS=41, DIO1=39, RST=42, BUSY=40, SCK=7, MOSI=9, MISO=8, ANT_SW=38
WiFi and Bluetooth disabled
Antenna switch enabled (GPIO38 HIGH)
Module hardware reset complete
SPI initialized at 4 MHz
Setting TCXO voltage to 1.6 V…
Initializing LoRa…
LoRa init FAILED with code: -2
Common codes:
-2 = No module detected (B2B contact / hardware)
-5 = TCXO calibration failed (try 1.8 V)
-3 = SPI communication failure
-1 = General error
Retrying with TCXO 1.8 V…
Retry result: -2
=== Test Complete ===
code below:
#include <RadioLib.h>
#include <esp_wifi.h> // Required for esp_wifi_stop()
#include <esp_bt.h> // Required for esp_bt_controller_disable()
// B2B pin mapping for Wio-SX1262 on XIAO ESP32S3
#define NSS 41 // SPI Chip Select (GPIO41)
#define SCK 7 // SPI Clock (GPIO7)
#define MOSI 9 // SPI MOSI (GPIO9)
#define MISO 8 // SPI MISO (GPIO8)
#define RST 42 // LoRa Reset (GPIO42)
#define BUSY 40 // LoRa BUSY (GPIO40)
#define DIO1 39 // LoRa IRQ (DIO1 - GPIO39)
#define ANT_SW 38 // Antenna Switch (GPIO38)
// SX1262 instance
SX1262 radio = new Module(NSS, DIO1, RST, BUSY);
void setup() {
Serial.begin(115200);
delay(2000); // Give serial time to connect
Serial.println(“=== Updated RadioLib Test for Wio-SX1262 on XIAO ESP32S3 ===”);
Serial.println(“Pins: NSS=41, DIO1=39, RST=42, BUSY=40, SCK=7, MOSI=9, MISO=8, ANT_SW=38”);
// Disable WiFi & Bluetooth to free resources (optional but recommended)
esp_wifi_stop();
esp_bt_controller_disable();
Serial.println(“WiFi and Bluetooth disabled”);
// Antenna switch - set HIGH to enable RF path (important for SX1262)
pinMode(ANT_SW, OUTPUT);
digitalWrite(ANT_SW, HIGH);
Serial.println(“Antenna switch enabled (GPIO38 HIGH)”);
// Hardware reset the module (important for reliable init)
pinMode(RST, OUTPUT);
digitalWrite(RST, LOW); // Reset active
delay(50); // Hold longer than minimum
digitalWrite(RST, HIGH); // Release
delay(200); // Wait for boot + TCXO startup
Serial.println(“Module hardware reset complete”);
// Explicit SPI init (helps on S3 + B2B setups)
SPI.begin(SCK, MISO, MOSI, NSS);
SPI.setFrequency(4000000); // 4 MHz - safe and reliable
Serial.println(“SPI initialized at 4 MHz”);
// Set TCXO voltage - critical for Wio-SX1262 (try 1.6 first, then 1.8 if fails)
Serial.println(“Setting TCXO voltage to 1.6 V…”);
radio.setTCXO(1.6);
delay(200);
// Initialize LoRa
Serial.println(“Initializing LoRa…”);
int state = radio.begin(915.0, 125.0, 11, 5, RADIOLIB_SX126X_SYNC_WORD_PRIVATE, 20, 200, 0);
if (state == RADIOLIB_ERR_NONE) {
Serial.println("SUCCESS! LoRa initialized fully.");
Serial.println("SX1262 chip detected and ready at 915 MHz, SF11, BW125, CR 4/5, Tx 20 dBm");
} else {
Serial.print("LoRa init FAILED with code: ");
Serial.println(state);
Serial.println("Common codes:");
Serial.println(" -2 = No module detected (B2B contact / hardware)");
Serial.println(" -5 = TCXO calibration failed (try 1.8 V)");
Serial.println(" -3 = SPI communication failure");
Serial.println(" -1 = General error");
// Automatic retry with TCXO 1.8 V
Serial.println("\\nRetrying with TCXO 1.8 V...");
radio.setTCXO(1.8);
delay(200);
state = radio.begin(915.0, 125.0, 11, 5, RADIOLIB_SX126X_SYNC_WORD_PRIVATE, 20, 200, 0);
Serial.print("Retry result: ");
Serial.println(state);
if (state == RADIOLIB_ERR_NONE) {
Serial.println("SUCCESS on retry! Use TCXO 1.8 V in main code.");
}
}
Serial.println(“\n=== Test Complete ===”);
}
void loop() {
// Idle - test runs once on boot
delay(10000);
}