Using the “Wio-SX1262 for XIAO” to easily build LoRa point-to-point communication with various XIAOs

Hi there,

So Look at the Boards Tab, check which Board Support Package is being used (also in compiler output if set to “Verbose” in the settings) look at m|y thread on it and look at the first three lines of the compiler output , you can see what I used and what works. :+1:

HTH
GL :slight_smile: PJ

check out “BSP” also to get up to speed :+1:

Hi,
Here’s a copy of the 3 first lines of the verbrose compiler output :
FQBN: esp32:esp32:XIAO_ESP32S3
Using board ‘XIAO_ESP32S3’ from platform in folder: C:\Users\sebas\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.1.3
Using core ‘esp32’ from platform in folder: C:\Users\sebas\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.1.3
It’s getting tricky

Hi there,

Hmmm.

So I went and grabbed this unit…


It’s a full Stack :grin:
Serial Port output, after fresh compile with BSP 3.3.3(latest) , RadioLib 7.1.2.

Power ON
Xiao LED Test compiled on Jul 31 2025 at 21:49:25
// REV 5.4a - SX1262 Beacon Sender with TX Power Toggle
// Board: ESP32-S3 with SX1262 LoRa Module
Initializing SX1262 LoRa radio... SUCCESS!
TX Power set to 22 dBm
.........................

Compiler Output. (first 3 & last 20 ish")

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.3
Using core 'esp32' from platform in folder: C:\Users\Dude\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.3.3
____EDIT_____
Connecting...
Connected to ESP32-S3 on COM4:
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:74:23:a0

Uploading stub flasher...
Running stub flasher...
Stub flasher running.
Changing baud rate to 921600...
Changed.

Configuring flash size...
Flash will be erased from 0x00000000 to 0x00004fff...
Flash will be erased from 0x00008000 to 0x00008fff...
Flash will be erased from 0x0000e000 to 0x0000ffff...
Flash will be erased from 0x00010000 to 0x00064fff...
Compressed 20224 bytes to 13060...

Writing at 0x00000000 [                              ]   0.0% 0/13060 bytes... 

Writing at 0x00004f00 [==============================] 100.0% 13060/13060 bytes... 
Wrote 20224 bytes (13060 compressed) at 0x00000000 in 0.3 seconds (494.9 kbit/s).
Hash of data verified.
Compressed 3072 bytes to 146...

Writing at 0x00008000 [                              ]   0.0% 0/146 bytes... 

Writing at 0x00008c00 [==============================] 100.0% 146/146 bytes... 
Wrote 3072 bytes (146 compressed) at 0x00008000 in 0.0 seconds (551.9 kbit/s).
Hash of data verified.
Compressed 8192 bytes to 47...

Writing at 0x0000e000 [                              ]   0.0% 0/47 bytes... 

Writing at 0x00010000 [==============================] 100.0% 47/47 bytes... 
Wrote 8192 bytes (47 compressed) at 0x0000e000 in 0.1 seconds (695.2 kbit/s).
Hash of data verified.
Compressed 348112 bytes to 178881...

Writing at 0x00010000 [                              ]   0.0% 0/178881 bytes... 

Writing at 0x0001ba21 [=>                            ]   9.2% 16384/178881 bytes... 

Writing at 0x0002ec92 [====>                         ]  18.3% 32768/178881 bytes... 

Writing at 0x000349d4 [=======>                      ]  27.5% 49152/178881 bytes... 

Writing at 0x0003a510 [=========>                    ]  36.6% 65536/178881 bytes... 

Writing at 0x0003fd36 [============>                 ]  45.8% 81920/178881 bytes... 

Writing at 0x0004575d [===============>              ]  55.0% 98304/178881 bytes... 

Writing at 0x0004aff6 [==================>           ]  64.1% 114688/178881 bytes... 

Writing at 0x00053bbb [====================>         ]  73.3% 131072/178881 bytes... 

Writing at 0x000598ad [=======================>      ]  82.4% 147456/178881 bytes... 

Writing at 0x0005f4ca [==========================>   ]  91.6% 163840/178881 bytes... 

Writing at 0x00064fd0 [==============================] 100.0% 178881/178881 bytes... 
Wrote 348112 bytes (178881 compressed) at 0x00010000 in 2.5 seconds (1114.1 kbit/s).
Hash of data verified.

Hard resetting via RTS pin...

Works as Expected…
so I would check more it probably something between the keyboard and the Floor :v: :grin:
Can you show a picture of this device :+1:

Here are my pictures :


The output :

17:57:30.192 -> // REV 5.4a - SX1262 Beacon Sender with TX Power Toggle
17:57:30.192 -> // Board: ESP32-S3 with SX1262 LoRa Module
17:57:30.192 -> Initializing SX1262 LoRa radio... FAILED!

The compiler output 3 first lines and the last as you did

FQBN: esp32:esp32:XIAO_ESP32S3
Using board 'XIAO_ESP32S3' from platform in folder: C:\Users\sebas\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.3.3
Using core 'esp32' from platform in folder: C:\Users\sebas\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.3.3
___EDIT____
Connecting...
Connected to ESP32-S3 on COM3:
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:73:c4:44

Uploading stub flasher...
Running stub flasher...
Stub flasher running.
Changing baud rate to 921600...
Changed.

Configuring flash size...
Flash will be erased from 0x00000000 to 0x00004fff...
Flash will be erased from 0x00008000 to 0x00008fff...
Flash will be erased from 0x0000e000 to 0x0000ffff...
Flash will be erased from 0x00010000 to 0x00064fff...
Compressed 20224 bytes to 13060...

Writing at 0x00000000 [                              ]   0.0% 0/13060 bytes... 

Writing at 0x00004f00 [==============================] 100.0% 13060/13060 bytes... 
Wrote 20224 bytes (13060 compressed) at 0x00000000 in 0.4 seconds (458.4 kbit/s).
Hash of data verified.
Compressed 3072 bytes to 146...

Writing at 0x00008000 [                              ]   0.0% 0/146 bytes... 

Writing at 0x00008c00 [==============================] 100.0% 146/146 bytes... 
Wrote 3072 bytes (146 compressed) at 0x00008000 in 0.1 seconds (315.1 kbit/s).
Hash of data verified.
Compressed 8192 bytes to 47...

Writing at 0x0000e000 [                              ]   0.0% 0/47 bytes... 

Writing at 0x00010000 [==============================] 100.0% 47/47 bytes... 
Wrote 8192 bytes (47 compressed) at 0x0000e000 in 0.1 seconds (528.7 kbit/s).
Hash of data verified.
Compressed 348112 bytes to 178876...

Writing at 0x00010000 [                              ]   0.0% 0/178876 bytes... 

Writing at 0x0001ba3f [=>                            ]   9.2% 16384/178876 bytes... 

Writing at 0x0002ec9c [====>                         ]  18.3% 32768/178876 bytes... 

Writing at 0x000349dd [=======>                      ]  27.5% 49152/178876 bytes... 

Writing at 0x0003a51c [=========>                    ]  36.6% 65536/178876 bytes... 

Writing at 0x0003fd3f [============>                 ]  45.8% 81920/178876 bytes... 

Writing at 0x00045762 [===============>              ]  55.0% 98304/178876 bytes... 

Writing at 0x0004affc [==================>           ]  64.1% 114688/178876 bytes... 

Writing at 0x00053bc1 [====================>         ]  73.3% 131072/178876 bytes... 

Writing at 0x000598b5 [=======================>      ]  82.4% 147456/178876 bytes... 

Writing at 0x0005f4d2 [==========================>   ]  91.6% 163840/178876 bytes... 

Writing at 0x00064fd0 [==============================] 100.0% 178876/178876 bytes... 
Wrote 348112 bytes (178876 compressed) at 0x00010000 in 2.7 seconds (1038.4 kbit/s).
Hash of data verified.

Hard resetting via RTS pin...

20 years of playing with arduino and I finally found my Xiao-Nemesis :sweat_smile:

Hi there,

LOL…

So you see that isn’t the same Lower unit. :grin:
Thus the pin defines in the code are incorrect… Adjust that and Bob’s Your Uncle :v:

#define NSS     41
#define DIO1    39
#define RST     42
#define BUSY    40
#define LED_PIN 48
#define BTN_PIN 21

SX1262 radio = new Module(NSS, DIO1, RST, BUSY);

Now you got this… :+1:

HTH
GL :slight_smile: PJ :v:

one other thing , If you are not using WIFI… the antenna has to be installed. Or code the WiFI radio OFF!

Well already used those pins in your code … :
I just changed the power to 10 dBm (only up to 14 allowed in France with the 868 MHz frequency). Don’t know if thats the problem

// REV 5.4a - SX1262 Beacon Sender with TX Power Toggle
// Board: ESP32-S3 with SX1262 LoRa Module
// Sends "Seeed Studio" beacon every 3 seconds
// Button on GPIO 21 toggles power (10 <-> 22 dBm)
// LED on GPIO 48 blinks on each send

#include <RadioLib.h>
#define NSS     41
#define DIO1    39
#define RST     42
#define BUSY    40


SX1262 radio = new Module(NSS, DIO1, RST, BUSY);

const char* message = "Seeed Studio"; // just change this to whatever...Beacon message you want //
const int ledPin = 48;
const int buttonPin = 21;

int currentPower = 10;
bool lastButton = HIGH;

void setup() {
  Serial.begin(115200);
  delay(1000);

  pinMode(ledPin, OUTPUT);
  pinMode(buttonPin, INPUT_PULLUP);

  Serial.println(F("// REV 5.4a - SX1262 Beacon Sender with TX Power Toggle"));
  Serial.println(F("// Board: ESP32-S3 with SX1262 LoRa Module"));
  Serial.print("Initializing SX1262 LoRa radio... ");
  if (radio.begin() != RADIOLIB_ERR_NONE) {
    Serial.println("FAILED!");
    while (true);
  }
  Serial.println("SUCCESS!");

  // Apply standard LoRa settings
  radio.setSpreadingFactor(7);
  radio.setBandwidth(125.0);  // ✅ correct for newer versions
  radio.setCodingRate(5);
  radio.setOutputPower(currentPower);
  Serial.print("TX Power set to ");
  Serial.print(currentPower);
  Serial.println(" dBm");
}

void loop() {
 

  //digitalWrite(ledPin, HIGH);
  radio.transmit(message);
  //digitalWrite(ledPin, LOW);

  Serial.print(".");
  static int dotCount = 0;
  dotCount++;
  if (dotCount >= 80) {
    Serial.println();
    dotCount = 0;
  }

  delay(3000);
}

Hi there,

Ok, So you miss understood.
The pins defined in the demo are for the B2B version of the lORA board, You are using the First revision Board for XIAO.
So those pins are incorrect for that version of lora board.

Change them to the GPIO numbers of the silk-screen ) number D1-D10.
Look at the pictures again. I have the GPS board on there, Here is a thread that goes more deeply into the discussion but the pins are more aplicable.

something along theses lines,

SX1262 radio = new Module(/*NSS*/D4, /*DIO1*/D1, /*NRST*/D2, /*BUSY*/D3);

from this :crossed_fingers:

SX1262 radio = new Module(41, 39, 42, 40);  // NSS, DIO1, RST, BUSY

HTH
GL :slight_smile: Pj :v:

you have this one.


You may NOT have PIN 6 though, some boards did not have that connection. :+1:

1 Like

:raised_hands:FINALLY !!! :clap:
You can’t imagine my relief. Eternal thanks !!!
Seb from France

1 Like

Hi there,

LOL, NICE ! :grin:

Just those tiny Details… Good on you for sticking with it. :+1:

Do us a Solid and mark the previous post as the Solution, So others can find it Fast Too! :raised_hands:

Now GO! :grin: get the other demo’s running and Make some stuff happen

HTH
GL :slight_smile: Pj :v:

I still don’t understand how you can read :

PS : And how can I mark it as a solution ?

Hi there,

Sorry, :grin: Bad info… You can’t mark it only for the original poster. So definitely start a New Thread! Next time, you are good to go, Credz-wise. So :+1:

GL :slight_smile: PJ :v: