Big ESP32 / SX127x topic part 1

and one more comment: There is a small bug in sketch of post #123:
if (LMIC.txrxFlags & TXRX_ACK)
Serial.println(F(“Received ack”));
u8x8.drawString(0, 7, “Received ACK”);

should be

     if (LMIC.txrxFlags & TXRX_ACK) {
          Serial.println(F("Received ack"));
          u8x8.drawString(0, 7, "Received ACK");
        }

There are missing braces. Otherwise OLED always shows Received ACK even if there is none.

1 Like

Hello, I also got the reset of the ESP32.
I am working on a ESP32 Mapping Device.
The RTOS seemed to me like a good oportunity, to parse GPS, blink LEDs , checking distances, all the same time.
At first I tried to run the LMIC loop on Core 0 in a Task with high priority., but it is also not working, when I call the lmic loop in the main loop.
I am using semaphores to ensure, that there is only one function call to lmic functions at the same time.

Set TX Data
abort() was called at PC 0x40083c29 on core 1

Backtrace: 0x40087280:0x3ffc0710 0x4008737f:0x3ffc0730 0x40083c29:0x3ffc0750 0x40083d49:0x3ffc0780 0x400dfbea:0x3ffc07a0 0x400dd035:0x3ffc0ab0 0x400d3525:0x3ffc0b00 0x400d426c:0x3ffc0b40 0x400d42a6:0x3ffc0b60 0x400d1042:0x3ffc0b80 0x400d1272:0x3ffc0ba0 0x400d12bf:0x3ffc0bc0 0x40080d91:0x3ffc0be0 0x40081565:0x3ffc0c00 0x400d91c7:0x00000000

Rebooting...
ets Jun  8 2016 00:22:57

rst:0xc (SW_CPU_RESET),boot:0x17 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:1
load:0x3fff0018,len:4
load:0x3fff001c,len:812
load:0x40078000,len:0
load:0x40078000,len:11392
entry 0x40078a9c
LoRaWAN Test Node by Samuel Puschacher
GPS parsing on Core: 0
LED fading on Core: 1
RXMODE_RSSI
LMIC Loop on Core: 0
Released

This error occurs, when calling the tx Data function

Install video of the TTGO LORA32

any file likes 4 3D printing?

I’ve been struggling with range (never get over 10m, let alone km!) - could you just confirm what you did to get that range? What module did you buy - was it Heltec or TTGO or something else - and did you use the included antenna or your own?
Would be great to know as these boards would be good, if they had any range!

Double check if you have the correct version.
I was also struggling with range, saw in my RTL-SDR that the packets were very very weak until I set it at 433 MHz and presto! Strong signal.
Anyone interested in a 433MHz version?

1 Like

Any experts here that can tell me what clues there might be on the hardware to prove it is 433Mhz circuitry rather than 868Mhz? - e.g. resistor, capacitor values or something? I want to know in part so I can be sure it is 433 or 868 so that I’m not wasting my time - and partly get a refund from aliexpress if I’ve been sent the wrong thing!

1 Like

Thanks Paul - sounds like it could be the reason. How did you make that change? (I’m connecting to a TTN gateway, so not sure I can do what you’re suggesting – but I guess I can if I set the two up to be gateway / node etc…)

Actually it was my own fault, ordered the wrong one. Look at the part number printed on the board.
HTIT-WB32LA = 433 MHz
HTIT-WB32LA915 = 868 - 915 MHZ

Mine just says TTGO - I ordered from here:
https://www.aliexpress.com/item/868MHz-915MHz-SX1276-ESP32-LoRa-0-96-Inch-Blue-OLED-Display-Bluetooth-WIFI-Lora-Kit-32/32840258107.html
– which definitely says 868!
Chipset says SX1276-1733-151074; where else can I be looking to see if it’s a 433? (SX1276 is full range from 100Mhz to 1000Mhz?)
after a ‘complaint’/dispute - the seller has now suggested I try their V2.0 instead:
https://aliexpress.com/store/product/2-Teile-los-TTGO-LORA32-V2-0-868-915-Mhz-ESP32-LoRa-OLED-0-96-Zoll/2787042_32845688586.html?spm=a2g0x.12010615.0.0.b0ac52bFHsboG

wow this was exactly where I was looking for.
It works fine!

Hi Paul,

Looked at the back of my boards (ordered explicitly 868 but have not tested them yet)… see this picture:
heltec
it does not say (WB32LA915)…
does yours??

what about this one?

http://www.rocketscream.com/blog/product/mini-ultra-pro-v2-with-radio/

I read DISCONTINUED for that one

Mine reads HTIT-WB32LA but without the 868-915

That ‘v2.0’ version’s 2.4GHz antenna placement looks (‘much’) better than their first version but still a very sub-optimal position. It should have been at the top, not covered by a PCB and not surrounded by metal header pins (which badly impact Wifi performance).

Also the battery connector has improved. No awkward vertical/downwards pointing connector position anymore but a horizontal/side-wards position.
But strange (just like Heltec Wifi LoRa 32) that they let point the connector/wire inwards instead of outwards of the board.

The mentioned code from post #123 implements ABP, not OTAA. So there is no initial network joining procedure. Your radio just starts firing with the parameters setup in the code.

The additional SPI.begin is not necessary, not in the main code, neither in hal.cpp. SPI is handled by LMIC library, with the parameters defined by the LMIC pin definition struct in the main code.

Hi Nicbkw,

Could you give me some help? I used the LMiC library from Mathijs Kooiman, changed the pin mapping with .dio = {26, 33, 32}, didn’t make any changes in config.h.
Starting the software gives:

Starting
Packet queued
2400: EV_JOINING

and then retries after a while. Any suggestions?

Thanks, Jeroen

Hi Nickbw,
I forgot to reverse the keys, it’s working like a charm now!
Best regards, Jeroen

1 Like

Got onReceive(callback) to work for my Heltec ESP32/OLED Board. I’ve used:

#define SS 18
#define RST 14
#define DI0 33 // ← first got the IRQ pin mapped bit DI0 is at GPIO33…

LoRa.setPins(SS, RST, DI0);

The Library only seems to use DI0 for for that onReceive Interrupt/callback: arduino-LoRa/src/LoRa.cpp at master · sandeepmistry/arduino-LoRa · GitHub

Thanks for the clarification of the joining, that’s good to know! Seems I have also a board with very limited distance, need to get closer to a gateway.
Regarding the SPI, I did not add an additional SPI.begin(). I changed the code in hal.cpp of the LMIC library to use the pins from the pinout diagram and not the defaults as in SPI.begin(). It would be good to make this configurable in LMIC at some point. Thanks again!