# Heltec WiFi LorRa 32(V2)

**URL:** <https://www.thethingsnetwork.org/forum/t/heltec-wifi-lorra-32-v2/38242>\
**Category:** Uncategorized\
**Created:** [July 2, 2020, 3:28am UTC](https://www.thethingsnetwork.org/forum/t/heltec-wifi-lorra-32-v2/38242 "2020-07-02T03:28:25Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![EmpowerIOT](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/empoweriot/32/42275_2.png) [@EmpowerIOT](https://www.thethingsnetwork.org/forum/u/EmpowerIOT)\
**Post date:** [July 2, 2020, 3:28am UTC](https://www.thethingsnetwork.org/forum/t/heltec-wifi-lorra-32-v2/38242/1 "2020-07-02T03:28:25Z")

</div>

I have been trying to get my new Heltec board to join TTN but keep getting “join failed” when I use the OTAA\_Join script. I thought it had to do with the key format (msb vs lsb) but I’ve tried every combination and it still doesn’t join. I’ve joined several other boards (including the TTN Node and the TTN Leonardo dev board) with no problem. What’s interesting is that I KNOW it’s getting to the TTN Gateway (that’s 5 feet away in my office) because when I look at the data from the gateway I see this (but I don’t know what to do with it):

![image](https://www.thethingsnetwork.org/forum/uploads/default/original/3X/a/f/af3c79b654aa1c806623ed89f3ad105466ca5f76.png)

Any ideas on how I can troubleshoot this?

---

<div class="post-metadata">

**Author:** ![bertrik](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/bertrik/32/35697_2.png) [@bertrik](https://www.thethingsnetwork.org/forum/u/bertrik)\
**Post date:** [July 2, 2020, 7:13am UTC](https://www.thethingsnetwork.org/forum/t/heltec-wifi-lorra-32-v2/38242/2 "2020-07-02T07:13:01Z")

</div>

Does the TTN accept the OTAA join?  
In that case, you should see the device address (26 xx xx xx) change on each OTAA attempt in the TTN console / device view.

It looks like your App EUI has the wrong endianness, it should start with 70 B3 D5 (in default view).

I have a firmware that works for the heltec v2 at:

> **[bertrik/LoraWanPmSensor](https://github.com/bertrik/LoraWanPmSensor/tree/master/Esp32PmSensor)**
>
> Particulate matter sensor using LoRaWAN as the transport mechanism - bertrik/LoraWanPmSensor

In the code, I have defined the appkey and the app EUI as constants as they appear in the TTN console.  
I’m reversing the endianness in the os\_getDevEui() and os\_getArtEui() functions. The app key is used as is, same order as it appears in the TTN console.

---

<div class="post-metadata">

**Author:** ![EmpowerIOT](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/empoweriot/32/42275_2.png) [@EmpowerIOT](https://www.thethingsnetwork.org/forum/u/EmpowerIOT)\
**Post date:** [July 2, 2020, 1:52pm UTC](https://www.thethingsnetwork.org/forum/t/heltec-wifi-lorra-32-v2/38242/3 "2020-07-02T13:52:32Z")

</div>

TTN doesn’t accept the device join. As shown in the screen shot at the beginning of the thread it recognizes the EUI values sent to it but refuses to join the board to the network. I’ve tried every combination of ENDianness that there is but I’ll try what you suggest. To be very specific are you saying that App EUI and Dev EUI should be in LSB but the AppKey should be MSB?

---

<div class="post-metadata">

**Author:** ![bertrik](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/bertrik/32/35697_2.png) [@bertrik](https://www.thethingsnetwork.org/forum/u/bertrik)\
**Post date:** [July 2, 2020, 2:06pm UTC](https://www.thethingsnetwork.org/forum/t/heltec-wifi-lorra-32-v2/38242/4 "2020-07-02T14:06:41Z")

</div>

Yes, the parameters you see in the Join Request in the TTN console should match the configuration for the device you see in the TTN console. So indeed, I think you should, in your code, swap the APP EUI (and probably Device EUI too), but copy APP key as is. Then try another JOIN and see if things are the right way around in the console.
