# RadioLib (open beta) - a new LoRaWAN v1.1 stack

**URL:** <https://www.thethingsnetwork.org/forum/t/radiolib-open-beta-a-new-lorawan-v1-1-stack/65534>\
**Category:** End Devices (Nodes)\
**Created:** [November 12, 2023, 2:44pm UTC](https://www.thethingsnetwork.org/forum/t/radiolib-open-beta-a-new-lorawan-v1-1-stack/65534 "2023-11-12T14:44:37Z")\
**Posts on this page:** 16\
**Page:** 1

<div class="post-metadata">

**Author:** ![stevencellist](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/stevencellist/32/46434_2.png) [@stevencellist](https://www.thethingsnetwork.org/forum/u/stevencellist)\
**Post date:** [November 12, 2023, 2:44pm UTC](https://www.thethingsnetwork.org/forum/t/radiolib-open-beta-a-new-lorawan-v1-1-stack/65534/1 "2023-11-12T14:44:38Z")

</div>

Hi there TTN community,

We present you a new LoRaWAN stack, as of now in open beta: **RadioLib**!  
([GitHub - jgromes/RadioLib: Universal wireless communication library for embedded devices](https://github.com/jgromes/RadioLib/))

After countless hours of work during the past months, we are now looking for people to try out this brand new stack. It isn’t in an official version release yet as it’s in beta, so you’ll have to clone the repo yourself.  
_Side note: DO NOT post bugs and issues here - refer to the GitHub link for those._

Here are some of the current highlights - as far as a beta-version can be trusted:

- LoRaWAN v1.1 from the ground up
- Runs on _a lot_ of platforms
- SX126x implemented
- SX127x implemented
- Complete ADR and other common server-side MAC commands
- Complete session persistance on EEPROM-enabled boards (looking at you, ESP32 & Pico!) allowing real deepsleep and battery swaps
- Support for both dynamic bands (e.g. EU868) and fixed bands (e.g. US915)
- Support for boards with drifting clocks (looking at you, Atmel)
- Self-contained (no external dependencies)
- Many more (future…)

The stack has been tested (read: compiled + handful of uplinks/downlinks) on the following platforms & modules:

- ESP32 & SX1276 (TTGO LoRa32 T3 v1.6.1)
- SAMD & SX1276 (Adafruit Feather M0 with RFM95)
- ESP32-S3 & SX1262 (Heltec Wireless Stick Lite V3)
- ASR605x & SX1262 (Heltec Cubecell AB-01)
- Pico / RP2040 & SX1262 (RAK11300)
- ATmega4808 & SX1262

And tested on the following regions:

- EU868 (extensively during development)
- AU915 (smoke tested, just a couple of hours)
- US915 (smoke tested, just a couple of hours)

Over the course of the 2023’s summer, RadioLib’s author Mr. Gromes added initial support for LoRaWAN by providing all the essentials for joins, uplinks and downlinks. But while he may be an RF expert and implemented the fundamentals, this was by no means a functional LoRaWAN stack. So, encouraged by @descartes, I took this opportunity to learn the LoRaWAN specification once and for all and spent all my spare time (and some sweat and tears) on getting this here.

Let’s use this topic as a meta-topic about RadioLib’s LoRaWAN stack. **Can you help test this stack?** Please share your experience, successes, questions and ideas for improvements here!

_Do NOT use this thread for actual bugs and problems - refer to GitHub for those and don’t forget to include debug information._

I’ll try to keep an eye on the feedback, but please know that I’m a full-time student plus part-time teacher, and I’d like to point out once more that this is a beta-version: expect bugs, don’t expect us to fix all your problems. You are strongly requested to contribute yourself (or at least propose solutions to make it easier)!

Finally, is RadioLib going to be the solution you’re looking for, and are you in a position to compensate my students for their teacher being distracted the last months? They would love some extra hardware for their LoRaWAN-enabled air quality boxes. Please check out [https://www.meetjeleefomgeving.nl/contributing/](https://www.meetjeleefomgeving.nl/contributing/). And while you’re at it, I am most definitely sure @descartes could use more than a few beers to drink away all the headaches and crises I’ve caused him! Really, Nick, I’m very grateful for all the support, you were a great sparring partner during the process and the supplier of most of the boards and dev environment. Thank you! I’d have quit three times over otherwise…

And who knows… will LMIC be able to retire for all but the smallest boards? 🙂

But let’s not forget that all of this was only possible because of RadioLib’s main developer Mr. Gromes. Definitely deserves the credits!

---

<div class="post-metadata">

**Author:** ![descartes](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/descartes/32/47220_2.png) [@descartes](https://www.thethingsnetwork.org/forum/u/descartes)\
**Post date:** [November 12, 2023, 3:04pm UTC](https://www.thethingsnetwork.org/forum/t/radiolib-open-beta-a-new-lorawan-v1-1-stack/65534/2 "2023-11-12T15:04:45Z")

</div>

I’d note for those who wonder who this new kid on the block is, he’s come out of the shadows of the @Ichthus_College_Info account where he runs the awesome community air quality monitoring project with his students for his town: [https://www.meetjeleefomgeving.nl](https://www.meetjeleefomgeving.nl)

This covers the whole LoRaWAN gambit - from soldering hardware, firmware, logistics, integrations & dashboards. And coping with a grumpy old programmer in Steven’s second language for some integration & dashboard stuff.

So it would be fair to say that @stevencellist has earnt his stripes on the whole LoRaWAN shebang before embarking on his RadioLib adventure.

There is still stuff to implement, still some cross-referencing to do, still some time needed for devices to run for a few weeks, but we tested this with our eyes open, looking at logs from all angles, including the actual SPI transfers.

This has been tested in my underground bunker / radio proof chamber on US915 & AU915 to check the region settings are good. Duty cycle & dwell periods will be your own responsibility.

RadioLib does not naturally fit in to 32K flash. If you have the time & inclination to put it on a diet, do say so. For now I’m soak testing it on a selection of devices - it works just fine on an ATmega480X based device, like the RocketScream board, if you do want to stick to AVR.

---

<div class="post-metadata">

**Author:** ![leogaggl](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/leogaggl/32/45257_2.png) [@leogaggl](https://www.thethingsnetwork.org/forum/u/leogaggl)\
**Post date:** [November 13, 2023, 5:10am UTC](https://www.thethingsnetwork.org/forum/t/radiolib-open-beta-a-new-lorawan-v1-1-stack/65534/3 "2023-11-13T05:10:24Z")

</div>

Nice work. Thanks for the update.

Might find the SX1262 devices I accidentally bought a while ago and gave up, as there was no decent LoRaWAN libraries out there, and RadioLib had LoRa P2P-only support at that time.

Glad it worked out for your AU915 tester too 🙂

---

<div class="post-metadata">

**Author:** ![stevencellist](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/stevencellist/32/46434_2.png) [@stevencellist](https://www.thethingsnetwork.org/forum/u/stevencellist)\
**Post date:** [November 29, 2023, 11:05pm UTC](https://www.thethingsnetwork.org/forum/t/radiolib-open-beta-a-new-lorawan-v1-1-stack/65534/4 "2023-11-29T23:05:14Z")

</div>

An update on this topic: RadioLib just updated to version 6.3, allowing you all to use its (beta) LoRaWAN support straight from your favourite library manager (Arduino / PlatformIO). No need to clone locally anymore for normal use!

If you use its LoRaWAN stack in any way, we ask you kindly to share your experience! Does it work just fine, were there hiccups along the way, is it a complete disaster? Please let us know (and for actual issues, file those on the GitHub repository, please and thank you 🙂 )

---

<div class="post-metadata">

**Author:** ![descartes](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/descartes/32/47220_2.png) [@descartes](https://www.thethingsnetwork.org/forum/u/descartes)\
**Post date:** [January 11, 2024, 6:09pm UTC](https://www.thethingsnetwork.org/forum/t/radiolib-open-beta-a-new-lorawan-v1-1-stack/65534/5 "2024-01-11T18:09:35Z")

</div>

10 posts were split to a new topic: [RadioLib / Heltec detour via Chirpstack](https://www.thethingsnetwork.org/forum/t/radiolib-heltec-detour-via-chirpstack/66299)

---

<div class="post-metadata">

**Author:** ![descartes](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/descartes/32/47220_2.png) [@descartes](https://www.thethingsnetwork.org/forum/u/descartes)\
**Post date:** [December 28, 2024, 12:06pm UTC](https://www.thethingsnetwork.org/forum/t/radiolib-open-beta-a-new-lorawan-v1-1-stack/65534/6 "2024-12-28T12:06:37Z")

</div>

2 posts were split to a new topic: [LW v1.1 device not joined](https://www.thethingsnetwork.org/forum/t/lw-v1-1-device-not-joined/70169)

---

<div class="post-metadata">

**Author:** ![ealw](https://www.thethingsnetwork.org/forum/letter_avatar_proxy/v4/letter/e/5e9695/32.png) [@ealw](https://www.thethingsnetwork.org/forum/u/ealw)\
**Post date:** [February 6, 2025, 4:12pm UTC](https://www.thethingsnetwork.org/forum/t/radiolib-open-beta-a-new-lorawan-v1-1-stack/65534/7 "2025-02-06T16:12:24Z")

</div>

I am not a huge fan of platformio. Happily RadioLib does not need platformio and i can use normal .ino code files and libraries in combination with arduino-cli.  
I do not know if i am searching wrong, but are there any .ino examples out there that would show how to use RadioLib in combination with TheThingsNetwork?

---

<div class="post-metadata">

**Author:** ![al1fch](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/al1fch/32/46861_2.png) [@al1fch](https://www.thethingsnetwork.org/forum/u/al1fch)\
**Post date:** [February 6, 2025, 4:30pm UTC](https://www.thethingsnetwork.org/forum/t/radiolib-open-beta-a-new-lorawan-v1-1-stack/65534/8 "2025-02-06T16:30:03Z")

</div>

HI

You can begin with _Starter.ino_ example, fine with TTN

[https://github.com/jgromes/RadioLib/tree/master/examples/LoRaWAN](https://github.com/jgromes/RadioLib/tree/master/examples/LoRaWAN)

---

<div class="post-metadata">

**Author:** ![ealw](https://www.thethingsnetwork.org/forum/letter_avatar_proxy/v4/letter/e/5e9695/32.png) [@ealw](https://www.thethingsnetwork.org/forum/u/ealw)\
**Post date:** [February 6, 2025, 4:45pm UTC](https://www.thethingsnetwork.org/forum/t/radiolib-open-beta-a-new-lorawan-v1-1-stack/65534/9 "2025-02-06T16:45:22Z")

</div>

Thanks. Do i always need [GitHub - mcci-catena/arduino-lmic: LoraWAN-MAC-in-C library, adapted to run under the Arduino environment](https://github.com/mcci-catena/arduino-lmic) in combination with RadioLib to get somethings send with the keys into the TTN network?

From the first post:

> [@stevencellist](#):
>
> And who knows… will LMIC be able to retire for all but the smallest boards?

Did the need of LMIC retired?

---

<div class="post-metadata">

**Author:** ![descartes](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/descartes/32/47220_2.png) [@descartes](https://www.thethingsnetwork.org/forum/u/descartes)\
**Post date:** [February 6, 2025, 5:11pm UTC](https://www.thethingsnetwork.org/forum/t/radiolib-open-beta-a-new-lorawan-v1-1-stack/65534/10 "2025-02-06T17:11:04Z")

</div>

> [@ealw](#):
>
> Do i always need [GitHub - mcci-catena/arduino-lmic: LoraWAN-MAC-in-C library, adapted to run under the Arduino environment](https://github.com/mcci-catena/arduino-lmic) in combination with RadioLib to get somethings send with the keys into the TTN network?

Erm, no, the libraries are mutually exclusive, they both do the same thing, having two at the same time will make life “interesting”.

If you look at the notes that accompany the starter files it will tell you all about how to use it. They were written explicitly for TTN by someone that knows TTN reasonably well and uses TTN a fair bit with RadioLib, so you should be good to go.

> [@ealw](#):
>
> Did the need of LMIC retired?

LMIC is a most excellent library that I used when I first started out with LW and it still works fine in a number of use cases. But it’s not as up to date as RadioLib which supports LW 1.1 and is easier to implement on ESP32 with deep sleep. On the other hand, LMIC still fits on to smaller devices, whereas RadioLib needs at least 64KB for AVR, ie not Uno.

---

<div class="post-metadata">

**Author:** ![stevencellist](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/stevencellist/32/46434_2.png) [@stevencellist](https://www.thethingsnetwork.org/forum/u/stevencellist)\
**Post date:** [February 6, 2025, 5:21pm UTC](https://www.thethingsnetwork.org/forum/t/radiolib-open-beta-a-new-lorawan-v1-1-stack/65534/11 "2025-02-06T17:21:45Z")

</div>

> [@ealw](#):
>
> Did the need of LMIC retired?

And with the somewhat recent additional support for SX126x radios LMIC has become a valid choice for newer hardware as well! When I wrote that comment it wasn’t available for those.

---

<div class="post-metadata">

**Author:** ![ealw](https://www.thethingsnetwork.org/forum/letter_avatar_proxy/v4/letter/e/5e9695/32.png) [@ealw](https://www.thethingsnetwork.org/forum/u/ealw)\
**Post date:** [February 7, 2025, 7:32pm UTC](https://www.thethingsnetwork.org/forum/t/radiolib-open-beta-a-new-lorawan-v1-1-stack/65534/12 "2025-02-07T19:32:28Z")

</div>

Thanks for all the answers. I know now, that i want to use RadioLib and not LMIC.

---

<div class="post-metadata">

**Author:** ![ElectronicallyE](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/electronicallye/32/48501_2.png) [@ElectronicallyE](https://www.thethingsnetwork.org/forum/u/ElectronicallyE)\
**Post date:** [April 9, 2025, 2:07am UTC](https://www.thethingsnetwork.org/forum/t/radiolib-open-beta-a-new-lorawan-v1-1-stack/65534/13 "2025-04-09T02:07:17Z")

</div>

@stevencellist, thank you for all your effort contributing to the RadioLib library, your support and more broadly your contribution to the LoRaWAN community.

I acknowledge that this post dates back to late 2023, but do you still consider LoRaWAN support in RadioLib as “beta”? If so, what do you consider it will take to for it to be in a “release” state?

Developing a new library is no small feat (as you said, it was several months of “big-brain” work), so it would be great if you could explain why you felt it was worth the effort? In other words, what does RadioLib offer that the LMIC library does not or does better?

Having read this forum thread, these are the differentiators I have identified:

- Support LoRaWAN v1.1 which LMIC does not (up to 1.0.3)
- Better support for ESP32 deep sleep.

---

<div class="post-metadata">

**Author:** ![descartes](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/descartes/32/47220_2.png) [@descartes](https://www.thethingsnetwork.org/forum/u/descartes)\
**Post date:** [April 9, 2025, 9:19am UTC](https://www.thethingsnetwork.org/forum/t/radiolib-open-beta-a-new-lorawan-v1-1-stack/65534/14 "2025-04-09T09:19:14Z")

</div>

> [@ElectronicallyE](#):
>
> do you still consider LoRaWAN support in RadioLib as “beta”?

RadioLib release notes are the source of truth - the LW is considered stable - no substantive changes in months and is able to pass all LW related compliance tests.

> [@ElectronicallyE](#):
>
> In other words, what does RadioLib offer that the LMIC library does not or does better?

There is a place for both library’s, it’s not a competition - neither are commercial.

If you need to fit on a smaller AVR based device, then LMIC is the way to go. LMIC-node provides a great wrapper that gets things going with ESP32 but no persistence so deep sleep becomes ‘interesting’.

RL supports v1.1 which is a little bit academic for most developers. And consequently has explicit support for persistence. For ESP32 there are worked examples to cope with the way that deep sleep works on that MCU. So as you are using a TTGO LoRa32 V1, I’d use RL.

If you want to learn LW well, then implementing both libraries on a few devices will help surface some important details of LW, which, like Shrek, has many layers. Then if you really want to get in to the weeds, use LoRaMac-node on STM32.

Please note, for any particular support issues other than general discussion like this, please use the RadioLib repro.

---

<div class="post-metadata">

**Author:** ![stevencellist](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/stevencellist/32/46434_2.png) [@stevencellist](https://www.thethingsnetwork.org/forum/u/stevencellist)\
**Post date:** [April 9, 2025, 9:29am UTC](https://www.thethingsnetwork.org/forum/t/radiolib-open-beta-a-new-lorawan-v1-1-stack/65534/15 "2025-04-09T09:29:43Z")

</div>

> [@ElectronicallyE](#):
>
> why you felt it was worth the effort?

A certain level of “I think I understand LW, let’s do this!” (turns out it was harder than expected), combined with an interesting set of reasons to want to use a deepsleeping ESP32, combined with using an SX1262. That was far from possible using any existing solution, plus I think that existing solutions are completely opaque bordering or crossing unreadable. So when I saw the infinitely wise Mr. Gromes add a few lines of code to do LW in RadioLib, I jumped on the train. Because I could actually read RadioLib.

I guess the single biggest pro for RadioLib is that it supports practically any platform (although supported HALs are only available for the most popular platforms and more integrated libraries may be available/preferred), and any radio that can do LoRa. So also the LR11XX, all SX12xx and derived radios and in a few months likely also the LR2021. Which comes at the cost of flash, so as per @descartes, it’s a game of trade-offs.

---

<div class="post-metadata">

**Author:** ![ElectronicallyE](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/electronicallye/32/48501_2.png) [@ElectronicallyE](https://www.thethingsnetwork.org/forum/u/ElectronicallyE)\
**Post date:** [April 15, 2025, 6:09am UTC](https://www.thethingsnetwork.org/forum/t/radiolib-open-beta-a-new-lorawan-v1-1-stack/65534/16 "2025-04-15T06:09:59Z")

</div>

Thanks for explaining. You sure set yourself a high bar with these challenges!
