# 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:** 12

<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:** [August 15, 2019, 9:52pm UTC](https://www.thethingsnetwork.org/forum/t/big-esp32-sx127x-topic-part-3/18436/230 "2019-08-15T21:52:21Z")

</div>

> [@Italque](#):
>
> maybe it’s a problem related to a library that I use

Unless you provide any concrete details it will be very difficult for others to provide you with actual help.

---

<div class="post-metadata">

**Author:** ![Paul\_Stewart](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/paul_stewart/32/46922_2.png) [@Paul\_Stewart](https://www.thethingsnetwork.org/forum/u/Paul_Stewart)\
**Post date:** [August 15, 2019, 10:56pm UTC](https://www.thethingsnetwork.org/forum/t/big-esp32-sx127x-topic-part-3/18436/231 "2019-08-15T22:56:50Z")

</div>

I have used this library successfully with the TTGo V2

> **[embeddedadventures/BME280](https://github.com/embeddedadventures/BME280)**
>
> Bosch BME280 Embedded Adventures MOD-1022 weather multi-sensor Arduino code - embeddedadventures/BME280

cheers  
Paul

---

<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:** [August 16, 2019, 5:51am UTC](https://www.thethingsnetwork.org/forum/t/big-esp32-sx127x-topic-part-3/18436/232 "2019-08-16T05:51:38Z")

</div>

1. Concurrent (not mutexed) access by two (or more) RTOS tasks to i2c bus

---

<div class="post-metadata">

**Author:** ![haraldkofler](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/haraldkofler/32/25844_2.png) [@haraldkofler](https://www.thethingsnetwork.org/forum/u/haraldkofler)\
**Post date:** [August 16, 2019, 8:46am UTC](https://www.thethingsnetwork.org/forum/t/big-esp32-sx127x-topic-part-3/18436/233 "2019-08-16T08:46:04Z")

</div>

Thanks Verkehrsrot,

I cloned the paxcounter ([https://github.com/cyberman54/ESP32-Paxcounter](https://github.com/cyberman54/ESP32-Paxcounter)) and set ii up as described in the readme. The lora start and is switching from JOINING to JOIN WAIT. Left the board in this state for several hours and also tried to drive around in the car in zones which according to ttnmapper should be covered, but the paxcounter keeps on JOIN WAIT. Is there any additional cabling needed for TTGO T3 2.1 1.6? Something else I can check?

Thanks again

---

<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:** [August 16, 2019, 9:41am UTC](https://www.thethingsnetwork.org/forum/t/big-esp32-sx127x-topic-part-3/18436/234 "2019-08-16T09:41:09Z")

</div>

Please try again with current version 1.9.x from development branch, and report here if you see a difference in joining behaviour.

No additional cabling needed for that board.

---

<div class="post-metadata">

**Author:** ![haraldkofler](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/haraldkofler/32/25844_2.png) [@haraldkofler](https://www.thethingsnetwork.org/forum/u/haraldkofler)\
**Post date:** [August 16, 2019, 11:28am UTC](https://www.thethingsnetwork.org/forum/t/big-esp32-sx127x-topic-part-3/18436/235 "2019-08-16T11:28:24Z")

</div>

I switched to the development branch- but I do not understand what you mean by version 1.9.x? Do I have to specify a version?

With the development branch I do get following logs:

[W][lorawan.cpp:462] lora\_enqueuedata(): LORA sendqueue is full  
[I][senddata.cpp:73] sendCounter(): Counter cleared  
[W][lorawan.cpp:462] lora\_enqueuedata(): LORA sendqueue is full  
[I][cyclic.cpp:57] doHousekeeping(): Voltage: 4878mV  
[I][lorawan.cpp:340] onEvent(): JOIN WAIT  
[I][cyclic.cpp:57] doHousekeeping(): Voltage: 4862mV  
[W][lorawan.cpp:462] lora\_enqueuedata(): LORA sendqueue is full  
[I][senddata.cpp:73] sendCounter(): Counter cleared  
[W][lorawan.cpp:462] lora\_enqueuedata(): LORA sendqueue is full  
[I][cyclic.cpp:57] doHousekeeping(): Voltage: 4564mV  
[I][cyclic.cpp:57] doHousekeeping(): Voltage: 4660mV  
[W][lorawan.cpp:462] lora\_enqueuedata(): LORA sendqueue is full  
[I][senddata.cpp:73] sendCounter(): Counter cleared  
[W][lorawan.cpp:462] lora\_enqueuedata(): LORA sendqueue is full  
[I][cyclic.cpp:57] doHousekeeping(): Voltage: 4750mV  
[I][cyclic.cpp:57] doHousekeeping(): Voltage: 4244mV  
[W][lorawan.cpp:462] lora\_enqueuedata(): LORA sendqueue is full  
[I][senddata.cpp:73] sendCounter(): Counter cleared  
[W][lorawan.cpp:462] lora\_enqueuedata(): LORA sendqueue is full

It is the same as with the master branch

---

<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:** [August 16, 2019, 11:29am UTC](https://www.thethingsnetwork.org/forum/t/big-esp32-sx127x-topic-part-3/18436/236 "2019-08-16T11:29:59Z")

</div>

You’re getting no join. Check your TTN coverage.

---

<div class="post-metadata">

**Author:** ![haraldkofler](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/haraldkofler/32/25844_2.png) [@haraldkofler](https://www.thethingsnetwork.org/forum/u/haraldkofler)\
**Post date:** [August 18, 2019, 6:58pm UTC](https://www.thethingsnetwork.org/forum/t/big-esp32-sx127x-topic-part-3/18436/237 "2019-08-18T18:58:07Z")

</div>

Thanks Verkehrsrot.  
Indeed it has been a problem of coverage. I drove next to the next free gateway and there it started. I think this gateway is not set up proberly, as I worked only up to a distance of approx. 20m from this gateway.

---

<div class="post-metadata">

**Author:** ![Italque](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/italque/32/27251_2.png) [@Italque](https://www.thethingsnetwork.org/forum/u/Italque)\
**Post date:** [August 27, 2019, 8:51pm UTC](https://www.thethingsnetwork.org/forum/t/big-esp32-sx127x-topic-part-3/18436/238 "2019-08-27T20:51:14Z")

</div>

Hi bluejedi,

Sorry for the late reply, I found a solution, but before that, I will answer your questions:

- The board that I select in the Arduino IDE is “Heltec Wifi LoRa32”

- The first library I used was Adafruit, then I switched to Sparkfun and then  
returned to Adafruit.

- I initialized the library with bme.begin ().

In any case I found out that the problem is due to a two different types of BME280 sensors smaller than usual, take a look [here](http://i.ebayimg.com/images/i/281745479989-0-1/s-l1000.jpg) and [here](https://raw.githubusercontent.com/rm-hull/bme280/master/doc/bme280-sensor.jpg). While with [this](https://nettigo.eu/system/images/2382/original.jpg?1503322940) type no problem, everything works fine even with the Adafruit library. It remains to understand why all the sensors of the aforementioned type don’t work properly. I tried a dozen of them all working perfectly with other projects.  
Thank you for the support you are giving me @Sandgroper @bluejedi@Paul_Stewart !

---

<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:** [August 27, 2019, 10:20pm UTC](https://www.thethingsnetwork.org/forum/t/big-esp32-sx127x-topic-part-3/18436/239 "2019-08-27T22:20:50Z")

</div>

The smaller ones are special 5.0V versions and have a 3.3V voltage regulator.  
When using these with 3.3V it may be possible that supply voltage gets too low which could explain the problems. I suspect that the chip on the left is a level converter which may also cause issues when used with 3.3V.

![capture%202019-08-27%2022%C2%B757%C2%B711](https://www.thethingsnetwork.org/forum/uploads/default/original/3X/0/6/06fbaefd6a90e4da301e9de514ec258ced8f4e03.png) ![capture%202019-08-27%2022%C2%B756%C2%B749](https://www.thethingsnetwork.org/forum/uploads/default/original/3X/4/8/488d5ff0d0cb9bb57f15304309ddca9af6b8896e.png)

My BME280’s are the larger ones with 6 pins (‘3.3V version’).  
I noticed that Adafruit BME280 library uses 0x77 as default I2C address while my Chinese BME280’s have 0x76 as default address (the Adafruit sensor boards probably use 0x77 as default address).

So for my Chinese BME280 sensor boards I explicitly have to specify the proper I2C address when calling BME280.begin() i.e. bme280.begin(BME280\_ADDRESS\_ALTERNATE, &Wire) or just bme280.begin(0x76, &Wire).

Defined are:  
BME280\_ADDRESS (0x77)  
BME280\_ADDRESS\_ALTERNATE (0x76)

> [@Italque](#):
>
> While with [this](https://i.ebayimg.com/images/i/281833553984-0-1/s-l1000.jpg) type no problem

I think you mean the six pin BME280 board but that image is a BMP280 board. 😉  
_(Same PCB is used for both BMP280 and BME280 sensors.)_

---

<div class="post-metadata">

**Author:** ![Sandgroper](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/sandgroper/32/46619_2.png) [@Sandgroper](https://www.thethingsnetwork.org/forum/u/Sandgroper)\
**Post date:** [August 28, 2019, 2:26am UTC](https://www.thethingsnetwork.org/forum/t/big-esp32-sx127x-topic-part-3/18436/240 "2019-08-28T02:26:42Z")

</div>

Your software could try both. Test is the sensor responds to 0x77 and if it does not respond then try the other address.

---

<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:** [August 28, 2019, 7:07am UTC](https://www.thethingsnetwork.org/forum/t/big-esp32-sx127x-topic-part-3/18436/241 "2019-08-28T07:07:03Z")

</div>

BOSCH datasheet warns to not leave the address selection pin floating, so it may be worth checking if the pcb designer did his/her RTFM homework and took care of this…

> The 7-bit device address is 111011x. The 6 MSB bits are fixed. The last bit is changeable by SDO value and can be changed during operation. Connecting SDO to GND results in slave address 1110110 (0x76); connection it to VDDIO results in slave address 1110111 (0x77), which is the same as BMP280’s I²C address. **The SDO pin cannot be left floating; if left floating, the I²C address will be undefined.**

---

<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:** [August 29, 2019, 1:15pm UTC](https://www.thethingsnetwork.org/forum/t/big-esp32-sx127x-topic-part-3/18436/242 "2019-08-29T13:15:06Z")

</div>

## LoRaMac-node for ESP32 available

**Can be used for Heltec ESP32 LoRa products only**

Essential parts of the source code are obfuscated (compiled to assembly).

> “An unique license relate to Chip ID is needed, you can check your license here: [查询序列号](http://www.heltec.cn/search/)”

Great initiative but mixed feelings because of its closed character and license requirement per node. Applications using this library are limited to Heltec hardware which limits wider application  
(therefore less attractive for developers). 👍 😃 🤔 🙄 😞 👎

> **[GitHub - HelTecAutomation/ESP32\_LoRaWAN: Transplanted from Semtech...](https://github.com/HelTecAutomation/ESP32_LoRaWAN)**
>
> Transplanted from Semtech LoRaWAN(https://github.com/Lora-net/LoRaMac-node) protocol to "ESP32 + Arduino" platform. Use RTC, support deep sleep, only working with ESP32 + LoRa boards made by HelTec Automation(TM). Need a unique license to use it.

Also see: [Overview of LoRaWAN Libraries [HowTo] - #11 by bluejedi](https://www.thethingsnetwork.org/forum/t/overview-of-lorawan-libraries-lmic-loramac-node-and-their-variations/24692/11)

Has anyone used it already?

---

<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:** [August 29, 2019, 6:56pm UTC](https://www.thethingsnetwork.org/forum/t/big-esp32-sx127x-topic-part-3/18436/243 "2019-08-29T18:56:15Z")

</div>

I don’t think the ecosystem of Heltec hardware is worth to accept a vendor lock-in.

Meanwhile good old LMiC stack is close to a LORAWAN 1.0.3 certification, thanks to the great work by Terry Moore: [https://github.com/mcci-catena/arduino-lmic](https://github.com/mcci-catena/arduino-lmic)

---

<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:** [August 29, 2019, 7:04pm UTC](https://www.thethingsnetwork.org/forum/t/big-esp32-sx127x-topic-part-3/18436/244 "2019-08-29T19:04:28Z")

</div>

> [@Verkehrsrot](#):
>
> I don’t think the ecosystem of Heltec hardware is worth to accept a vendor lock-in.

Correct.  
Even with current developments on LMIC it would still be ‘nice’ to have LoRaMac-node implementations more widely available.

---

<div class="post-metadata">

**Author:** ![connectix](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/connectix/32/38084_2.png) [@connectix](https://www.thethingsnetwork.org/forum/u/connectix)\
**Post date:** [September 2, 2019, 6:03am UTC](https://www.thethingsnetwork.org/forum/t/big-esp32-sx127x-topic-part-3/18436/245 "2019-09-02T06:03:23Z")

</div>

I made a sketch for the TTGO-LoRa32-V2.1 (version T3\_v1.6 20180606).

I am looking for people to test it. It has ABP and otaa activation. It also supports the OLED display. You can check it on: [https://github.com/rwanrooy/TTGO-LoRa32-V2.1-TTN](https://github.com/rwanrooy/TTGO-LoRa32-V2.1-TTN)

---

<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:** [September 2, 2019, 8:34am UTC](https://www.thethingsnetwork.org/forum/t/big-esp32-sx127x-topic-part-3/18436/246 "2019-09-02T08:34:38Z")

</div>

# ESP32-S2

Espressif [recently introduced](https://www.espressif.com/en/news/espressif-announces-%E2%80%A8esp32-s2-secure-wi-fi-mcu) a new member of the ESP32 family: the **ESP32-S2**

![ESP32-S2%20Architecture](https://www.thethingsnetwork.org/forum/uploads/default/original/3X/e/1/e1896747b8c69d9b30bd8c4410075768e954f324.png)  
ESP32-S2 datasheet is available [here](https://www.espressif.com/sites/default/files/documentation/esp32-s2_datasheet_en.pdf)

### Comparison with regular ESP32

_(Source: [https://esp32.com/viewtopic.php?t=10632](https://esp32.com/viewtopic.php?t=10632))_

#### What do we gain over ESP32?

- Xtensa **LX7**
- **USB** FS OTG
- Support for larger external SPI **RAM up to 128MB**
- Support for larger external SPI **Flash up to 1GB**
- More GPIOs (39 gpio + 1 gpi, 22 rtcio)
- 14/15 ch Waterproof touch sense? & Proximity sensing
- Improved SPI (OSPI)
- Improved ULP (RISC-V)
- WiFi Indoor Positioning (802.11mc)?
- V2I (802.11p?)
- Lower cost
- External ram access from instruction cache
- Auto-zero ADC
- PSRAM encryption

#### What do we lose?

- **Bluetooth**
- **### Dual core ###**
- **RAM space** (320KB vs 520KB)
- **ROM space** (128KB vs 448KB)
- UART (2 vs 3)
- **SDMMC**
- MCPWM
- Ethernet
- I2S (1 vs 2, no PDM)
- RMT (4ch vs 8ch)
- PCNT (4 vs 8)

```auto

```

* * *

# ESP32-SOLO-1

ESP32-SOLO-1 is a new Espressif module that is based on the new ESP32-S2.

Available here:

> **[US $2.68 |ESP32 ESP32 SOLO 1 ESP32 S0WD single core chip Integrated SPI flash...](https://www.aliexpress.com/item/4000076683865.html)**
>
> Smarter Shopping, Better Living! Aliexpress.com

---

<div class="post-metadata">

**Author:** ![MOS-FET](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/mos-fet/32/35697_2.png) [@MOS-FET](https://www.thethingsnetwork.org/forum/u/MOS-FET)\
**Post date:** [September 4, 2019, 6:19pm UTC](https://www.thethingsnetwork.org/forum/t/big-esp32-sx127x-topic-part-3/18436/247 "2019-09-04T18:19:40Z")

</div>

Hi bluejedi,

yes I have used this source code and board from Heltec, but I found it a little bit complicate due to make for each board a new compilation because of the unique license. Also after some good joins during test also the OTAA fails. Why I can’t found out. ADB work with lmic fine.  
Now I’m go to test deep sleep and OTAA as well.

I uses also the lmic from mcci-catena now.  
I found two pin configuration for V2 of this board:

I uses:

```
//LMIC LoRa module pin configuration
//For Heltec Wifi LoRa 32 use:
const lmic_pinmap lmic_pins = {
    .nss = 18, 
    .rxtx = LMIC_UNUSED_PIN,
    .rst = 14,
    .dio = {/*dio0*/ 26, /*dio1*/ 35, /*dio2*/ 34}
};
and also I found:

//LMIC LoRa module pin configuration
//For Heltec Wifi LoRa 32 use:
const lmic_pinmap lmic_pins = {
    .nss = 18, 
    .rxtx = LMIC_UNUSED_PIN,
    .rst = 14,
    .dio = {/*dio0*/ 26, /*dio1*/ 34, /*dio2*/ 35}
};

```

only changed in dio 34 and 35. Why? For me it seems to be clear the first one. Have others other experience?

Also OTAA fails because the board misses the agreed downlink. Also in ADP downlink seems to be critical.

Perhaps I’ll make LMIC with interrupt:  
[https://www.thethingsnetwork.org/forum/t/big-esp32-sx127x-topic-part-1/10247/11](https://www.thethingsnetwork.org/forum/t/big-esp32-sx127x-topic-part-1/10247/11)

Hope to help other to go further with his project and this board.

---

<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:** [September 4, 2019, 10:37pm UTC](https://www.thethingsnetwork.org/forum/t/big-esp32-sx127x-topic-part-3/18436/248 "2019-09-04T22:37:25Z")

</div>

> [@MOS-FET](#):
>
> I have used this source code and board from Heltec, but I found it a little bit complicate due to make for each board a new compilation because of the unique license. Also after some good joins during test also the OTAA fails.

A real pity that their LoRaMac-node port to ESP32 is not open / not available for general use. So there still appear to be issues with it. Because not open there will be much less people that are going to test it and less people to report any issues.

> [@MOS-FET](#):
>
> For me it seems to be clear the first one.

Yes for Heltec WiFi LoRa 32 V2 the first you listed is correct (the second is incorrect):

```cpp
const lmic_pinmap lmic_pins = {
  .nss = 18,
  .rxtx = LMIC_UNUSED_PIN,
  .rst = 14,
  .dio = {/*dio0*/ 26, /*dio1*/ 35, /*dio2*/ 34 }
};

```

Also note that GPIO ports used for I2C OLED display are not the standard ones for I2C:  
Display-SDA = 4 _(not 21, SDA=21)_  
Display-SCL = 15 _(not 22, SCL=22)_  
Display-RST = 16

---

<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:** [September 6, 2019, 9:05am UTC](https://www.thethingsnetwork.org/forum/t/big-esp32-sx127x-topic-part-3/18436/249 "2019-09-06T09:05:47Z")

</div>

Check out latest paxcounter version 1.8.0, it runs LMiC controled by hardware Interrupts. I found the bug in MCCI LMiC which broke this feature last week and made a Pull Request, this was merged meanwhile.

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

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