# Big ESP32 + SX127x topic part 3

**URL:** <https://www.thethingsnetwork.org/forum/t/big-esp32-sx127x-topic-part-3/18436>\
**Category:** End Devices (Nodes)\
**Created:** [October 4, 2018, 12:58pm UTC](https://www.thethingsnetwork.org/forum/t/big-esp32-sx127x-topic-part-3/18436 "2018-10-04T12:58:13Z")\
**Posts on this page:** 20\
**Page:** 9

<div class="post-metadata">

**Author:** ![E\_T](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/e_t/32/35697_2.png) [@E\_T](https://www.thethingsnetwork.org/forum/u/E_T)\
**Post date:** [June 9, 2019, 5:50pm UTC](https://www.thethingsnetwork.org/forum/t/big-esp32-sx127x-topic-part-3/18436/170 "2019-06-09T17:50:18Z")

</div>

Yes, other board, but the same Software and EV\_TXCOMPLETE occurs.  
Visually, both boards look the same. Both boards labeld as T3\_V1.6.  
Over the next few days I expect another delivery, then I will continue to test that.

Greetings

Ernst

---

<div class="post-metadata">

**Author:** ![dmolner](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/dmolner/32/25844_2.png) [@dmolner](https://www.thethingsnetwork.org/forum/u/dmolner)\
**Post date:** [July 7, 2019, 2:26pm UTC](https://www.thethingsnetwork.org/forum/t/big-esp32-sx127x-topic-part-3/18436/171 "2019-07-07T14:26:12Z")

</div>

Hello,  
Sorry for my bad english.  
I bought two LoRa TTGO.  
I has loaded sender and receiver programs and I have connection.  
But de RSSI is -80 with antennas close.  
If I go to another room i lose the conexion.  
Is possible antennas are wrong?  
Could you recomend antenna.  
I’m interested connect for home made weather station at 5-7km with no lineal vison.

Best regards,  
David.

---

<div class="post-metadata">

**Author:** ![LoRaTracker](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/loratracker/32/48502_2.png) [@LoRaTracker](https://www.thethingsnetwork.org/forum/u/LoRaTracker)\
**Post date:** [July 7, 2019, 2:33pm UTC](https://www.thethingsnetwork.org/forum/t/big-esp32-sx127x-topic-part-3/18436/172 "2019-07-07T14:33:40Z")

</div>

Welcome to the forum.

You say ‘close’ but we dont know what ‘close’ is.

If the units are say within 1m and the RSSI is -80dBm, something is wrong, faulty devices or antennas, even a short bit of wire as an antenna should work better at that distance.

Be aware that this is a support forum for The Things Network (TTN) devices and not a general purpose forum for LoRa devices.

---

<div class="post-metadata">

**Author:** ![dmolner](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/dmolner/32/25844_2.png) [@dmolner](https://www.thethingsnetwork.org/forum/u/dmolner)\
**Post date:** [July 7, 2019, 3:10pm UTC](https://www.thethingsnetwork.org/forum/t/big-esp32-sx127x-topic-part-3/18436/173 "2019-07-07T15:10:29Z")

</div>

I’m sorry but not found any other forum for ask about this.  
Closed \<1cm

---

<div class="post-metadata">

**Author:** ![kersing](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/kersing/32/44777_2.png) [@kersing](https://www.thethingsnetwork.org/forum/u/kersing)\
**Post date:** [July 7, 2019, 6:36pm UTC](https://www.thethingsnetwork.org/forum/t/big-esp32-sx127x-topic-part-3/18436/174 "2019-07-07T18:36:59Z")

</div>

With 1cm and -80dbm you either have defective hardware or the frequencies do not match.

---

<div class="post-metadata">

**Author:** ![BoRRoZ](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/borroz/32/44234_2.png) [@BoRRoZ](https://www.thethingsnetwork.org/forum/u/BoRRoZ)\
**Post date:** [July 7, 2019, 7:08pm UTC](https://www.thethingsnetwork.org/forum/t/big-esp32-sx127x-topic-part-3/18436/175 "2019-07-07T19:08:42Z")

</div>

LOL 🤣

---

<div class="post-metadata">

**Author:** ![gmos](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/gmos/32/30281_2.png) [@gmos](https://www.thethingsnetwork.org/forum/u/gmos)\
**Post date:** [July 10, 2019, 11:29am UTC](https://www.thethingsnetwork.org/forum/t/big-esp32-sx127x-topic-part-3/18436/176 "2019-07-10T11:29:14Z")

</div>

I have a Heltec (quite similar to the TTGO). Uplink (join) traffic is received by by gateway on SF7 from 3 km distance with our small town in between. But the join never completes. It will only complete on SF11 when I am 50 m from the gateway in direct line of sight of the gateway’s antenna. I removed the display to get to the LoRa radio. Looks like a capacitor is missing in the reception network to the antenna switch.  
Bugger. The ESP32 and the display work nicely though ☹.

---

<div class="post-metadata">

**Author:** ![damills](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/damills/32/25844_2.png) [@damills](https://www.thethingsnetwork.org/forum/u/damills)\
**Post date:** [July 10, 2019, 7:20pm UTC](https://www.thethingsnetwork.org/forum/t/big-esp32-sx127x-topic-part-3/18436/177 "2019-07-10T19:20:59Z")

</div>

Huge thanks to you @DaveCalway . I wish @bluejedi would add this pin configuration to the summary at the top. It is 100% accurate for the latest ESP32 Heltec v2 HTIT-WB32LA that has the “V2” stamp next to the antenna connector.

---

<div class="post-metadata">

**Author:** ![llucivjansky](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/llucivjansky/32/26304_2.png) [@llucivjansky](https://www.thethingsnetwork.org/forum/u/llucivjansky)\
**Post date:** [July 16, 2019, 7:35am UTC](https://www.thethingsnetwork.org/forum/t/big-esp32-sx127x-topic-part-3/18436/178 "2019-07-16T07:35:53Z")

</div>

Hello Guys.  
I have problem with ttn-abp example.  
I have RFM95W-868-S2 + ESP32-DevKitC + antenna 868MHz SMA  
 ![schematic](https://www.thethingsnetwork.org/forum/uploads/default/original/3X/c/c/ccde1ccd3fdad72dcf88e1c39041f3237ca9c0ee.jpeg)  
// Pin mapping  
// Adapted for Feather M0 per p.10 of [feather]  
const lmic\_pinmap lmic\_pins = {  
.nss = 18, // chip select on feather (rf95module) CS  
.rxtx = LMIC\_UNUSED\_PIN,  
.rst = 14, // reset pin  
.dio = {26, 33, LMIC\_UNUSED\_PIN}, // assumes external jumpers [feather\_lora\_jumper]  
// DIO1 is on JP1-1: is io1 - we connect to GPO6  
// DIO1 is on JP5-3: is D2 - we connect to GPO5  
};

And I get on Starting Failure:  
Starting  
FAILURE  
C:\Users\ladislav.lucivjansky\Documents\Arduino\libraries\MCCI\_LoRaWAN\_LMIC\_library\src\lmic\oslmic.c:53

50: void os\_init() {  
51: if (os\_init\_ex((const void \*)&lmic\_pins))  
52: return;  
53: ASSERT(0);  
54: }

Have you and idea what i do wrong?

---

<div class="post-metadata">

**Author:** ![LoRaTracker](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/loratracker/32/48502_2.png) [@LoRaTracker](https://www.thethingsnetwork.org/forum/u/LoRaTracker)\
**Post date:** [July 16, 2019, 8:28am UTC](https://www.thethingsnetwork.org/forum/t/big-esp32-sx127x-topic-part-3/18436/179 "2019-07-16T08:28:27Z")

</div>

Might be a problem with your code.

Where for instance are you defining the SPI pin numbers for MOSI, MISO and SCK ?

---

<div class="post-metadata">

**Author:** ![bluejedi](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/bluejedi/32/44639_2.png) [@bluejedi](https://www.thethingsnetwork.org/forum/u/bluejedi)\
**Post date:** [July 16, 2019, 8:52am UTC](https://www.thethingsnetwork.org/forum/t/big-esp32-sx127x-topic-part-3/18436/180 "2019-07-16T08:52:22Z")

</div>

> [@llucivjansky](#):
>
> Have you and idea what i do wrong?

I see quite a few things:

- RESET is connected to pin 24 while in the pin mappings it is specified as 14.

- “Pin mapping adapted for Feather M0 per p.10 of [feather]”,  
“// DIO1 is on JP1-1: is io1 - we connect to GPO6”,  
“// DIO1 is on JP5-3: is D2 - we connect to GPO5”.  
These remarks do not relate to your ESP32-DevKitC because it is not compatible with Adafruit Feather M0.

- In the wiring diagram DIO2 is wired but it is not configured in the pin mapping (LMIC\_UNUSED\_PIN instead of 32).

Analysis:

- Your SPI pin wiring is incorrect.  
The pins wired for SPI interface are not the proper SPI pins for your ESP32-DevKitC board.

- You may possibly also not have selected the proper ESP32 board in your Arduino (or PlatformIO) IDE. The matching board definition to use for ESP32-DevKitC probably is “DOIT ESP32 DEVKIT V1”, which defines the SPI ‘pins’ (GPIOs) as follows:

```cpp
    static const uint8_t SS = 5;
    static const uint8_t MOSI = 23;
    static const uint8_t MISO = 19;
    static const uint8_t SCK = 18;

```

- If the wrong board is selected the pin definitions for the SPI interface will most often be incorrect, in which case the software cannot communicate with the RFM95 module which would explain the FAILURE message.

- When using the LMIC library, for normal LoRaWAN operation DIO2 is not required so the connection to DIO2 can be removed.

Questions:

1. What IDE are you using, the Arduino IDE?
2. What board have you selected in your IDE?

Suggestions:

- Wire MISO, MOSI, SCK and (N)SS according to above SPI pin definitions.

- In the IDE use board definition “DOIT ESP32 DEVKIT V1”.

- Correct `'.rst = 14, // reset pin'` so that it matches the actual pin (GPIO) wired to RESET.

- Change `'.nss = 18, // chip select on feather (rf95module) CS'` to  
`.nss = 5`  
or my personal preference, which indicates that the standard SPI SS pin/GPIO is used which also makes it easier to port the code to a different board (because part of standard board definitions):  
`.nss = SS`

- Remove the connection to DIO2.

```auto

```

* * *

_Please read [How do I format my forum post? [HowTo]](https://www.thethingsnetwork.org/forum/t/how-do-i-format-my-forum-post/8735) for **how to format sourcecode in a post**._

---

<div class="post-metadata">

**Author:** ![llucivjansky](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/llucivjansky/32/26304_2.png) [@llucivjansky](https://www.thethingsnetwork.org/forum/u/llucivjansky)\
**Post date:** [July 16, 2019, 10:52am UTC](https://www.thethingsnetwork.org/forum/t/big-esp32-sx127x-topic-part-3/18436/181 "2019-07-16T10:52:12Z")

</div>

board is esp32 devkitc v4 espressif  
[https://www.espressif.com/en/products/hardware/esp32-devkitc/overview](https://www.espressif.com/en/products/hardware/esp32-devkitc/overview)  
IDE is Arduino IDE 1.8.9  
Selected board is ESP32 DevModule

* * *

**new config:**  
DIO2 removed  
Selected DOIT ESP32 DEVKIT V1  
SS = 5;  
MOSI = 23;  
MISO = 19;  
SCK = 18;  
RST = 14;  
DIO1 = 26;  
DIO2 = 33;

**serial monitor:**  
Starting  
10619: EV\_TXSTART  
Packet queued  
199158: EV\_TXCOMPLETE (includes waiting for RX windows)  
3949179: EV\_TXSTART  
Packet queued  
4135922: EV\_TXCOMPLETE (includes waiting for RX windows)

seems better… 🙂

---

<div class="post-metadata">

**Author:** ![bluejedi](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/bluejedi/32/44639_2.png) [@bluejedi](https://www.thethingsnetwork.org/forum/u/bluejedi)\
**Post date:** [July 16, 2019, 10:57am UTC](https://www.thethingsnetwork.org/forum/t/big-esp32-sx127x-topic-part-3/18436/182 "2019-07-16T10:57:58Z")

</div>

> [@llucivjansky](#):
>
> seems better… 🙂

That’s an understatement. 😉

> [@llucivjansky](#):
>
> DIO1 = 26;  
> DIO2 = 33;

Should probably be:

```cpp
DIO0 = 26;
DIO1 = 33;

```

---

<div class="post-metadata">

**Author:** ![llucivjansky](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/llucivjansky/32/26304_2.png) [@llucivjansky](https://www.thethingsnetwork.org/forum/u/llucivjansky)\
**Post date:** [July 16, 2019, 11:03am UTC](https://www.thethingsnetwork.org/forum/t/big-esp32-sx127x-topic-part-3/18436/183 "2019-07-16T11:03:20Z")

</div>

yes  
DIO0 = 26;  
DIO1 = 33;

There was a mismatch when posting…

---

<div class="post-metadata">

**Author:** ![LoRaTracker](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/loratracker/32/48502_2.png) [@LoRaTracker](https://www.thethingsnetwork.org/forum/u/LoRaTracker)\
**Post date:** [July 16, 2019, 11:43am UTC](https://www.thethingsnetwork.org/forum/t/big-esp32-sx127x-topic-part-3/18436/184 "2019-07-16T11:43:11Z")

</div>

> [@llucivjansky](#):
>
> seems better… 🙂

Indeed, SPI decivices do seem to work a lot better when connected to MOSI, MISO and SCK.

---

<div class="post-metadata">

**Author:** ![bluejedi](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/bluejedi/32/44639_2.png) [@bluejedi](https://www.thethingsnetwork.org/forum/u/bluejedi)\
**Post date:** [July 16, 2019, 2:58pm UTC](https://www.thethingsnetwork.org/forum/t/big-esp32-sx127x-topic-part-3/18436/185 "2019-07-16T14:58:21Z")

</div>

> [@llucivjansky](#):
>
> ESP32 DevModule

“ESP32 Dev Module” should work as well but does not define LED\_BUILTIN.

---

<div class="post-metadata">

**Author:** ![llucivjansky](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/llucivjansky/32/26304_2.png) [@llucivjansky](https://www.thethingsnetwork.org/forum/u/llucivjansky)\
**Post date:** [July 17, 2019, 6:56am UTC](https://www.thethingsnetwork.org/forum/t/big-esp32-sx127x-topic-part-3/18436/186 "2019-07-17T06:56:09Z")

</div>

maybe a stupid question, but where i can find Device EUI?  
Its written on RF chip?  
If yes, what code system is on chip and what code system requires TTN?  
this topic doesnt exist [https://www.thethingsnetwork.org/forum/t/how-to-find-the-deveui-on-a-rfm95/3899](https://www.thethingsnetwork.org/forum/t/how-to-find-the-deveui-on-a-rfm95/3899)

---

<div class="post-metadata">

**Author:** ![BoRRoZ](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/borroz/32/44234_2.png) [@BoRRoZ](https://www.thethingsnetwork.org/forum/u/BoRRoZ)\
**Post date:** [July 17, 2019, 7:14am UTC](https://www.thethingsnetwork.org/forum/t/big-esp32-sx127x-topic-part-3/18436/187 "2019-07-17T07:14:17Z")

</div>

you let TTN [generate](https://www.thethingsnetwork.org/docs/devices/registration.html) it in the console and after you add this to your code

---

<div class="post-metadata">

**Author:** ![Gotes](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/gotes/32/47281_2.png) [@Gotes](https://www.thethingsnetwork.org/forum/u/Gotes)\
**Post date:** [July 19, 2019, 10:32am UTC](https://www.thethingsnetwork.org/forum/t/big-esp32-sx127x-topic-part-3/18436/188 "2019-07-19T10:32:27Z")

</div>

[Solved]

Hi, after reading quite a bit and trying everything I could I decided to ask for help here to see if we can make the node work…

I have a **TTGO Lora32 V2** board, I have the “ **Heltec WiFi LoRa 32** ” selected on my arduino IDE and I’m using the following library: [GitHub - mcci-catena/arduino-lmic: LoraWAN-MAC-in-C library, adapted to run under the Arduino environment](https://github.com/mcci-catena/arduino-lmic)

The pin mapping is

> .nss = 18,  
> .rxtx = LMIC\_UNUSED\_PIN,  
> .rst = 14,  
> .dio = {26, 33, 32}‘’

I’m trying to make the “hello world” example work.

> **ABP**  
> In the serial monitor I can see:  
> EV\_TXSTART  
> Packet queued  
> 4135922: EV\_TXCOMPLETE (includes waiting for RX windows)

**SOLVED** : By setting the frecuency correctly on _/project\_config/lmic\_project\_config.h_

**OTAA**  
In serial monitor apears:

> rst:0x1 (POWERON\_RESET),boot:0x13 (SPI\_FAST\_FLASH\_BOOT)  
> configsip: 188777542, SPIWP:0xee  
> clk\_drv:0x00,q\_drv:0x00,d\_drv:0x00,cs0\_drv:0x00,hd\_drv:0x00,wp\_drv:0x00  
> mode:DIO, clock div:2  
> load:0x3fff0018,len:4  
> load:0x3fff001c,len:1100  
> load:0x40078000,len:9232  
> load:0x40080400,len:6412  
> entry 0x400806a8

The payload is delivered correctly but nothing appears on the serial monitor, only the message above, is that right?

---

<div class="post-metadata">

**Author:** ![LoRaTracker](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/loratracker/32/48502_2.png) [@LoRaTracker](https://www.thethingsnetwork.org/forum/u/LoRaTracker)\
**Post date:** [July 19, 2019, 10:48am UTC](https://www.thethingsnetwork.org/forum/t/big-esp32-sx127x-topic-part-3/18436/189 "2019-07-19T10:48:07Z")

</div>

> [@Gotes](#):
>
> I have a **TTGO Lora32 V2** board, I have the “ **Heltec WiFi LoRa 32** ” selected on my arduino IDE and I’m using the following library: [GitHub - mcci-catena/arduino-lmic: LoraWAN-MAC-in-C library, adapted to run under the Arduino environment](https://github.com/mcci-catena/arduino-lmic)

Is that library known to work with ESP32 ?

[Previous page](https://www.thethingsnetwork.org/forum/t/big-esp32-sx127x-topic-part-3/18436.md?page=8)

[Next page](https://www.thethingsnetwork.org/forum/t/big-esp32-sx127x-topic-part-3/18436.md?page=10)
