# Which LoRaWAN codebase & MCU do you use for LoRaWAN?

**URL:** <https://www.thethingsnetwork.org/forum/t/which-lorawan-codebase-mcu-do-you-use-for-lorawan/35921>\
**Category:** End Devices (Nodes)\
**Created:** [April 5, 2020, 3:17am UTC](https://www.thethingsnetwork.org/forum/t/which-lorawan-codebase-mcu-do-you-use-for-lorawan/35921 "2020-04-05T03:17:30Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Didid](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/didid/32/32448_2.png) [@Didid](https://www.thethingsnetwork.org/forum/u/Didid)\
**Post date:** [April 5, 2020, 3:17am UTC](https://www.thethingsnetwork.org/forum/t/which-lorawan-codebase-mcu-do-you-use-for-lorawan/35921/1 "2020-04-05T03:17:30Z")

</div>

After doing my search on this forum, I concluded that there are two most widely used LoRaWAN codes used.

1. Semtech’s implementation [[https://github.com/Lora-net/LoRaMac-node](https://github.com/Lora-net/LoRaMac-node)]
2. Latest most active derivation of IBMs LMIC [[https://github.com/mcci-catena/arduino-lmic](https://github.com/mcci-catena/arduino-lmic)]

**First** , I would like to know if there are people using the Semtech’s implementation of LoRaWAN in their applications. If so, which MCU/s do you use?  
If I understand correctly, Semtech’s implementation is not made work on the Arduino Atmega 328. If you are using it on an Atmega MCU(under the Arduino platform), did you port it yourself?

**Secondly** , and most importantly, I would like to know what MCU do you use with which LoRaWAN code base.

Thank you for your input. Thanks for your time.

---

<div class="post-metadata">

**Author:** ![davidKP](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/davidkp/32/25844_2.png) [@davidKP](https://www.thethingsnetwork.org/forum/u/davidKP)\
**Post date:** [April 6, 2020, 1:04am UTC](https://www.thethingsnetwork.org/forum/t/which-lorawan-codebase-mcu-do-you-use-for-lorawan/35921/2 "2020-04-06T01:04:37Z")

</div>

This seems an interesting statistic to know.

---

<div class="post-metadata">

**Author:** ![Ludwig](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/ludwig/32/25844_2.png) [@Ludwig](https://www.thethingsnetwork.org/forum/u/Ludwig)\
**Post date:** [April 6, 2020, 7:01am UTC](https://www.thethingsnetwork.org/forum/t/which-lorawan-codebase-mcu-do-you-use-for-lorawan/35921/3 "2020-04-06T07:01:26Z")

</div>

There is a **Build Poll** option in the text editor here. Maybe you could edit your post and add one.

Me, I have tried both [lmic](https://www.thethingsnetwork.org/forum/t/application-example-with-mcci-catena-arduino-lmic-on-stm32l071/35779) and [loramac-node](https://www.thethingsnetwork.org/forum/t/loramac-node-not-sending-nucleol476rg-dragino-1-4/25273) using STM32 controllers and RFM95 modules.

The current lmic version by mcci is meant to be used with Arduino. This comes in favor of many who want to get up and running quickly; but without some effort you are bound to Arduino. Still, after rewriting the `hal.c/.h` module for my platform in C I was also able to integrate it with my codebase and use it as done in the `*.ino` examples (see link above).

The loramac-node is Semtech’s reference implementation. In contrast to lmic it already supports LoRaWAN 1.1, Class C and the new SX1261/2 radios. Also the [pre-certification results](https://github.com/Lora-net/LoRaMac-node/wiki/releases-pre-certification-results) are included. In addition the developer mluis is active here and very helpful in my experience when dealing with this library.  
However you need a bit more available flash when using it and, what I personally do not like, is the structure of the project you are forced into with CMake and predefined boards and apps. I rather want to take a working code base, e.g. generated from CubeMX, or depending on the manufacturer some other code generator or example project and be able to integrate a library into it. Though, I understand that for a whole network stack there has to be done a lot more than just abstract away the access to the hardware. requiring the management of timer, etc.

---

<div class="post-metadata">

**Author:** ![cjhdev](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/cjhdev/32/35697_2.png) [@cjhdev](https://www.thethingsnetwork.org/forum/u/cjhdev)\
**Post date:** [April 6, 2020, 11:43am UTC](https://www.thethingsnetwork.org/forum/t/which-lorawan-codebase-mcu-do-you-use-for-lorawan/35921/4 "2020-04-06T11:43:35Z")

</div>

I’m not using the Semtech reference for two reasons:

1. It uses a lot of [resources](https://cjh.id.au/2019/12/11/comparing-ldl-to-loramac.html) for no apparent reason
2. It didn’t have the porting features I wanted for running the stack in stop mode on a Cortex M0+

I wrote [LDL](https://github.com/cjhdev/lora_device_lib) and have used it successfully on an STM32L051R8T6 with resources to spare. This MCU has 64K of flash and 8K of RAM.

The ATMEGA328P is no good if you want all the LoRaWAN features. LDL can fit on this target but it’s more of a party trick than anything useful. There are smaller implementations out there but you will find that these leave out features.

---

<div class="post-metadata">

**Author:** ![Ludwig](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/ludwig/32/25844_2.png) [@Ludwig](https://www.thethingsnetwork.org/forum/u/Ludwig)\
**Post date:** [April 6, 2020, 4:43pm UTC](https://www.thethingsnetwork.org/forum/t/which-lorawan-codebase-mcu-do-you-use-for-lorawan/35921/5 "2020-04-06T16:43:11Z")

</div>

> [@cjhdev](#):
>
> I wrote [LDL](https://github.com/cjhdev/lora_device_lib) and have used it successfully on an STM32L051R8T6

This looks really interesting. I will give it a try as soon as I find the time to.

* * *

Also I am curious what ST will come up with for their new STM32WL. I guess some port of loramac-node but hopefully better integrated than their first attempt with I-CUBE-LRWAN.

---

<div class="post-metadata">

**Author:** ![Didid](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/didid/32/32448_2.png) [@Didid](https://www.thethingsnetwork.org/forum/u/Didid)\
**Post date:** [April 10, 2020, 7:59am UTC](https://www.thethingsnetwork.org/forum/t/which-lorawan-codebase-mcu-do-you-use-for-lorawan/35921/6 "2020-04-10T07:59:54Z")

</div>

This is a great library well worth studying. I really like the way you have developed this library. Thank you.

Perhaps you might be interested to add it in to this post:

> [@Overview of LoRaWAN Libraries \[HowTo\]](https://www.thethingsnetwork.org/forum/t/overview-of-lorawan-libraries-howto/24692/4):
>
> [This library is also known as: MCCI LMIC](https://www.thethingsnetwork.org/forum/t/arduino-lmic-library-naming-classic-lmic-and-mcci-lmic-howto/40592) 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](https://github.com/mcci-catena/arduino-lmic) Type: Port BaseType: LMIC ParentName: IB…

which sort of makes an effort to centralize the LoRaWAN libraries.

---

<div class="post-metadata">

**Author:** ![cjhdev](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/cjhdev/32/35697_2.png) [@cjhdev](https://www.thethingsnetwork.org/forum/u/cjhdev)\
**Post date:** [April 10, 2020, 9:16am UTC](https://www.thethingsnetwork.org/forum/t/which-lorawan-codebase-mcu-do-you-use-for-lorawan/35921/7 "2020-04-10T09:16:01Z")

</div>

It’s already there, last update was at version 0.2.1.

edit:

I think that thread is the wrong format. I think it would work better with a list of hyperlinks to project pages in the first post.
