Overview of LoRaWAN libraries - LMiC, LoRaMAC-node and their variations


The purpose of this topic is to provide an overview of existing LoRaWAN libraries that can be used for development for end nodes.

## We need your input - Please help make the list complete. Thanks! ##

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 STM32) and 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:

At the start of the post please add a clear description of the library (more extended than below ‘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.)

Name: <official library name>
Version: <library version> (at the time of adding the post)
Frameworks: <supported development framework(s)> (see PlatformIO framework definitions)
Platforms: <supported microcontroller(family)(s)> (see PlatformIO platform definitions)
Description: <library’s description>
Link: <link to source/repository>
Type: <Port, Variaton, New or dash(-) if unknown>
. . . . . (Port is substantial, Variation contains only minimal changes).
BaseType: <LMIC or LoRaMac-node>
ParentName: <parents’s official library name> (dash(-) if not appropriate or unknown)
ParentLink: <link to source/repository of parent> (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 (and maintains) names of Platforms and Frameworks (many supported). Therefore it is useful to use the names already maintained by PlatformIO.
Note: use only lower case and replace spaces by underscores, which is how PlatformIO uses it.
Framework definitions: https://platformio.org/frameworks
Platform definitions: https://platformio.org/platforms

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, nRF51, nRF52 and development frameworks e.g. Arduino, ARM Mbed etc.

For development with the Arduino framework the following port of IBM’s original LMiC library is was (more or less) the reference implementation to use for Arduino: https://github.com/matthijskooijman/arduino-lmic

Initially Arduino only supported the AVR family of microcontrollers, but nowadays there are Arduino framework implementations for many microcontroller families like SAM, STM32, ESP32, ESP8266 and nRF5x.
While the arduino-lmic library can be used for different microcontroller families, there also exist modified versions of arduino-lmic that are specially adapted for a certain microcontroller (family). I call these variations or decendants of arduino-lmic and call arduino-lmic the parent of the decendant.

Many libraries have an official name which can be different from the name used for their repository.
For instance, the official library name for arduino-lmic is “LMIC-Arduino” while it is often referred to as arduino-lmic which was its first name and is still the name of its repository.
The official library name is important for development tools like PlatformIO which can automatically download required libraries if their official name is specified in a configuration file.

DIYmall LoRa32u4 II

This is IBM’s LMiC library ported to Arduino. This has long time served as the reference implementation for Arduino (but appears to have been superseeded, see further below).

Name: LMIC-Arduino
Version: 1.5.0+arduino-2
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.
Link: https://github.com/matthijskooijman/arduino-lmic
Type: Port
BaseType: LMIC
ParentName: IBM LMiC
ParentLink: -

(Jreiss) #3

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

(Manuel Bl) #4

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.

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

Name: MCCI LoRaWAN LMIC library
Version: 2.3.2
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.
Link: https://github.com/mcci-catena/arduino-lmic
Type: Port
BaseType: LMIC
ParentName: IBM LMiC
ParentLink: -

(Manuel Bl) #7

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

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
Link: https://github.com/manuelbl/ttn-esp32
Type: Port
BaseType: LMIC
ParentName: MCCI LoRaWAN LMIC library
ParentLink: https://github.com/mcci-catena/arduino-lmic

(Manuel Bl) #8

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).