SeeedStudio ESP32S3 Sense

so are you saying there is simply no way to make this work using the b2b connector the lora is built with ?

I’m having similar issues and ended up dropping the project for a while. What is the actual LORA module you are using? Is the camera the standard (supplied with XIAO camera kit) or do you have the higher res version?

seeed wio-sx1262 plugged into an esp32s3 sense - male presoldered header on esp - female socket and headers on the lora…fails on init with code -2 in every possible configuration I know of. Using the standard sense camera- on its own the sense tests fine…but it will not see the lora not matter what I try.

Thanks - I’ll try code posted as ā€œSolutionā€ above to see what happens.

didnt work for me - my esp32s3 sense is on top of the lora - I still get code -2 - wont initialize

Hi there,

So we may need to dig a little deeper into your dev environment, what radio live version are you using and what board support package are you using The examples use the latest 3.3.5.

And the latest radio library.

Do you have it like I pictured.?

HTH
PJ mobile

Post a picture please

I have tried 2.0.17 and 3.3.3 and 3.3.5 on bsp

- none worked - radiolib is 7.5 - arduino ide 2.3.7 - references all over that this is how it should be stacked - ā€œThe Wio-SX1262 for XIAO is designed as the base board with a female B2B connector. The XIAO ESP32S3 (or Sense) mounts on top, with its male B2B pads plugging into the female socket on the Wio-SX1262.ā€ - ā€œā€œStack the XIAO ESP32S3 on top of the Wio-SX1262 LoRa module via the B2B connector.ā€ - ā€œā€œMake sure the XIAO is on top and the LoRa board is bottom — reverse stacking causes no detection or -2 error.ā€ I have confirmed with a multimeter that the 3v3 rail is active and powered by checking the base of the lora module 3v3 pin. The wiki under hardware overview for the Wio specfically states this is the stacking order with the esp32s3 sense.

BTW - I have tried 3 different sense boards with 3 different wio - all yielded code -2. This is from a batch of ten each that I ordered. I do have psram enabled in compile for the camera.

Just tried manually jumpering around the b2b with dupont wires - no dice - still code -2. Bad batch of lora boards? All three failing? I’ve never had that poor quality control from any other vendor if thats the case.

Hi there,

OK, So I see…now
Was out running an errand before.
for this , just forget about the B2B , it has ZERO to do with the LORA board at this point.
Why no Antenna on the S3?
can you add it, and remove the B2B camera board, for the test please.

Are you able to post the first 3 lines of the compiler output and perhaps the last 20 before it uploads.
"Uploading stub flasher…
"Running stub flasher…

FQBN: esp32:esp32:XIAO_ESP32S3
Using board 'XIAO_ESP32S3' from platform in folder: C:\Users\Dude\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.3.5
Using core 'esp32' from platform in folder: C:\Users\Dude\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.3.5
Creating ESP32S3 image...
Merged 2 ELF sections.
Successfully created ESP32S3 image.
"C:\\Users\\Dude\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\3.3.5\\tools\\gen_esp32part.exe" -q "C:\\Users\\Dude\\AppData\\Local\\arduino\\sketches\\87A5DC82690E64F6CF041D671EF2E412/partitions.csv" "C:\\Users\\Dude\\AppData\\Local\\arduino\\sketches\\87A5DC82690E64F6CF041D671EF2E412/sketch_jan22a__Lora_S3.ino.partitions.bin"
cmd /c if exist "C:\\Users\\Dude\\AppData\\Local\\arduino\\sketches\\87A5DC82690E64F6CF041D671EF2E412\\libraries\\Insights" "C:\\Users\\Dude\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\3.3.5\\tools\\gen_insights_package.exe" "C:\\Users\\Dude\\AppData\\Local\\arduino\\sketches\\87A5DC82690E64F6CF041D671EF2E412" sketch_jan22a__Lora_S3.ino "D:\\Arduino_projects\\sketch_jan22a__Lora_S3"
cmd /c if exist "C:\\Users\\Dude\\AppData\\Local\\arduino\\sketches\\87A5DC82690E64F6CF041D671EF2E412\\libraries\\ESP_SR" if exist "C:\\Users\\Dude\\AppData\\Local\\Arduino15\\packages\\esp32\\tools\\esp32-arduino-libs\\idf-release_v5.5-9bb7aa84-v2\\esp32s3\\esp_sr\\srmodels.bin" COPY /y "C:\\Users\\Dude\\AppData\\Local\\Arduino15\\packages\\esp32\\tools\\esp32-arduino-libs\\idf-release_v5.5-9bb7aa84-v2\\esp32s3\\esp_sr\\srmodels.bin" "C:\\Users\\Dude\\AppData\\Local\\arduino\\sketches\\87A5DC82690E64F6CF041D671EF2E412\\srmodels.bin"
"C:\\Users\\Dude\\AppData\\Local\\Arduino15\\packages\\esp32\\tools\\esptool_py\\5.1.0/esptool.exe" --chip esp32s3 merge-bin -o "C:\\Users\\Dude\\AppData\\Local\\arduino\\sketches\\87A5DC82690E64F6CF041D671EF2E412/sketch_jan22a__Lora_S3.ino.merged.bin" --pad-to-size 8MB --flash-mode keep --flash-freq keep --flash-size keep 0x0 "C:\\Users\\Dude\\AppData\\Local\\arduino\\sketches\\87A5DC82690E64F6CF041D671EF2E412/sketch_jan22a__Lora_S3.ino.bootloader.bin" 0x8000 "C:\\Users\\Dude\\AppData\\Local\\arduino\\sketches\\87A5DC82690E64F6CF041D671EF2E412/sketch_jan22a__Lora_S3.ino.partitions.bin" 0xe000 "C:\\Users\\Dude\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\3.3.5/tools/partitions/boot_app0.bin" 0x10000 "C:\\Users\\Dude\\AppData\\Local\\arduino\\sketches\\87A5DC82690E64F6CF041D671EF2E412/sketch_jan22a__Lora_S3.ino.bin"
esptool v5.1.0
Wrote 0x800000 bytes to file 'C:\Users\Dude\AppData\Local\arduino\sketches\87A5DC82690E64F6CF041D671EF2E412/sketch_jan22a__Lora_S3.ino.merged.bin', ready to flash to offset 0x0.
cmd /c echo --flash-mode dio --flash-freq 80m --flash-size 8MB > "C:\\Users\\Dude\\AppData\\Local\\arduino\\sketches\\87A5DC82690E64F6CF041D671EF2E412\\flash_args" && echo 0x0 sketch_jan22a__Lora_S3.ino.bootloader.bin >> "C:\\Users\\Dude\\AppData\\Local\\arduino\\sketches\\87A5DC82690E64F6CF041D671EF2E412\\flash_args" && echo 0x8000 sketch_jan22a__Lora_S3.ino.partitions.bin >> "C:\\Users\\Dude\\AppData\\Local\\arduino\\sketches\\87A5DC82690E64F6CF041D671EF2E412\\flash_args" && echo 0xe000 boot_app0.bin >> "C:\\Users\\Dude\\AppData\\Local\\arduino\\sketches\\87A5DC82690E64F6CF041D671EF2E412\\flash_args" && echo 0x10000 sketch_jan22a__Lora_S3.ino.bin >> "C:\\Users\\Dude\\AppData\\Local\\arduino\\sketches\\87A5DC82690E64F6CF041D671EF2E412\\flash_args"
Using library RadioLib at version 7.5.0 in folder: D:\Arduino_projects\libraries\RadioLib 
Using library SPI at version 3.3.5 in folder: C:\Users\Dude\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.3.5\libraries\SPI 
"C:\\Users\\Dude\\AppData\\Local\\Arduino15\\packages\\esp32\\tools\\esp-x32\\2511/bin/xtensa-esp32s3-elf-size" -A "C:\\Users\\Dude\\AppData\\Local\\arduino\\sketches\\87A5DC82690E64F6CF041D671EF2E412/sketch_jan22a__Lora_S3.ino.elf"
Sketch uses 420723 bytes (12%) of program storage space. Maximum is 3342336 bytes.
Global variables use 32772 bytes (10%) of dynamic memory, leaving 294908 bytes for local variables. Maximum is 327680 bytes.
"C:\Users\Dude\AppData\Local\Arduino15\packages\esp32\tools\esptool_py\5.1.0/esptool.exe" --chip esp32s3 --port "COM15" --baud 921600  --before default-reset --after hard-reset write-flash  -z --flash-mode keep --flash-freq keep --flash-size keep 0x0 "C:\Users\Dude\AppData\Local\arduino\sketches\87A5DC82690E64F6CF041D671EF2E412/sketch_jan22a__Lora_S3.ino.bootloader.bin" 0x8000 "C:\Users\Dude\AppData\Local\arduino\sketches\87A5DC82690E64F6CF041D671EF2E412/sketch_jan22a__Lora_S3.ino.partitions.bin" 0xe000 "C:\Users\Dude\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.3.5/tools/partitions/boot_app0.bin" 0x10000 "C:\Users\Dude\AppData\Local\arduino\sketches\87A5DC82690E64F6CF041D671EF2E412/sketch_jan22a__Lora_S3.ino.bin" 
esptool v5.1.0
Serial port COM15:
Connecting...
Connected to ESP32-S3 on COM15:
Chip type:          ESP32-S3 (QFN56) (revision v0.2)
Features:           Wi-Fi, BT 5 (LE), Dual Core + LP Core, 240MHz, Embedded PSRAM 8MB (AP_3v3)
Crystal frequency:  40MHz
USB mode:           USB-Serial/JTAG
MAC:                d8:3b:da:44:d4:c8

This code:

#include <RadioLib.h>
#include <esp_wifi.h> // Required for esp_wifi_stop()
#include <esp_bt.h> // Required for esp_bt_controller_disable()
// NON- B2B pin mapping for Wio-SX1262 on XIAO ESP32S3
#define ANT_SW 6 // Antenna Switch (GPIO38)
// SX1262 Module Pins: NSS, DIO1, RST, BUSY
SX1262 radio = new Module(5, 2, 3, 4);
// -------------------- SX1262 GPIO pins (S3 pins FINAL) --------------------
#define LORA_DIO1   2
#define LORA_RST    3
#define LORA_BUSY   4
#define LORA_CS     5 //NSS
#define LORA_RF_SW1 6


// B2B pin mapping for Wio-SX1262 on XIAO ESP32S3
// SX1262 Module Pins: NSS, DIO1, RST, BUSY
//SX1262 radio = new Module(41, 39, 42, 40);
//#define ANT_SW 38 // Antenna Switch (GPIO38)


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=5, DIO1=2, RST=3, BUSY=4, ANT_SW=6");
// 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)");

// 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, 7, 5, 0x12, 8, 17);
/*SF7 is "most compatible"
CR 4/5
Sync word 0x12 (public LoRa)
Preamble 8
TX power 14–17 dBm is safe on most modules*/
// If you want Private uncomment below
int state = radio.begin(915.0, 125.0, 7, 5, RADIOLIB_SX126X_SYNC_WORD_PRIVATE, 8, 17);
// The 200 was the KILLER BTW, wrong Param. :+1:

//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);

}

GO,
:grin:


Like what I’m holding…

HTH
GL :slight_smile: PJ :v:

I personally don’t think it’s bad hardware, I’m not convinced just yet.

1). Are you able to compile the code and upload it AOK?
2). Stay with One unit., What serial output do you get?
3). inspect the pins, be sure they are captured and not bent.

This is my test setup. Same as yours but I have the WiFi antenna connected as I use OTA for firmware updates. Yellow wire is battery, other wires JTAG - not necessary for you. I also have heatsinks for Camera and ESP32-S3.
2.4GHz antenna may not be necessary if not using RF (WiFi or BLE).

I can set up PSRam as well - helps to provide a web interface for testing.

Have other work to do before I can ā€œplayā€ with this.

Hi there,

Here you see the same , Heatsinks on Both pieces, for actual running.
To test the Lora, You don’t need the Camera at All.


Get the radio working first… LOL :grin:

GL :slight_smile: PJ :v:

pins are fine - Im using one unit for now - compile and upload is fine

wifi and bluetooth disabled on my rig - security risks and unneeded.

I agree! not worried about camera or microphone or vibration sensor - without lora they are useless…I’m here to get the radio going as I am having zero luck so far.

Last code it connected! Praise be! Now I can try transferring this to my main program and see if it initializes the microphone and vibration sensors ok - If so I’m home free. Thanks for the PJ! I do need SF11 or 12 as it may be operated adjacent to jamming…and the lora messages are 53 characters or less.

=== Updated RadioLib Test for Wio-SX1262 on XIAO ESP32S3 ===
Pins: NSS=5, DIO1=2, RST=3, BUSY=4, ANT_SW=6
WiFi and Bluetooth disabled
Antenna switch enabled (GPIO38 HIGH)
Setting TCXO voltage to 1.6 V…
Initializing LoRa…
SUCCESS! LoRa initialized fully.
SX1262 chip detected and ready at 915 MHz, SF11, BW125, CR 4/5, Tx 20 dBm

=== Test Complete ===

correction - it connected on one - investigating - hmmm its failing on the one with the little stub antenna - succeeding on my 10 dbi antenna - interesting! Add another 10 dbi to the unit that failed tomorrow and if it passes then the antenna has something to do with it. Test results are repeatable…

10 dbi antenna below:

=== Updated RadioLib Test for Wio-SX1262 on XIAO ESP32S3 ===
Pins: NSS=5, DIO1=2, RST=3, BUSY=4, ANT_SW=6
WiFi and Bluetooth disabled
Antenna switch enabled (GPIO38 HIGH)
Setting TCXO voltage to 1.6 V…
Initializing LoRa…
SUCCESS! LoRa initialized fully.
SX1262 chip detected and ready at 915 MHz, SF11, BW125, CR 4/5, Tx 20 dBm

=== Test Complete ===

stub antenna

=== Updated RadioLib Test for Wio-SX1262 on XIAO ESP32S3 ===
Pins: NSS=5, DIO1=2, RST=3, BUSY=4, ANT_SW=6
WiFi and Bluetooth disabled
Antenna switch enabled (GPIO38 HIGH)
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
\nRetrying with TCXO 1.8 V…
Retry result: -2

=== Test Complete ===

2 Likes

Good to hear. I used your code and it worked here :thinking:

SUCCESS! LoRa initialized fully.
SX1262 chip detected and ready at 915 MHz, SF11, BW125, CR 4/5, Tx 20 dBm

Will test with PSRam, WiFi, Camera etc at a later stage.

1 Like

One step at a time! …….

1 Like

May have spoken too soon - I tested two other LORA modules on another processor and both failed even with the good antennas. The one ā€˜good’ processor is still successfully initializing with my preferred antenna this morning. I still don’t have a clue as to why they are behaving like this. The processor passed all prior tests and uploads just fine. Will test with other lora board and processors today

Final survey complete - of 10 esp32s3 sense and 10 wio LORA modules - all the LORA radios are good and initialize properly - 2 of the 10 esp32s3 sense are duds and refuse to initialize known good radios - so there is an onboard issue with their b2b or some other issue. They communicate with IDE ok - so I am going to try to rebuild them from their bootloaders on up and see if it’s a few bad bits somewhere or a real hardware issue. Right now I’m think a board bus issue but we will see - looks like I’m going to have to at least two more to make up my order and account for the bad behavior. More to follow…

Hi there,

SO Glad, You have made Good progress on this :+1:

I can Say I have NEVER received a DOA Xiao, albeit most were Nrf parts, more than 100 pieces in 3-4 years. I can say However, I mis handled 2 units and even shorted one by death of solder leakage on the bottom. The Battery Charger reverse polarity maybe also be early on with a backwards pinned JST connector on a PCB.

Some signs are the Battery Charge LED may work but the battery never charges is #1. (doesn’t matter what code)
I burned 2 GPIO’s(Xiao esp32) before with too much series current on a RELAY also.
And Who hasn’t removed a battery PAD not intentionally with TOO much Heat :grin:
C’mon I know you haven’t been doing it right if your older Xiao aren’t missing there reset and boot buttons :hole: TOPS(from pressing them 1 million cycles) LOL :smile:
All are from Simple, easy to make mistakes when handling or Testing.

Electrically it’s not that hard. :crossed_fingers:

If these went from the package to the test , then sounds like a dud,. but if they were connected and used in testing. Only you would know. :+1:

HTH
GL :slight_smile: PJ :v:

Heck even the most problematic unit on the menu (t1000E) I received work Awesome straight out the Box. ( a buddy sent me ) :wink: :v:
So seeed has an Excellent track record for me ! , Fuzz hope i did not jinx it :crossed_fingers: :grin:

1 Like