Need help with setting up LoRa on ESP32 V3 LoRa Dev Board

Hi,

I am new to this and would like to get some hints how to set up the LoRa transceiver for the Wifi LoRa 32 V3 development board.

I am using Arduino as the development platform.

I have downloaded the Wifi_LoRa_32FactoryTest.ino, updated the Wifi SSID and Passwd. If the Heltec.begin option for start LoRa is ‘true’ I get an error message that ‘failed to start LoRa’. If I set it to ‘false’, I get the logo followed by success in connecting to my SSID and the Wifi scan.

I have set the LoRWAN Region to US915, the LoRaWAN DevEUI is ‘custom’ as per the default.

I have not set a chipID but have it or a licese key if it should be needed.

I need hel to set up the LoRa WAN options. Are there any detailed links? The HelTec website gives me ‘page not found’ errors.

1 Like

https://docs.heltec.org/en/node/esp32/esp32_general_docs/lorawan/index.html
This may help you

Thank you wangwuse,

it helped me to get the chipid license numbers. However, I still am at a loss which files I need to modify to insert the license and other parameters and how to get these parameters.

Further to my message: what exactly are the 4 hex numbers I get when entering my deviceID? Where do I use them and add them to my program?

Hi WolfgangDaum,
from your name one could assume you are located in Europe. Please note that in Europe sending on 915 MHz is illegal. You would have to use the 868 MHz band instead.
Regards

I am US based and would appreciate an answer to my questions

I have the same problem.

Are all these Heltec boards crap that don’t work at all?

There are 4 hex numbers starting with 0x and a ‘,’ between them. Do I just enter all 4 concatinated without the 0x?

Before you all quit… the hardware is amazing, the Heltec SDK is problem after problem after problem. There’s work in progress on a brand new LoRaWAN stack, which is as of yesterday fully working for SX126x boards (that includes all Heltec V3 boards!). Implementing SX127x is a few days away, and once that work is done, it’ll be available for everyone to use. So a little patience please… :slight_smile:

1 Like

I just received a ESP32 LoRa Tracker. The tools and instructions in the web support page don’t work either.

When will you update these with correct and working examples?

and when will this happen?

Have a look at RadioLib under the PR section, number 867… it’s pending but should be pretty much complete :slight_smile:

bns, could you link to the pr? I have searched and can’t find in open or closed pr’s.

Thank you.

edit:
Is this the pr you were referring to?
[LoRaWAN] Rework bands, official Rx windows, support ADR, confirm frames, improve EEPROM handling, support clock drift by StevenCellist · Pull Request #867 · jgromes/RadioLib (github.com)

edit:
Do you think Heltec will include the updated RadioLib in their framework?

Yes, and as of writing, the functionality is now included in the main branch!
There’s no version update yet as we’re looking for people to test it out, so you’ll have to clone the repo yourself.
I do not expect Heltec will include it themselves, as they will loose their licensing stuff which I assume exists for a reason… but who knows?? We can try our best

I have cloned the repo and my project is building in PlatormIO.

In LoRaWAN_End_Device, I am creating my module like this:

// Heltec V3 has the following connections:
// NSS pin:   18
// DIO0 pin:  26
// RESET pin: 14
// DIO1 pin:  3
SX1262 radio = new Module(18, 26, 14, 3);

Lora is failing with a return code of
[SX1262] Initializing … failed, code -2

I am using the correct SS, reset and dio0 pins?
WiFi LoRa 32 (V3)
US915


I now see the radio has the wrong freq.
freq: 434.00
bw: 125.00
sf: 9
cr: 7
syncWord: 18
power: 10
preambleLength: 8
tcxoVoltage: 1.60
useRegulatorLDO: 0
failed, code -2

For me, on the Wireless Stick Lite V3 which seems to have a matching pinout w.r.t. the SX1262:

#include <Arduino.h>
#include <RadioLib.h>
#include <SPI.h>

SPIClass spi(SPI);
SPISettings spiSettings(2000000, MSBFIRST, SPI_MODE0);

// NSS/CS, DIO0, RST, DIO1
SX1262 radio = new Module(8, 14, 12, 13, spi, spiSettings);

LoRaWANNode node(&radio, &EU868);

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

	// SCK/CLK, MISO, MOSI, NSS/CS,
	spi.begin(9, 11, 10, 8);

	// initialize SX1262 with default settings
	Serial.print(F("[SX1262] Initializing ... "));
	int state = radio.begin();

Make sure to change the region to US915.

Thanks for that code. It got me past my last issues.
I don’t expect you to help me debug this, but if something jumps out at you let me know.

I am now getting this error, code -6 in the LoraWan.cpp file, line 970.
LoRaWANNode::downlinkCommon()

[SX1262] Initializing …
freq: 915.00
bw: 125.00
sf: 7
cr: 7
syncWord: 18
power: 10
preambleLength: 8
tcxoVoltage: 1.60
useRegulatorLDO: 0

RadioLib Debug Info
Version: 6.2.0.0
Platform: ESP32
Compiled: Nov 12 2023 19:18:01

Found SX126x: RADIOLIB_SX126X_REG_VERSION_STRING:
0000320 53 58 31 32 36 31 20 56 32 44 20 32 44 30 32 00 | SX1261 V2D 2D02.

M SX126x
Lora success!
[LoRaWAN] Attempting over-the-air activation … blocks: 8, channels/block: 9, blockID: 0, channelID: 2

Channel frequency UL = 902.700012 MHz
DR 72: LORA (SF: 10, BW: 125.000000, CR: 5)
Timeout in 556032 us
Join-request sent <-- Rx Delay start

Channel frequency DL = 924.500000 MHz
DR 64: LORA (SF: 10, BW: 500.000000, CR: 5)
Opening Rx1 window (71712 us timeout)… <-- Rx Delay end
closing
DR 96: LORA (SF: 12, BW: 500.000000, CR: 5)
Opening Rx2 window (185888 us timeout)… <-- Rx Delay end
closing
failed, code -6

Well, that means that your device did not hear a join-accept message.
That could be due to that there’s no public LoRaWAN gateway within reach, a misconfiguration of keys or maybe something else entirely. Please confirm those points before further investigation.

As you are in the US band, make sure you select the required subband (or send a join-request e.g. every minute up to 8 times such that you hit the subband that a nearby gateway is configured to). Most TTN gateways are on subband 2, Helium might be too but not sure.
You should select the subband before joining:
node.selectSubband(2)

I can see the join request and acceptance in the Helium Console, repeated over and over. I guess my sensor can’t tell he was accepted into the network.