ESP32 LoRa 32 V2 + TTN

Hi,

I’m having problems activating my Device with TTN.org
I’ve installed the MCCI LoRa LMIC library as suggested in this (official) TTN tutorial:
https://www.thethingsnetwork.org/community/birmingham-al/post/heltec-esp32-lorawan-tutorial-published

I’ve followed all steps, found about the different pin assignment in V2 and changed them accordingly in my code:

const lmic_pinmap lmic_pins = {
    .nss = 18,                       // chip select on feather (rf95module) CS
    .rxtx = LMIC_UNUSED_PIN,
    .rst = 14,                      // reset pin
    .dio = {26, 35, 34},            // 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
};

I’ve set up my Device in my TTN account, added a device and set it to ABP but no chance . i can’t send out anything / TTN won’t receive anything.

Btw. I’ve tested the Heltec Library samples, they all work fine but unfortunately (afaik) no TTN examples here …

Any idea what could be wrong?

Hi:
Please confirm that the SPI pin is correct?
LoRa-SCK ------ GPIO5
LoRa-MOSI ------ GPIO27
LoRa-MISO ------ GPIO19

yes - it’s SPI.begin(5, 19, 27);
I set LMIC_DEBUG_LEVEL 2 - here’s my output:

Starting
RXMODE_RSSI
9697: engineUpdate, opmode=0x808
9730: EV_TXSTART
9798: TXMODE, freq=904300000, len=26, SF=7, BW=125, CR=4/5, IH=0
Packet queued
75313: setupRx1 txrxFlags 00 --> 01
start single rx: now-rxtime: 4
75445: RXMODE_SINGLE, freq=924500000, SF=7, BW=500, CR=4/5, IH=0
rxtimeout: entry: 76778 rxtime: 75438 entry-rxtime: 1340 now-entry: 4 rxtime-txend: 61775
138285: setupRx2 txrxFlags 0x1 --> 02
start single rx: now-rxtime: 4
138417: RXMODE_SINGLE, freq=923300000, SF=9, BW=125, CR=4/5, IH=0
rxtimeout: entry: 140737 rxtime: 138410 entry-rxtime: 2327 now-entry: 4 rxtime-txend: 124747
140756: processRx2DnData txrxFlags 0x2 --> 00
140800: processDnData_norx txrxFlags 00 --> 20
141055: EV_TXCOMPLETE (includes waiting for RX windows)
141364: engineUpdate, opmode=0x900
3891364: engineUpdate, opmode=0x908
3891386: EV_TXSTART
3891452: TXMODE, freq=904700000, len=26, SF=7, BW=125, CR=4/5, IH=0
Packet queued
3956967: setupRx1 txrxFlags 0x20 --> 01
start single rx: now-rxtime: 3
3957098: RXMODE_SINGLE, freq=925700000, SF=7, BW=500, CR=4/5, IH=0
rxtimeout: entry: 3958431 rxtime: 3957092 entry-rxtime: 1339 now-entry: 3 rxtime-txend: 61775
4019939: setupRx2 txrxFlags 0x1 --> 02
start single rx: now-rxtime: 4
4020070: RXMODE_SINGLE, freq=923300000, SF=9, BW=125, CR=4/5, IH=0
rxtimeout: entry: 4022391 rxtime: 4020064 entry-rxtime: 2327 now-entry: 4 rxtime-txend: 124747
4022410: processRx2DnData txrxFlags 0x2 --> 00
4022470: processDnData_norx txrxFlags 00 --> 20
4022730: EV_TXCOMPLETE (includes waiting for RX windows)
4023045: engineUpdate, opmode=0x900

For better low power consumption, WIFI_LORA_32 V2 adds a Vext pin to control peripherals, so the Vext pin must be pulled low when using peripherals.
So maybe you should add the following code
Like this :

#define Vext 21
void setup()
{
pinMode(Vext,OUTPUT);
digitalWrite(Vext, LOW);

Was this ever resolved? Im having the same issue as the original poster. The heltec examples from the library required a licence key while the tnn example from the blog does not include it.

hi,

you can try this project: