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

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)

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/. 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? :slight_smile:

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

12 Likes

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

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.

4 Likes

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 :slight_smile:

2 Likes

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 :slight_smile: )

8 Likes

10 posts were split to a new topic: RadioLib / Heltec detour via Chirpstack