# Big ESP32 / SX127x topic part 1

**URL:** <https://www.thethingsnetwork.org/forum/t/big-esp32-sx127x-topic-part-1/10247>\
**Category:** End Devices (Nodes)\
**Created:** [October 24, 2017, 4:39pm UTC](https://www.thethingsnetwork.org/forum/t/big-esp32-sx127x-topic-part-1/10247 "2017-10-24T16:39:55Z")\
**Posts on this page:** 20\
**Page:** 12

<div class="post-metadata">

**Author:** ![Verkehrsrot](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/verkehrsrot/32/46588_2.png) [@Verkehrsrot](https://www.thethingsnetwork.org/forum/u/Verkehrsrot)\
**Post date:** [January 9, 2018, 8:08am UTC](https://www.thethingsnetwork.org/forum/t/big-esp32-sx127x-topic-part-1/10247/231 "2018-01-09T08:08:50Z")

</div>

You don’t need to taylor anything in the LMIC lib and there is no need to open the SPI interface to SX1276 with `SPI.begin(...)` if you use [LMIC 1.5 Rel. arduino-2](https://github.com/matthijskooijman/arduino-lmic/releases/tag/1.5.0%2Barduino-2) and some defines:

> // Hardware pin definitions for Heltec LoRa-32 Board with Semtech SX1276 Chip  
> #define SS 18 // ESP32 GPIO18 (Pin18) – SX1276 NSS (Pin19) SPI Chip Select Input  
> #define MOSI 27 // ESP32 GPIO27 (Pin27) – SX1276 MOSI (Pin18) SPI Data Input  
> #define MISO 19 // ESP32 GPIO19 (Pin19) – SX1276 MISO (Pin17) SPI Data Output  
> #define SCK 5 // ESP32 GPIO5 (Pin5) – SX1276 SCK (Pin16) SPI Clock Input  
> #define RST 14 // ESP32 GPIO14 (Pin14) – SX1276 NRESET (Pin7) Reset Trigger Input  
> #define DIO0 26 // ESP32 GPIO26 (Pin15) – SX1276 DIO0 (Pin8) used by LMIC for IRQ RX\_Done & TX\_Done  
> #define DIO1 33 // ESP32 GPIO33 (Pin13) – SX1276 DIO1 (Pin9) used by LMIC for IRQ RX\_Timeout  
> #define DIO2 32 // ESP32 GPIO32 (Pin12) – SX1276 DIO2 (Pin10) not used by LMIC
> 
> // LMIC Pin mapping for HelTec ESP32 WiFi LoRa  
> const lmic\_pinmap lmic\_pins = {  
> .nss = SS,  
> .rxtx = LMIC\_UNUSED\_PIN,  
> .rst = RST,  
> .dio = {DIO0, DIO1, DIO2},  
> };
> 
> // LMIC init  
> os\_init();  
> // Reset the MAC state. Session and pending data transfers will be discarded.  
> LMIC\_reset();

---

<div class="post-metadata">

**Author:** ![mouseclicker](https://www.thethingsnetwork.org/forum/letter_avatar_proxy/v4/letter/m/aeb1de/32.png) [@mouseclicker](https://www.thethingsnetwork.org/forum/u/mouseclicker)\
**Post date:** [January 9, 2018, 9:42am UTC](https://www.thethingsnetwork.org/forum/t/big-esp32-sx127x-topic-part-1/10247/232 "2018-01-09T09:42:07Z")

</div>

I wasn’t aware that there is an arduino-2 release. Thanks for the update. I will switch to this release and get rid of my patching 😀

---

<div class="post-metadata">

**Author:** ![bluejedi](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/bluejedi/32/48549_2.png) [@bluejedi](https://www.thethingsnetwork.org/forum/u/bluejedi)\
**Post date:** [January 9, 2018, 3:01pm UTC](https://www.thethingsnetwork.org/forum/t/big-esp32-sx127x-topic-part-1/10247/233 "2018-01-09T15:01:59Z")

</div>

To be exact: _ **LMIC-Arduino** _ version _ **1.5.0+arduino-2** _

LMIC-Arduino is the official _library name_ and 1.5.0+arduino-2 is the official _library version_ as described in `library.properties`.

You can always find the latest revision here: [https://github.com/matthijskooijman/arduino-lmic/](https://github.com/matthijskooijman/arduino-lmic/)

_(Unfortunately the repository name and URL do not match the library name.)_

---

<div class="post-metadata">

**Author:** ![olbie](https://www.thethingsnetwork.org/forum/letter_avatar_proxy/v4/letter/o/43a26b/32.png) [@olbie](https://www.thethingsnetwork.org/forum/u/olbie)\
**Post date:** [January 9, 2018, 3:36pm UTC](https://www.thethingsnetwork.org/forum/t/big-esp32-sx127x-topic-part-1/10247/234 "2018-01-09T15:36:25Z")

</div>

Seems that it is quite common that those boards come with broken IPEX cables. Both boards I got had faulty ones. After replacing cables, I could easily get 5km.

---

<div class="post-metadata">

**Author:** ![Verkehrsrot](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/verkehrsrot/32/46588_2.png) [@Verkehrsrot](https://www.thethingsnetwork.org/forum/u/Verkehrsrot)\
**Post date:** [January 9, 2018, 7:21pm UTC](https://www.thethingsnetwork.org/forum/t/big-esp32-sx127x-topic-part-1/10247/236 "2018-01-09T19:21:30Z")

</div>

I tried to contact the assumed manufacturer of those boards on [support@heltec.cn](mailto:support@heltec.cn) and got a surprisingly fast and detailed answer:

“The yellow LED can’t set by software, speak frankly that’s a bad design, and recently we found the impendence matching part lack a capacitance, we will fix the problems in next version, if you time is not in a hurry, you can wait our new version(about in the middle of March, next mouth is Chinese new year, we will have a long holiday).”

---

<div class="post-metadata">

**Author:** ![ggeorgiou007](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/ggeorgiou007/32/33611_2.png) [@ggeorgiou007](https://www.thethingsnetwork.org/forum/u/ggeorgiou007)\
**Post date:** [January 10, 2018, 11:17am UTC](https://www.thethingsnetwork.org/forum/t/big-esp32-sx127x-topic-part-1/10247/237 "2018-01-10T11:17:33Z")

</div>

YES!!

I confirm that i got 8.3 KM range with the STUPID antennas (the coil antennas) - 433 MHZ!! (be carefull with your frequency!)

HOWEvER

- After 1 day i saw that these antennas are REALLY bad - Most probably the get shortcircuited or disconnected

- I have ordered some other antenas for 433 Mhz - They are supposed to be +6db!

I have tested them and i would say that the signal strengh has improvved a lot! for example i get -16DB when the antennas are 10cm appart compared to -40 or more with the standard coil antennas  
(search in ALI 433Mhz 6dbi high gain LoRa antenna internal aerial piamater FPC 27\*17mm IPEX connector)

---

<div class="post-metadata">

**Author:** ![piair](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/piair/32/11195_2.png) [@piair](https://www.thethingsnetwork.org/forum/u/piair)\
**Post date:** [January 10, 2018, 1:49pm UTC](https://www.thethingsnetwork.org/forum/t/big-esp32-sx127x-topic-part-1/10247/238 "2018-01-10T13:49:03Z")

</div>

Just wanted to stop by and say thank you to all the early posters / testers for their help in getting the board online.

I bought [this one](https://www.aliexpress.com/item/868MHz-915MHz-SX1276-ESP32-LoRa-0-96-Inch-Blue-OLED-Display-Bluetooth-WIFI-Lora-Kit-32/32840258107.html) on Aliexpress. Don’t think I would have been able to do it without this topic.

![](https://www.thethingsnetwork.org/forum/uploads/default/original/2X/6/6486b93c252f3ce355e12bb402835b094ef09a5f.jpg)

I did a write-up of the process [here](https://ictoblog.nl/2018/01/10/mijn-eerste-chinese-esp32-verbonden-met-the-things-network). It is in Dutch, so might not be of much help to most readers here. I also shared[my Arduino code](https://github.com/PiAir/esp32-sx1276) using ABP + the OLED screen for TTN, the example listed here in the topic uses OTAA.

---

<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:** [January 10, 2018, 1:54pm UTC](https://www.thethingsnetwork.org/forum/t/big-esp32-sx127x-topic-part-1/10247/239 "2018-01-10T13:54:43Z")

</div>

> [@piair](#):
>
> It is in Dutch

but still a great write up… tnx !

---

<div class="post-metadata">

**Author:** ![bluesensing1](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/bluesensing1/32/42705_2.png) [@bluesensing1](https://www.thethingsnetwork.org/forum/u/bluesensing1)\
**Post date:** [January 10, 2018, 8:08pm UTC](https://www.thethingsnetwork.org/forum/t/big-esp32-sx127x-topic-part-1/10247/240 "2018-01-10T20:08:02Z")

</div>

Thank you very much.  
I think, this is a very important contribution.  
btw.: using google translator, no real problem in german language.

But:  
What about effectice reachability?  
Did you test this already? Is it really as crappy as reported above some times… about 10 meters or so… or did you reach KILOMETERS…?

thx.

bluesensing

---

<div class="post-metadata">

**Author:** ![piair](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/piair/32/11195_2.png) [@piair](https://www.thethingsnetwork.org/forum/u/piair)\
**Post date:** [January 10, 2018, 8:23pm UTC](https://www.thethingsnetwork.org/forum/t/big-esp32-sx127x-topic-part-1/10247/241 "2018-01-10T20:23:10Z")

</div>

I only have a single channel LoPy gateway to test with myself. It would require some driving around to find nearby “real” gateways to test. I went from “reading all the documents” to getting it online last night while using the commute to work this morning to document it…  
I’ll see if I can take it to do some distance checking this weekend and will report back.

---

<div class="post-metadata">

**Author:** ![bluesensing1](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/bluesensing1/32/42705_2.png) [@bluesensing1](https://www.thethingsnetwork.org/forum/u/bluesensing1)\
**Post date:** [January 10, 2018, 8:27pm UTC](https://www.thethingsnetwork.org/forum/t/big-esp32-sx127x-topic-part-1/10247/242 "2018-01-10T20:27:22Z")

</div>

Of course this could be understood. But i am acurious person you should know…

That would be very friendly. Thank you.

---

<div class="post-metadata">

**Author:** ![Verkehrsrot](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/verkehrsrot/32/46588_2.png) [@Verkehrsrot](https://www.thethingsnetwork.org/forum/u/Verkehrsrot)\
**Post date:** [January 10, 2018, 9:04pm UTC](https://www.thethingsnetwork.org/forum/t/big-esp32-sx127x-topic-part-1/10247/243 "2018-01-10T21:04:03Z")

</div>

where did you get that small case?

---

<div class="post-metadata">

**Author:** ![arjanvanb](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/arjanvanb/32/46626_2.png) [@arjanvanb](https://www.thethingsnetwork.org/forum/u/arjanvanb)\
**Post date:** [January 10, 2018, 9:09pm UTC](https://www.thethingsnetwork.org/forum/t/big-esp32-sx127x-topic-part-1/10247/244 "2018-01-10T21:09:12Z")

</div>

Maybe here:

> [@arjanvanb](#):
>
> The same [shop](https://www.aliexpress.com/store/2787042) is selling [a case](https://www.aliexpress.com/item/~/32839804808.html), which certainly needs a different WiFi antenna to fit the module. It’s also available in black:
> 
> ![image](https://www.thethingsnetwork.org/forum/uploads/default/original/2X/5/59a663f44281c5d84dd38879cbe591dd08baf092.jpg)

---

<div class="post-metadata">

**Author:** ![piair](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/piair/32/11195_2.png) [@piair](https://www.thethingsnetwork.org/forum/u/piair)\
**Post date:** [January 10, 2018, 9:56pm UTC](https://www.thethingsnetwork.org/forum/t/big-esp32-sx127x-topic-part-1/10247/245 "2018-01-10T21:56:30Z")

</div>

That is where I bought it, but it now says “no longer available”.

The case isn’t worth the money (even though it is cheap).  
The board doesn’t really fit, the internal screw holes are wrong meaning I had to use scotch tape to keep the LCD in front of the hole.

This might be a better option: [https://www.thingiverse.com/thing:2581459](https://www.thingiverse.com/thing:2581459) (mentioned before) since it also leaves an opening for the sensors. Even though it does not allow access to the reset button with the lid closed.

---

<div class="post-metadata">

**Author:** ![Verkehrsrot](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/verkehrsrot/32/46588_2.png) [@Verkehrsrot](https://www.thethingsnetwork.org/forum/u/Verkehrsrot)\
**Post date:** [January 10, 2018, 10:20pm UTC](https://www.thethingsnetwork.org/forum/t/big-esp32-sx127x-topic-part-1/10247/246 "2018-01-10T22:20:04Z")

</div>

I printed the thingiverse case already. There is also another one on thingiverse, i tried that one, too, see enclosed picture. Both have flaws, e.g. missing mounting holes for antenna, measurements do not fit exactly. Only for testing purposes usable.

![Thingiverse-case](https://www.thethingsnetwork.org/forum/uploads/default/original/2X/f/f0e0b59740fb3f292ca305abe4aa24291d8f774c.jpg)

---

<div class="post-metadata">

**Author:** ![piair](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/piair/32/11195_2.png) [@piair](https://www.thethingsnetwork.org/forum/u/piair)\
**Post date:** [January 10, 2018, 10:23pm UTC](https://www.thethingsnetwork.org/forum/t/big-esp32-sx127x-topic-part-1/10247/247 "2018-01-10T22:23:54Z")

</div>

So but you created a new version the with the mounting hole for the antenna etc. ?  
Would you mind sharing the .stl files for the enhanced version?

---

<div class="post-metadata">

**Author:** ![Verkehrsrot](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/verkehrsrot/32/46588_2.png) [@Verkehrsrot](https://www.thethingsnetwork.org/forum/u/Verkehrsrot)\
**Post date:** [January 10, 2018, 10:27pm UTC](https://www.thethingsnetwork.org/forum/t/big-esp32-sx127x-topic-part-1/10247/248 "2018-01-10T22:27:13Z")

</div>

No, i modified it by “craftmanship” after printing 🙂  
Unfortunately there are only .stl files on thingiverse for the smaller case, no cad files. So you can’t edit them. And it would’nt be legal to post them here because the author gave no licence on thingiverse. I ordered the case from the thingiverse print service, Treatstock.

---

<div class="post-metadata">

**Author:** ![Hutje](https://www.thethingsnetwork.org/forum/letter_avatar_proxy/v4/letter/h/43a26b/32.png) [@Hutje](https://www.thethingsnetwork.org/forum/u/Hutje)\
**Post date:** [January 11, 2018, 9:25am UTC](https://www.thethingsnetwork.org/forum/t/big-esp32-sx127x-topic-part-1/10247/249 "2018-01-11T09:25:20Z")

</div>

I have made a LoRa Single Channel gateway, this works perfectly with the ttgo, but I can’t get the ttgo and heltec to work with the lmic code… It is stuck at EV\_JOINING…

EDIT: Got the ABP working, but only when I simulate a downlink, then it will send Hello World, when I send nothing, nothing will be send by the node.

---

<div class="post-metadata">

**Author:** ![Don-Hege](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/don-hege/32/25844_2.png) [@Don-Hege](https://www.thethingsnetwork.org/forum/u/Don-Hege)\
**Post date:** [January 12, 2018, 8:06am UTC](https://www.thethingsnetwork.org/forum/t/big-esp32-sx127x-topic-part-1/10247/250 "2018-01-12T08:06:14Z")

</div>

I got the same device as you now. Once it arrives, I’ll follow your instructions and see how it works (although I don’t speak Dutch, but German is not that differnt 😉 ).

---

<div class="post-metadata">

**Author:** ![Verkehrsrot](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/verkehrsrot/32/46588_2.png) [@Verkehrsrot](https://www.thethingsnetwork.org/forum/u/Verkehrsrot)\
**Post date:** [January 12, 2018, 8:55am UTC](https://www.thethingsnetwork.org/forum/t/big-esp32-sx127x-topic-part-1/10247/251 "2018-01-12T08:55:27Z")

</div>

Are your sure that your single channel gateway is downlink capabable? And if so, sure that your heltec/ttgo node receives downlink on the same (single) channel where your single channel gateway sends it out?

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

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