WiFi LoRa 32 (V2) + ESP32_LoRaWAN-master + ttn doesn't work

Hello,

I try the pgrogram ota-oled sample with my configuration ttn abp and otaa and my license number.
But its doesn’t work the display stay in “joining…” and the serial data show:

14:00:01.102 -> Firstets Jun 8 2016 00:22:57
14:00:02.407 ->
14:00:02.407 -> rst:0x1 (POWERON_RESET),boot:0x17 (SPI_FAST_FLASH_BOOT)
14:00:02.407 -> configsip: 0, SPIWP:0xee
14:00:02.407 -> clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
14:00:02.407 -> mode:DIO, clock div:2
14:00:02.407 -> load:0x3fff0018,len:4
14:00:02.407 -> load:0x3fff001c,len:1216
14:00:02.407 -> ho 0 tail 12 room 4
14:00:02.407 -> load:0x40078000,len:9720
14:00:02.407 -> ho 0 tail 12 room 4
14:00:02.407 -> load:0x40080400,len:6364
14:00:02.407 -> entry 0x400806b8
14:00:02.909 -> ESP32 LoraWan Starting…
14:00:04.461 -> ESP32 LoraWan Started OK!
14:00:04.562 -> +JOIN:STARTING…
14:00:04.615 ->
14:00:04.615 -> Tx Freq:868300000
14:00:09.669 ->
14:00:10.618 -> First RxWindow Freq: 868300000
14:00:23.587 ->
14:00:24.591 -> Second RxWindow Freq: 869525000

Can you hepl me please!

I have both WIFI LORA which work with sending and receiving sample program.

Best regard.

Which gateway did you use? Can you please paste your global_conf.json file here?

BTW. Did you refer to this document?
https://docs.heltec.cn/#/en/user_manual/connect_an_esp32_+_lora_node_to_a_lora_gateway_via_lorawan_protocol

Hello,
Thanks for your help.
I bought my gateway here:
https://fr.farnell.com/the-things-network/ttn-gw-868/the-things-gateway-eu/dp/2675813?st=the%20thinks%20network
with node. It’s work fine. But it’s so expensive and i try another object such as ESP32 from heltec.
Is it possible to connect heltec eps32 lora to my gateway or not?
should i get a heltec gateway?

Best regards

Hi it should work fine. Are you using TTN network? The key thing is that you configure the node with the correct keys if on TTN you can get these when you create an Application and add a device. Your node you has already got its keys the Heltec ones need to have them programmed in to them.
Simon

Hello,
Thanks for your fast answere.
I think configure my heltec ESP32 lora with the corrects key.
But I don’t understand why configure key in “Commissioning.h” file and in arduino “OTAA_OLED” file.

I’m not sure to have ESP32 V2 because when I program my shield, i must select ESP32 and i can’t select ESP32(V2).

I follow this tutorial:
https://docs.heltec.cn/#/en/user_manual/connect_an_esp32_+_lora_node_to_a_lora_gateway_via_lorawan_protocol
but I have just 3 configurations on my OTAA TTN device:
DEvice EUI
Application EUI
AppKey

I haven’t
device adress
network session key
app session key
configuration

Best regard

I also followed the above tutorial, I’ve been trying for three days to get it to work with no success.

One of my main issues is there is not a \ESP32_LoRaWAN\src\LoRaMac-definitions.hfile

I’ve tried numerous libraries and none include it.

Thanks

If you look here…https://github.com/HelTecAutomation/ESP32_LoRaWAN/tree/master/src

You can see the file is not included.

And that exacxtly is the problem. The tutorial refers to a file that DID exist in a previous version of the Library (google it and you will find it in the Google cache) but does no longer exist in the current Library.

So how to configure these parameters when the appropriate file does no longer exist?

just create the file with your data

So why was this file removed when it is still required?

O.K. i JUST created the file by copying the code from Google cache, modifying to my region and writing the file to the appropriate library folder. I added an #include to that file, but the example still won’t compile.

The tutorial, the example and the library simply don’t match and are hence useless in this combination.

Link not found. https://docs.heltec.cn/#/en/user_manual/connect_an_esp32_+_lora_node_to_a_lora_gateway_via_lorawan_protocol

Hi, all documents are moved to new document page:
https://heltec-automation-docs.readthedocs.io/en/latest/esp32/lorawan/index.html

Hi, i also make this project and im currently stuck at the connection of lora node to the TTN. I use Heltec Wifi LoRa 32 (V2) and Heltec HT-M01 Mini Lora Gateway. The gateway is already connected to the TTN. Im currently at asia and should be using AS923 region. I tried the OTAA example. Is there any part in the coding that i should change for the frequency? and should i change the uint16_t userChannelsMask[6]={ 0x00FF,0x0000,0x0000,0x0000,0x0000,0x0000 }; to uint16_t userChannelsMask[6]={ 0xFF00,0x0000,0x0000,0x0000,0x0000,0x0000 }; ?

I followed all step from this : https://heltec-automation-docs.readthedocs.io/en/latest/esp32/lorawan/config_parameter.html#choose-frequency-band

this is right. The first 8 channels are the last two digits

Thanks but how about the frequency? It only need to change in the “Arduino IDE” -> “Tools” -> “LoRaWan Region” right? Or any modification of the frequency in the code?

Yes, it is. You can try it.

My Heltec Wifi Lora 32 (v2) still cant connected to the TTN. It print those on the serial onitor in Arduino IDE. Can anyone help me :frowning: :sob:

ESP32 MCU init…
ESP32 MCU inited OK!

LoRaWAN AS923 Class A start!

joining…
join failed, rejoin at 30000 ms later

LoRaWAN AS923 Class A start!

joining…
join failed, rejoin at 30000 ms later

LoRaWAN AS923 Class A start!

joining…
join failed, rejoin at 30000 ms later

hi,

Please check the following:

  1. DevEUI, APPKEY

  2. Is the frequency selected correctly?

  3. server address. Gateway ID

Maybe you can refer this url:
https://heltec-automation-docs.readthedocs.io/en/latest/gateway/ht-m01/connect_to_server.html

I have the same problem in Arduino. My Heltec Wifi Lora V1 do not join to TTN.

Thank you