Xiao ESP32S3 & SX1262 LoRaWAN Wiki Example

Gooday, Has anyone had success with the Xiao ESP32S3 and the SX1262 Sensor LoRaWAN example. I followed the wiki and also viewed the YT video using the RadioLib AU915 SB 2 in the arduino IDE. Loads fine, but looks like it can’t initialise the radio and therefore can’t join the TTN. Output below. Tried two SX1262 brand new modules with the same outcome. Is there something I’m missing here? I suspect it’s the definition of the SX1626 pin definitions which are in the wiki example as follows.“SX1262 radio = new Module(41, 39, 42, 40);” I can’t relate them to anything, what are these numbers meant to be. Xiao GPIO numbers?

Initialise the radio
Initialise radio failed - ERR_CHIP_NOT_FOUND (-2)
Join (‘login’) the LoRaWAN Network
Join failed - See TypeDef.h (-1106)
Join failed - See TypeDef.h (-1106) etc etc

Cheers Dave

Hi There

So, there is a few posts and a Demo I posted that’s a modified version I think of the original. Based off of the P2P example.

Yes the pins are almost always the issue it seems, either wrong ones or like you the “GPIO” pins are used, those reflect the io on the B2B connector :+1:

The radio init it key to any success AFAIK , so be sure it’s handled properly. Also the BSP used I found to be equally as important not all are supported.

HTH
GL :wink: PJ :v:

Search " P2P Lora " :+1:

Yes, after I posted this I found some ping - pong examples here that are supposed to work so might explore them and see before moving onto the LoRaWAN TTN.(I see your name all over the posts)
Still puzzles me what those pin numbers refer to. Looked at schematics for both units and never see them. Traced the B2B connections too.
Tks Dave

Just tried your REV 4.0 - HomeBase_RadioLib_SX1262_v4.42c and REV 4.0 - Rover_RadioLib_SX1262_v4.42c examples with RadioLib v7.1.2 and can never get the radio initialized.
You refer to [quote=“PJ_Glasso, post:17, topic:291605”]
BSP 3.1.3 was used
[/quote]

Can you tell me what that is.? Maybe something I’ve overlooked.

Yes we need some support from Seeed on this one… especially with SenseCAP… I asked but have not recieved a reply yet… maybe i will ask again next week…

Hi there,

The BSP, is the Board Support Package (boards) tab that is used for the mcu in question. They are supplied by the manufactures it has stuff like PIN definitions, PIN macros, and any unique requirements for the silicon.

Some Examples and Demo’s are made with specific versions and sometimes they switch things up of ADD new features to the BSP.
I always look at the dates and use the BSP that was previously released or the current one in some cases. Pull down the list in the Boards TAB and you can select which version to build with.

HTH
GL :slight_smile: PJ :v:

FYI , be sure to look at the S3 sense Wiki & schematic to see those pin numbers connected to the B2B in the defines. :+1:

Thanks. I was looking at your pics in the ping pong example and noticed that your wio boards looked slightly different to the one I have, which has a switch located on the top and just found the schematics between the two show some differences as well. Will analyse these, suspect this maybe the problem now.

Cheers

1 Like

Is this the one you are using?

Yes that is it. The layout of this vs the other have different functions connected to the headers. Both schematics are labelled as Wio-SX1262 for XIAO V1.0.kicad.sch.
Differences are below.
My board

Other board

1 Like

Although not ESP32S3, the pinout in the following link is helpful.

The sketch in the following link may be helpful for an example of connecting with S3.

1 Like

Thanks, will check it out.

Checked out your sketch for the esp32s3 and used SX1262 radio = new Module(/NSS/D4, /DIO1/D1, /NRST/D2, /BUSY/D3); and the radio initilises. Ping pong example works fine. The LoRaWAN example for connecting to the TTN refuses to join which doesn’t surprise me as I always have trouble with the AUD915 Suband 2 setting in libraries I’ve tried.

Thanks for you help guys and nudging me in the right direction. Will continue to tweak the code.

Cheers Dave

1 Like

Note : RF_SW must be controlled by S3. See post #7 and #8.

1 Like

I purchased a couple of the Sx1262 and xiao kit as it is sold with firmware installed so sounds like plug and play once the app is installed. That is NOT the case. App does not see node at all.
I have no idea how to proceed where do I find actual help.
posting here because can’t open my own topic as new user obviously

[quote=“maxmaisy, post:14, topic:292535”]

or

either way go to mestashtistic web flasher page
connect usb port to computer select serial monitor and see if te device is talking
if not you have to double click boot-reset to get into bootloader mode… select the correct device… download the firmware file… drag and drop firmware into device

:crossed_fingers: i there,

So I just ,turned on BLUETOOTH , plugged it in ,scanned & Paired it with the Phone “123456”
opened the app and it was ready to be added…? Did you get that?
Can you connect it to a com port and see if it’s spitting out the log info,
Try serial monitor in Arduino , open the port , does it make the USB device sound when you plug it in?
What is your setup like?

HTH
GL :slight_smile: PJ :v:

You’ll get it hangin there… :+1:

e[0me[34mDEBUG e[0m| 22:02:51 17 [Router] e[34mDelivering rx packet (id=0x8d8bc704 fr=0x274c6124 to=0x274c6124, WantAck=0, HopLim=3 Ch=0x0 Portnum=6 requestId=77bf699c rxtime=1748815371 priority=70)
e[0me[34mDEBUG e[0m| 22:02:51 17 [Router] e[34mUpdate DB node 0x274c6124, rx_time=1748815371
e[0me[34mDEBUG e[0m| 22:02:51 17 [Router] e[34mForwarding to phone (id=0x8d8bc704 fr=0x274c6124 to=0x274c6124, WantAck=0, HopLim=3 Ch=0x0 Portnum=6 requestId=77bf699c rxtime=1748815371 priority=70)
e[0me[34mDEBUG e[0m| 22:02:51 17 [Router] e[34mModule 'routing' considered
e[0me[32mINFO  e[0m| 22:02:51 17 e[32mTell client we have new packets 7
e[0me[32mINFO  e[0m| 22:02:51 17 e[32mBLE notify fromNum
e[0me[34mDEBUG e[0m| 22:02:51 17 e[34mFromRadio=STATE_SEND_PACKETS
e[0me[34mDEBUG e[0m| 22:02:51 17 e[34mFromRadio=STATE_SEND_PACKETS
e[0me[34mDEBUG e[0m| 22:02:51 17 e[34mphone downloaded packet (id=0x8d8bc704 fr=0x274c6124 to=0x274c6124, WantAck=0, HopLim=3 Ch=0x0 Portnum=6 requestId=77bf699c rxtime=1748815371 priority=70)
e[0me[34mDEBUG e[0m| 22:02:55 21 [Power] e[34mBattery: usbPower=0, isCharging=0, batMv=3744, batPct=53
e[0me[32mINFO  e[0m| 22:03:00 26 e[32mtoRadioWriteCb data 0x2001baca, len 49
e[0me[34mDEBUG e[0m| 22:03:00 26 e[34mNew ToRadio packet
e[0me[34mDEBUG e[0m| 22:03:00 26 e[34mPACKET FROM PHONE (id=0x77bf699d fr=0x00000000 to=0x274c6124, WantAck=1, HopLim=3 Ch=0x0 Portnum=6 priority=70)
e[0me[34mDEBUG e[0m| 22:03:00 26 e[34mEnqueued local (id=0x77bf699d fr=0x00000000 to=0x274c6124, WantAck=1, HopLim=3 Ch=0x0 Portnum=6 rxtime=1748815380 priority=70)
e[0me[32mINFO  e[0m| 22:03:00 26 e[32mTell client we have new packets 8
e[0me[32mINFO  e[0m| 22:03:00 26 e[32mBLE notify fromNum
e[0me[34mDEBUG e[0m| 22:03:00 26 [Router] e[34mAdd packet record fr=0x0, id=0x77bf699d
e[0me[34mDEBUG e[0m| 22:03:00 26 [Router] e[34mhandleReceived(REMOTE) (id=0x77bf699d fr=0x00000000 to=0x274c6124, WantAck=1, HopLim=3 Ch=0x0 Portnum=6 rxtime=1748815380 priority=70)
e[0me[34mDEBUG e[0m| 22:03:00 26 [Router] e[34mModule 'Admin' wantsPacket=1
e[0me[32mINFO  e[0m| 22:03:00 26 [Router] e[32mReceived Admin from=0x0, id=0x77bf699d, portnum=6, payloadlen=25
e[0me[32mINFO  e[0m| 22:03:00 26 [Router] e[32mHandle admin payload 34
e[0me[34mDEBUG e[0m| 22:03:00 26 [Router] e[34mClient set config
e[0me[32mINFO  e[0m| 22:03:00 26 [Router] e[32mSet config: Device
e[0me[32mINFO  e[0m| 22:03:00 26 [Router] e[32mDisable NRF52 bluetooth

I’m getting this at 9600 buad com23, so… :crossed_fingers:

You see this link ?

If you’re going to reflash it do yourself a favor , seperate the B@B’s and put the Xiao in Bootloader mode, while connected to the USB. the Flasher will see it right away.



Works on either Dev board.

the seller states that it is pre installed when powered the green light flashers faintly I would sort of took that to mean it was doing something. I was also worried about messing up the pre installed then not having anything.
Is it fool proof to flash the firmware??

Ok I guess I will try flashing fingers crossed.

connect to the serial monitor…

Open Serial Monitor

if it is talking you should see a log of data streaming in

and yes… if you use the meshtastic flasher web page it should work… dont try any homebrew flasher … just go to meshtastic. org and make sure to select your exact unit

Ok first try I opened serial monitor after selecting board and firmware and it automatically tried to load but failed to find GPS obviously. next go as it had already paired i got all the way to Flash. it seems to have loaded except is “leaving” and “disconnecting” depending on what notice I look at. Do I wait or just pull USB?