Tech Journal

Open Source Stacks for LoRaWAN®

Posted by Sunil Kumar & Gregory Cristian on Jan 20, 2020 12:00:00 AM

Like any other low power wide area network (LPWAN), the LoRaWAN® specification was developed to allow multiple end devices (nodes) to communicate with a server, which can then distribute information. As such, one of the key elements of the network structure is the software implemented in every end node, allowing the node to communicate with the server. In this paper, we will review the various types of LoRaWAN stacks currently available.

LoRaMAC–Node™ Stack

Figure 1: End nodes in a LoRaWAN Network

LoRaMAC-Node was developed by Semtech and is open sourced. It is available for free. To access the downloadable code, go to the LoRaMAC-Node project in GitHub. The code has two main branches:

  • The “master” branch is the latest official release, which has been fully tested and validated.
  • The “develop” branch contains the latest stack upgrades, firmware upgrades, and software corrections. The code in this branch is tested but not yet validated.

Users should keep an eye on both to be sure they have the latest update available

Any developer can review, download, create forks, propose new implementations or make comments on the existing software.

Semtech is responsible for maintaining the codebase and evaluates recommendations provided by users.

The software available on GitHub also provides various examples and demo applications which can help users debug and understand the LoRa® modulation.

LoRaWAN Stack: Mbed

For users who are more familiar with C++, the LoRaWAN stack and the various other examples are also available for the Arm Mbed OS.

Mbed offers a free online compiler that simplifies code development. Additionally, Mbed is supported by most microcontroller unit (MCU) manufacturers and allows end users to select their preferred hardware platform.

The Mbed code is written in C++ and many sample applications are available on the Mbed website.

LoRaWAN Stack: ST Microelectronics

ST Microelectronics, a key supporter of LoRaWAN, has developed their own version of the stack which is optimized to use the full resources of their MCUs. As such, their stack is readily available for the complete series of STM32Lxx MCUs.

Moreover, ST Microelectronics provides projects for most compilers. The code can be found here.

LoRa Basics™ MAC

LoRa Basics is available on Semtech’s LoRa Developer Portal as open source code. This stack is a fork of LMIC from IBM. The code is written in C. This stack supports Class A, B, and C end devices, as well as multiple regions. It is very easy to port the stack to different microcontroller platforms.

Documentation, videos, and links to the code base are available on the LoRa Developer Portal.

The code is ready to be compiled and can used with b_l072z_lrwan1 from ST Microelectronics. It also supports following boards:

  • L053R8_Nucleo board with SX1276 Mbed boards.
  • L053R8_Nucleo board with SX126x Mbed boards.
  • Simulator for testing the stack.

Note: The build machine should be a Linux machine with Python 3.6 or newer that has Click, intelhex and PyYAML installed. Build details can be found here.  


LoRa® is a registered trademark or service mark of Semtech Corporation or its affiliates.

Topics: LoRa Developers