Overview of LoRaWAN Libraries [HowTo]

Overview of existing LoRaWAN libraries

For users by users.

:warning: Do not use this topic for questions and discussions

For questions and discussions use the following topic:
Questions about LoRaWAN Libraries

:arrow_right: Please help make the list of libraries in this overview complete:

If you know an existing LoRaWAN library that is not yet listed in this topic then PLEASE add a post with information about the library to this topic.

Some guidelines for this thread (topic):

When adding variations (see below) of an already existing library, please only add it to the list if the library was modified for a well documented reason (e.g. to make it run better on a certain microcontroller family like ESP32 or STM32) and that it might be of interest to a wider public.
But do not add any personal copies (e.g. forks you can find on github) that lack a clear description of changes (if any) and (even while public) are only meant for personal use.

For any LoRaWAN library please specify the following information:

Below the table with library properties please add a clear description of the library (more verbose than for the ‘Description’ property) and try to make clear what makes this library different from its parent, why it is different and/or why it is better. (But don’t make it a ‘search the differences’ exercise for the reader.)

Property Value
Name: <official library name>
(see PlatformIO Libraries registry)
Version: <library version>** (at the time of adding the post)
Frameworks: <supported development frameworks>
(see PlatformIO Frameworks registry)
Platforms: <supported microcontroller families>
(see PlatformIO Development Platforms registry)
Description: <description> (called sentence in library.properties)
URL: <source/repository URL>**
Type: <Port, Variaton, New or dash(-) if unknown>
(Port is substantial, Variation contains only minimal changes)
BaseType: <LMIC or LoRaMac-node>
Parent Name: <parent’s official library name> (dash(-) if not appropriate or unknown)
Parent URL: <parent’s repository URL> (dash(-) if not appropriate or unknown)

Many of above library properties can be found in property files like library.properties or .library.json.

PlatformIO has already defined names for Platforms and Frameworks (many supported). It is practical to use the names already defined and maintained by PlatformIO.
Note: use only lower case and replace spaces by underscores, which is how PlatformIO uses it.

For an example see the next post.

Some background:

There exist at least two major LoRaWAN library implementations that can be used for for end nodes:

  1. IBM’s original LMiC (formerly ‘LoRa MAC in C’) implementation.
  2. Semtech’s LoRaMac-node reference implementation.

I call LMiC and LoRaMac-node base types.

Both base types have been ported to different platforms (microcontroller families) e.g. AVR, SAM, STM32, nRF5x, ESP32 and different development frameworks e.g. Arduino, ARM Mbed etc.

The Arduino framework is popular within maker and hobbyist communities. IBM’s LMiC has been ported to the Arduino framework and is commonly referred to as Arduino LMIC. The first Arduino LMIC implementation was LMIC-Arduino which has long served as the reference implementation but it is no longer maintained. The new reference implementation is MCCI LoRaWAN LMIC library which is improved and actively maintained (see below).

The Arduino framework initially was available only for the AVR family of microcontrollers, but nowadays there are Arduino framework implementations (called Arduino Cores) for many microcontroller families like AVR, SAMD, STM32, ESP32, ESP8266 and nRF5x.
While the Arduino LMIC reference implementations can be used with multiple microcontroller families, there also exist modified versions that are specially adapted for a certain microcontroller. I call these variations (or decendants) of Arduino LMIC and call Arduino LMIC the parent of the decendant.

Many libraries have an official name that is different from the name of their (GitHub) repository. The official library name is important for development tools like PlatformIO which can automatically download libraries if their official name is specified in the platformio.ini project configuration file.

Update: Topic title has been updated (shortened).


This library is also known as: Classic LMIC.
It is preferred to use this name on the forum.

On 3 October 2020 this library was officially DEPRECATED. It will no longer be maintained. Use MCCI LMIC instead (see further below).

At the same time the following changes were applied:

  • Version number was bumped up to v1.5.1 to comply with semantic versioning.
  • Official library name was reverted to “IBM LMIC framework”.
    In december 2017 the library name was changed to “LMIC-Arduino” but it showed that the Arduino IDE library manager was unable to properly handle this (preventing it to update the library). This has now been reverted.
  • No functional changes were applied to the code.
Name: IBM LMIC framework
Version: 1.5.1
Frameworks: arduino
Platforms: atmelavr, atmelsam, espressif8266, intel_arc32, microchippic32, nordicnrf51, teensy, timsp430
Description: Arduino port of the LMIC (LoraWAN-in-C, formerly LoraMAC-in-C) framework provided by IBM.
URL: GitHub - matthijskooijman/arduino-lmic: This library is deprecated, see the README for alternatives.
Type: Port
BaseType: LMIC
Parent Name: IBM LMiC
Parent URL: -

This is IBM’s LMiC library ported to Arduino. It previously was the LMIC reference implementation for Arduino but is no longer maintained since quite some time.

The official library name can be found in file library.properties. The name of the GitHub repository is “arduino-lmic” which unfortunately has little resemblance with the library name “IBM LMIC framework”.

The default band plan setting for this library is EU 868 MHz.

It is advised to use the newer MCCI LMIC library (“MCCI LoRaWAN LMIC library”) instead, which has improvements, supports more regions and is actively maintained (it is listed further below). Do read its README.md first.
Like Classic LMIC, MCCI LMIC uses the same “arduino-lmic” GitHub repository name which can be confusing.

Use of Classic LMIC in some cases may still be prefered for memory constrainted 8-bit MCU’s like AVR ATmega328 and ATmega32u4 (used e.g. on Arduino Pro Mini and LoRa32u4,).

This library is not suitable for use with TTS CE V3 (aka TTN V3) because it lacks LoRaWAN compliancy required by TTS CE V3.

Names: libmDot, libxDot
Version: 3.1.0
Frameworks: mbed
Platforms: mDot and xDot
Description: Libraries for application development on Multitech Dot hardware
URLs: https://github.com/MultiTechSystems/libmDot-dev-mbed5
Type: -
BaseType: Proprietary (Closed source)
Parent Name: -
Parent URL: -
1 Like

This library is also known as: MCCI LMIC
It is preferred to use this name on the forum.

Name: MCCI LoRaWAN LMIC library
Version: 3.2.0
Frameworks: arduino
Platforms: atmelavr, atmelsam, espressif32, espressif8266, intel_arc32, microchippic32, nordicnrf51, nordicnrf52, stm32, stm8, teensy, timsp430
Description: Arduino port of the LMIC (LoraWAN-MAC-in-C) framework provided by IBM.
URL: https://github.com/mcci-catena/arduino-lmic
Type: Port
BaseType: LMIC
ParentName: IBM LMIC framework
Parent URL: https://github.com/things-nyc/arduino-lmic

This library at https://github.com/mcci-catena/arduino-lmic is now the reference implementation of LMiC.

The LMiC library at https://github.com/matthijskooijman/arduino-lmic hasn’t been updated for over a year and the last real code change is even older. In the mean time, Terry Moore from MCCI has been working on a fork of the IBM code and is making incredible progress at fixing many old issues and getting an official certification for the code.

In contrast to its predecessor the default band plan setting for this library is US 915 MHz.

Name: ttn-esp32
Version: 2.2.2
Frameworks: ESP-IDF
Platforms: espidf
Description: The Things Network device library for ESP-IDF (ESP32) supporting devices with Semtech SX127x chips
URL: https://github.com/manuelbl/ttn-esp32
Type: Port
BaseType: LMIC
Parent Name: MCCI LoRaWAN LMIC library
Parent URL: https://github.com/mcci-catena/arduino-lmic

For the ESP-IDF framework (non-Arduino ESP32 framework):


Version 2.3.2 has been released. It adds support for CMake and PlatformIO, and it integrates the latest LMIC code by MCCI Catena (v2.3.2).

Name: ESP32_LoRaWAN
Version: 2.0
Frameworks: arduino
Platforms: espressif32
Description: LoRaWAN library for ESP32 + LoRa boards made by heltec
URL: https://github.com/HelTecAutomation/ESP32_LoRaWAN
Type: Port
BaseType: LoRaMac-node
Parent Name: LoRaMac-node
Parent URL: https://github.com/Lora-net/LoRaMac-node

This is a port of Semtech’s LoRaMac-node LoRaWAN library for the ESP32.
It can be used for Heltec ESP32 LoRa products only.

:triangular_flag_on_post: Partially propriatary. Some essential parts are obfuscated (compiled to assembly).

A unique license relate to Chip ID is needed, you can check your license here: http://www.heltec.cn/search/

1 Like
Name: lora_device_lib
Version: 0.1.5
Frameworks: none, arduino
Platforms: atmelavr
Description: An experimental LoRaWAN device implementation
URL: https://github.com/cjhdev/lora_device_lib
Type: New
BaseType: lora_device_lib
Parent Name: -
Parent URL: -

lora_device_lib (ldl) is an experimental LoRaWAN implementation. It is not derived from any other libraries.

  • class A only
  • OTAA mode only
  • LoRa modulation only
  • supports ADR and network configurable parameters
  • supports multiple regions
  • supports SX1272 and SX1276 radios
  • has API documentation
  • has an Arduino wrapper for avr types

Generally speaking:

  • It has similar memory requirements to LMIC but fewer features
  • It has not been conformance tested
  • It is designed to be managed by the network rather than the application
  • It is unproven
1 Like

27 posts were merged into an existing topic: Questions about LoRaWAN Libraries

Name: Basic MAC
Version: 2.x
Frameworks: gcc-arm-embedded
Platforms: The reference hardware platform is the B-L072Z-LRWAN1 STM32 LoRa Discovery kit
Description: A portable implementation of LoRaWAN in the C programming language
URL: https://github.com/lorabasics/basicmac
Type: Port
BaseType: LMIC
Parent Name: IBM LMiC
Parent URL: -

From the creators of Basic Station that powers the TTIG gateway, Basic MAC is a portable implementation of the LoRa Alliance’s LoRaWAN specification in the C programming language. It is a fork of IBM’s LMiC library, and supports multiple regions, which are selectable at compile and/or run time. It can handle Class A, Class B, and Class C devices.


The full documentation is available at https://doc.sm.tc/mac.

And promising: @matthijskooijman might be picking up work for an Arduino port:

I’ve found @LacunaSpace willing to sponsor work on a BasicMac port for Arduino. I’ve got a basic version working somewhat […]

Name: lora_device_lib
Version: 0.2.1
Frameworks: none, arduino
Platforms: any, atmelavr
Description: An experimental LoRaWAN device implementation
URL: https://github.com/cjhdev/lora_device_lib
Type: New
BaseType: lora_device_lib
Parent Name: -
Parent URL: -

Now at version 0.2.1.

Changes since 0.1.5:

  • LoRaWAN 1.1 support*
  • Improved documentation (including a porting guide)
  • Deferred duty cycle feature for redundant unconfirmed data
  • Improved key handling (security module abstraction)
  • New MAC commands
    • DeviceTimeReq/Ans
    • ADRParamSetupReq/Ans

*328P Arduino wrapper limited to LoRaWAN 1.0 for simplicity.

1 Like
Name: TheThingsNetwork_esp32
Version: 0.1.1
Frameworks: none, arduino
Platforms: esp32
Description: very similar with TheThingsNetwork/arduino-device-lib. This made lmic very easy to use.
URL: GitHub - rgot-org/TheThingsNetwork_esp32
Type: New
BaseType: LMIC
Parent Name: -
Parent URL: -
The library recognizes automatically the heltec boards
- Wifi lora 32 V1 & V2
- Wireless stick
Name: SimpleLMIC
Version: 1.0.2
Frameworks: arduino
Platforms: atmelavr, atmelsam, espressif32, espressif8266, intel_arc32, microchippic32, nordicnrf51, nordicnrf52, stm32, stm8, teensy, timsp430
Description: SimpleLMIC uses the MCCI LoRaWAN LMIC library behind the scene and makes Arduino-friendly
URL: https://github.com/ricaun/SimpleLMIC
Type: Port
BaseType: LMIC
ParentName: MCCI LoRaWAN LMIC library
Parent URL: https://github.com/mcci-catena/arduino-lmic

This library uses the arduino-lmic and makes it more user friendly and ttn friendly using the key pattern from the ttn console.

Check the example: SimpleLMIC_otaa

1 Like


Name: TinyLoRa
Version: 1.3.0
Frameworks: arduino
Platforms: atmelavr, atmelsam, espressif32, espressif8266, gd32v, infineonxmc, intel_arc32, kendryte210, microchippic32, nordicnrf51, nordicnrf52, ststm32, ststm8, teensy, timsp430
Description: Library for communicating with TTN using a Hope RF RFM95/96/97/98(W) LoRa Transceiver Module. Library provided by Adafruit.
URL: GitHub - adafruit/TinyLoRa: LoRaWAN Library
Type: Port
BaseType: -
Parent Name: -
Parent URL: -
  • for Hope RF RFM95/96/97/98(W) LoRa Transceiver Module.
  • ABP mode only
  • Does not support downlinks

:warning: Note that this library which was written by Adafruit is NOT LoRaWAN compliant because it cannot handle downlinks.
It is therefore unable to handle MAC commands from the network which are sent via downlinks.

This library shall not be used with ABP on TTN V3 (TTS CE V3) because it cannot handle MAC commands which will cause a downlink for every uplink.

TinyLora is also used by Adafruit in their ‘LoRaWAN support’ for MicroPython. This means that it also does not support downlinks and is unable to handle MAC commands resulting in the exact same problems as TinyLora. Adafruit’s ‘LoRaWAN support’ for MicroPython is therefore also NOT LoRaWAN compliant!

1 Like
Name: ngraziano/LMICPP-Arduino
Version: 2.1.2
Frameworks: arduino
Platforms: Atmel AVR,ST STM32,Espressif 32
Description: Modified Arduino port of the LMIC framework, changed to C++ format
URL: https://github.com/ngraziano/LMICPP-Arduino
Type: Port
BaseType: LMIC
Parent Name: Classic LMIC
Parent URL: https://github.com/matthijskooijman/arduino-lmic

Main modifications:

  • Code in C++ style (class inheritance for different radio or region instead of #define)
  • Support SX1262 and SX1276
  • Class A only and no FSK
  • Deep sleep friendly (method to save state and get authorized sleep duration )

The aim is to keep it as compliant as possible while being able to use it in ATmega328P.
It is tested on ATmega328P (SX1262 and SX 1276), ESP32, RAK811 on EU868.


A post was split to a new topic: LMICPP-Arduino - LMIC library with SX1262 support

MCCI LMIC v.4.0.0 released

MCCI LoRaWAN LMIC library v4.0.0 was released yesterday.

Release notes can be found here: MCCI LMIC v4.0.0 Release Notes

1 Like