Example for ESP32 + LoRa” node to a LoRa Gateway via LoRaWAN protocol does not work

I recently bought a Heltec Wireless Stick and now spent two days in getting the thing up and running using Arduino Environment and the OTAA_OLED example. I exactly followed the instructions on the Heltec Site to set up the environment and i even tried different methods (directly from Arduino and GIT) to install the library. I even tried a on a second PC (which never had Arduino installed before) but failed equally.

The example doesn’t even compile, as this already fails at the statement" uint8_t debugLevel = LoRaWAN_DEBUG_LEVEL with : ‘LoRaWAN_DEBUG_LEVEL’ was not declared in this scope;"
I tried setting this parameter directly in the example but then compiling fails at the next parameter (uint8_t debugLevel = LoRaWAN_DEBUG_LEVEL;).

The tutorial describes how to set the region editing the file LoRaMac-definitions.h, however this file does not exist any longer in the current library. So how am I supposed to configure the region (and other parameters that may need to be set)?
I found another tutoral where it shows a screenshot with an Arduiono drop down menu that allowed to select the region. However I don’t get this menu in my Arduino environment.

The module itself basically works, I can compile the Facory Test and was also able to read the Serial (MAC) so I could request the license from the Heltec website.

I’m about to return my Wireless-Stick to the dealer I bought it from as I feel that at least simple examples should run out of the box (which would of course require accurate testing before publishing them), but wanted to give it a last chance with this forum.

If anyone can help me to get a simple example at least to compile (I don’t expect that it WORKS right away but I need at least to get to the point where I need to fix or integrate functional issues), this prson would be more than welcome.

Thank you for your trust and support. The library for LoRaWAN has just been updated. The new version of the code requires new environment support. You need to delete the original environment and download the new environment to use it normally. A new version of the manual is in preparation and will be released soon. You can ask questions about the installation of the new version here, and I will answer it for you. This is a link to the new environment.https://github.com/Heltec-Aaron-Lee/WiFi_Kit_series.git

Hello.
I have exactly the same issue… With the new environment.
Coud you please help.
Thanks

It is resolved in this thread: LoRaWAN Library doesn´t work

You need to install the Heltec boards using this repository: https://github.com/Heltec-Aaron-Lee/WiFi_Kit_series . Download the repository in: C:\Program Files (x86)\Arduino\hardware

Then unzip it and execute this file: C:\Program Files (x86)\Arduino\hardware\WiFi_Kit_series\esp32\tools\get.exe

After it finished the instalation, open arduino and choose the correct board (in my case it appears two heltecs LoRa Wifi V2 boards). It should appear something like this when you choose the board:

Sin%20t%C3%ADtulo

Once you do all of this it should work. At least for me did it and I had the same problem.

I hope it works also for you!

This summary is in place and very good.

1 Like

Many thanks !
Now I am able to compile the OTAA_OLED exemple with my datas (license, deveui, appeui, appkey) but not able to join. Always dispaying JOINING…
Any idea ?

Do I need to fill “\ESP32_LoRaWAN\src\Commissioning.h” with deveui, appeui, appkey ?
So hard to be able to use this ESP32 + Lora…

ESP32 MCU init…
ESP32 MCU inited OK!

LoRaWAN EU868 Class A start!

joining…
TX on freq 868100000 Hz at DR 5
DIO0:TX Done
RX on freq 868100000 Hz at DR 5
DIO1:RX Timeout
RX on freq 869525000 Hz at DR 0
DIO1:RX Timeout
TX on freq 868100000 Hz at DR 5
DIO0:TX Done
RX on freq 868100000 Hz at DR 5
DIO1:RX Timeout
RX on freq 869525000 Hz at DR 0
DIO1:RX Timeout
TX on freq 868500000 Hz at DR 5
DIO0:TX Done
RX on freq 868500000 Hz at DR 5
DIO1:RX Timeout
RX on freq 869525000 Hz at DR 0
DIO1:RX Timeout
TX on freq 868300000 Hz at DR 5
DIO0:TX Done
RX on freq 868300000 Hz at DR 5
DIO1:RX Timeout
RX on freq 869525000 Hz at DR 0
DIO1:RX Timeout
TX on freq 868500000 Hz at DR 5
DIO0:TX Done
RX on freq 868500000 Hz at DR 5
DIO1:RX Timeout
RX on freq 869525000 Hz at DR 0
DIO1:RX Timeout
TX on freq 868500000 Hz at DR 5
DIO0:TX Done
RX on freq 868500000 Hz at DR 5
DIO1:RX Timeout
RX on freq 869525000 Hz at DR 0
DIO1:RX Timeout
TX on freq 868500000 Hz at DR 5
DIO0:TX Done
RX on freq 868500000 Hz at DR 5
DIO1:RX Timeout
RX on freq 869525000 Hz at DR 0
DIO1:RX Timeout
TX on freq 868500000 Hz at DR 4
DIO0:TX Done
RX on freq 868500000 Hz at DR 4
DIO1:RX Timeout
RX on freq 869525000 Hz at DR 0
DIO1:RX Timeout

You just need to modify it in OTAA.ino.

I did it but it is not working and I don’t know why… Not able to join!

Can you talk about the details?

Are you putting the DevEui in LSB, the AppKey in MSB and the AppEui with this value { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 } ??

In the sketch OTAA_OLED.ino, I modified only license, DevEui , AppEui and AppKey .
DevEui in LSB => ok
AppKey in MSB => ok
AppEui with this value { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 } => why ? TTN gave me the appEui.
I tried with TTN and Objenious, a french private network, but I am never able to connect.

ESP32 MCU inited OK!

LoRaWAN EU868 Class A start!

joining…
TX on freq 868100000 Hz at DR 5
DIO0:TX Done
RX on freq 868100000 Hz at DR 5
DIO1:RX Timeout
RX on freq 869525000 Hz at DR 0
DIO1:RX Timeout
TX on freq 868100000 Hz at DR 5
DIO0:TX Done
RX on freq 868100000 Hz at DR 5
DIO1:RX Timeout
RX on freq 869525000 Hz at DR 0
DIO1:RX Timeout

The AppEui is because in ChirpStack (the lora server that I use) is what you have to put, it is like it is no necessary anymore. Maybe in TTN you still need it.

I don´t see anything that would make your node works wrong. Maybe some bad configuration in the TTN server or in your gateway?

Yes,TTN will give you AppEui .
And TTN will also give you Appkey .
Are you sure that Appkey is also right?