Ttn-esp32: new device library for ESP-IDF and SX127x boards

Do you also prefer Espressif’s ESP-IDF framework over the Arduino framework but had troubles getting your LoRa device working? I’m please to announce ttn-esp32, a new TTN device library for ESP32 and SX127x LoRa chips. It offers:

  • High-level, easy to use API
  • Available as an ESP-IDF component
  • Send and receive messages
  • Over-the-air activation
  • Storage of EUIs and keys in non-volatile memory
  • Specifically targeted at The Things Network
  • Free of charge and open source

The library builds on IBM’s LMIC code and provides a much simpler API that takes full advantage of FreeRTOS’ task scheduling.

Please check it out. Your feedback is very welcome.

9 Likes

Great news! Good job. IMHO only trough RTOS esp32 can achieve it’s full potential.

I’ve released a new feature for ttn-esp32: AT commands for provisioning.

With a single line of code, a background task can be started that listens for AT commands on one of the UARTs. With an AT command the device EUI, application EUI and application key can be set. They are then saved in the non-volatile storage.

It allows to build a single binary, to flash it to several devices and then to provision each device with the EUIs and keys. It simplifies the build process, avoids sensitive data in source code repositories, and reduces the chances of accidentally using the same key for two devices.

2 Likes

I’m just getting started so my question could sound dumb, but is your library the prefered way to interface against a lora dragino gateway on a esp32 with esp-idf framework?

It’s up to others to judge if my library is the preferred way. It’s the only LoRa library for the ESP-IDF framework that I’m aware of.

Regarding the Dragino LoRa gateways: If I’m not mistaken, they are single and dual channel gateways. My library doesn’t support it yet. It will iterate through all frequencies and not properly work with that kind of gateway.

You are welcome to open a feature request issue on the ttn-esp32 GitHub site.

1 Like