TTGO ESP32 LoRa v1.3: lmic library or guru medidation error problem

Dear Cayenne fellows,

I’ve purchased following product:

Usually I don’t have any problems connecting devices to cayenne using the CayenneLPP library:

and the lmic library:

However, when switching to this board that I’ve never used I get following errors:

  1. failure mcci_lorawan_lmic_library\src\lmic\oslmic.c:53 when selecting the esp32 dev board or
  2. Guru medidation error when selecting the TTGO OLED V1 board.

The code example from the manuacturer works fine for me:

There has been a similar topic on the forum about this but the link does not exist anymore:

My question would be: what are the recommended libraries to use with Cayenne, could you provide me a link to a code example?

My next attempts will be:

  1. Follow this tutorial: https://www.az-delivery.de/blogs/azdelivery-blog-fur-arduino-und-raspberry-pi/arbeiten-mit-dem-cayenne-dashboard-lora-device-teil-4

that uses this library:

Thank you! (fingers crossed that Shramik reads)

Note: here are all my includes:
#include <lmic.h>
#include <hal/hal.h>
#include <Wire.h>
#include <SPI.h>
#include <CayenneLPP.h>
#include <SHT21.h> //radionica library that can be found here https://github.com/e-radionicacom/SHT21-Arduino-Library
#include “SSD1306.h”
#include “images.h”
#include “driver/rtc_io.h”
#include <esp_task_wdt.h>

there is a good post in TTN forum https://www.thethingsnetwork.org/forum/t/big-esp32-sx127x-topic-part-3/18436 Go through it and get your device connected using https://github.com/mcci-catena/arduino-lmic

Dear Shramik,
Thank you a lot! I am now using the newest version of the arduino-lmic library. My code works fine for the v1.0 board:


With this pin mapping:
#define SCK 5 // GPIO5 – SX1278’s SCK
#define MISO 19 // GPIO19 – SX1278’s MISnO
#define MOSI 27 // GPIO27 – SX1278’s MOSI
#define SS 18 // GPIO18 – SX1278’s CS
#define RST 14 // GPIO14 – SX1278’s RESET
#define DI0 26 // GPIO26 – SX1278’s IRQ(Interrupt Request
#define I2C_SDA 21
#define I2C_SCL 22

From what I can see only the reset pin for the LoRa module has changed when moving to v1.3:

One of the better pin mapping summaries of TTGO is provided here:

Right now I am a bit puzzled, it’s not a software issue since v1.0 works smoothly with the newest libraries (but very high sleep current of 12mA). I’ll contact TTGO or get one of the newer versions.

Still hoping for your feedback though!

Note: the reset pin of v1.3 is 23, as provided in the code example here:

Anyways, I’ve used the correct pinmapping already but it doesn’t work.

did you try this library?

Hi Shramik,

Jup, definitely using it:
Using library arduino-lmic-master at version 3.2.0 in folder: C:\Users\bobin\OneDrive\Dokumente\Arduino\libraries\arduino-lmic-master

I’ve posted the question now also on the TTN forum with credit to you:

So I really don’t know, I can verify the following:

  • TTN gateway is working
  • newest arduino-lmic library 3.2.0 is used
  • pinmapping is correct
  • TTN keys are correct

Update from my side: I’ve switched back to mcci-lmic library:


The exact file I’ve downloaded from the github repo back then was:
MCCI_LoRaWAN_LMIC_library-20200619T092138Z-001.zip
The newest version of the mcci and the arduino-lmic libraries don’t work for me. I’ve only used standard ttn-abp connect examples.

all in all…I’m not much smarter than before but at least I’m sending data to TTN/Cayenne again.

Thank you @shramik_salgaonkar

1 Like

Great to hear it is working now. I wonder why the latest one does not work.