Connecting T-Beam to LoRa WAN to send data to TTN

I am currently trying to send data to TTN by LoRa WAN. I want to forward data from esp32 T-Beam node to RAK 7268 gateway which will then forward the data to TTN.

So far, the examples I found from the Heltec-Esp32 library are for esp32 s3 and not for esp32. Has anyone here been able to connect their device to TTN through a gateway? What library have you used?

My TTGO T-Beam has SX 1278 chip and has worked with LoRa p2p before so i can confirm the device is working. I have connected my RAK node with the gateway to send data to TTN so can confirm the gateway is fine too.

Any help would be greatly appreciated. Thank you!

The Heltec libraries for LW are really only for Heltec devices and you are using a LilyGo device.

Try RadioLib.

PS, nothing connects to a gateway, you connect to the LoRaWAN network server - the gateway has no brains to connect to.

Try RadioLib.

I have tried the library that you mentioned after trying to run an example, it produces a compilation error regarding an ‘object’ within the code. I cannot seem to figure out how to fix it. I have added the necessary keys to the program and assigned the proper region too.

In file included from C:\Users\user\AppData\Local\Temp\.arduinoIDE-unsaved2024618-10468-j8p1xz.ugxff\LoRaWAN_Starter\LoRaWAN_Starter.ino:25:
C:\Users\user\AppData\Local\Temp\.arduinoIDE-unsaved2024618-10468-j8p1xz.ugxff\LoRaWAN_Starter\config.h:129:19: error: 'radio' was not declared in this scope
  129 | LoRaWANNode node(&radio, &Region, subBand);
      |                   ^~~~~
C:\Users\user\AppData\Local\Temp\.arduinoIDE-unsaved2024618-10468-j8p1xz.ugxff\LoRaWAN_Starter\LoRaWAN_Starter.ino: In function 'void setup()':
C:\Users\user\AppData\Local\Temp\.arduinoIDE-unsaved2024618-10468-j8p1xz.ugxff\LoRaWAN_Starter\LoRaWAN_Starter.ino:34:19: error: 'radio' was not declared in this scope
   34 |   int16_t state = radio.begin();
      |                   ^~~~~
C:\Users\user\AppData\Local\Temp\.arduinoIDE-unsaved2024618-10468-j8p1xz.ugxff\LoRaWAN_Starter\LoRaWAN_Starter.ino: In function 'void loop()':
C:\Users\user\AppData\Local\Temp\.arduinoIDE-unsaved2024618-10468-j8p1xz.ugxff\LoRaWAN_Starter\LoRaWAN_Starter.ino:52:20: error: 'radio' was not declared in this scope
   52 |   uint8_t value1 = radio.random(100);
      |                    ^~~~~

exit status 1

PS, nothing connects to a gateway, you connect to the LoRaWAN network server - the gateway has no brains to connect to.

I am a beginner to this so thank you for clarifying.

Which Arduino-ESP32 board package are you using and I can investigate. I live with the RadioLib tester so shouldn’t be much to debug the situation for you.

PS, I’ve removed the rude word in the title, please don’t use the M word again, we can’t afford to be picked up by Google searches!

Which Arduino-ESP32 board package are you using and I can investigate. I live with the RadioLib tester so shouldn’t be much to debug the situation for you.

BSP for esp 32

BSP for heltec esp32

These are the 2 board packages I have for esp32 boards. For the libraries, I have downloaded the RadioLib library version 6.6.0 as suggested by you.

My region is AS923 and I have edited the keys into the format required too

Thank you

Edit -

I think it would be easier to mention that I am using a T-Beam with SX 1278 too.

Sorry, should have been clearer, it’s which version of the Arduino-ESP32 BSP - we have been using v2 whilst we wait for the very new v3 to settle down so I don’t know what the current status of v3 is but I can check.

I’ll get the docs updated to reflect this.