Questions about LoRaWAN Libraries

General topic for questions and discussions about LoRaWAN libraries

This is a companion topic for: Overview of LoRaWAN Libraries

Agreed, it’s definately the new LMiC reference.

1 Like

Maybe a stuped question, but how far are the two libraries LMIC-Arduino and MCCI LoRaWAN LMIC compatible with each other? In other words: What should I do to switch from the first to the second one?

To start, read the MCCI LoRaWAN LMIC library :wink:

In a nutshell:

  • You can use it as a drop in replacement, but
  • You will have to configure your region (default set to CFG_us915 instead of CFG_eu868).
    This is done in project_config/lmic_project_config.h (in library source), see
  • In addition more events have been added which should/can be handled.
  • This library uses a bit more memory than LMIC-Arduino, but in many cases that will only be relevant when using memory constrainted MCU’s like 8-bit AVR ATmega328 and ATmega32u4.
1 Like

I can’t wait. But… if both libraries are used are there no conflicts? Have I remove the old one?

Thanks and regards…

Of course you can only have one. They are by and large the same code, trying to use the same resources. It would probably not even be possible to build a project with both due to name conflicts alone.

Good question but I don’t have an answer at hand.
When using Arduino IDE the libraries may/will possibly conflict, but I have no experience with it in this case.
I am using PlatformIO where I can specify in the project configuration file which libraries (and which one of the LMIC libraries) I want to use. Even when both libraries are present this does not give any conflict (but that is probably due to the working of PlatformIO).

You may try to include arduino_lmic.h instead of lmic.h to use the MCCI LoRaWAN LMIC library.
That was specially added (but I’m not sure if that is sufficient to prevent a library conflict in the Arduino IDE).

It would be nice if you could test that and post your experiences here.

Both their official library names in and their source location URL’s are different.
But I expect that it will conflict because it is lmic.h that is included in the application and not the library name. But also see my remark above.

Does anyone know if any of these libraries support region hopping during runtime instead of at compile time? That would be a really nice feature for long duration HAB trackers.

We wait adafruit to wake-up for TinyLoRa. You can use this PR, but I don’t know if they are chips that support hopping. To my understanding HOPE RF95 does not support hopping.

Sorry If this is not the correct post to make this question, but it’s the one I found linked to the doubt I have. I’m currently trying to create a LoRa node using a Raspberry Pi and a Dragino Shield. The thing is that I’m following a tutorial, and the fifth step is to download an LMIC_pi code file, which I think is a library, but I don’t know what does this librabry do, in other words, why is it necessary to create a LoRa node?
Thanks in advance for any reply.

Because you have hardware that needs commanding and the library is the software that will issues the right commands to make it work.

i am using this library and i want to know if i can activate ADR in this library

Yes, sort of, as in preferably not with Matt’s library.

There is the API call which you can lookup in the docs directory for turning ADR on and off.

But that library is deprecated now so we recommend the MCCI LMiC library.

Which Arduino / MCU are you using?

I am using arduino uno

Assuming you have a fairly simple temperature / humidity sensor then you should be able to use the more up to date MCCI library but you will have to turn off the Class B Ping & Beacons code in the lmic/config.h file to get it to fit on an Uno.

Going forward you would need to think about using an MCU with more flash & memory for using MCCI LMiC - an Arduino Nano Every works well.

I will do it
thank you so much

Is there anyway to active Adr in old library?
because the new mcci lmic library got error in my arduino

ADR is supposed to be the same in both though the old one may not have some key bugfixes.

You really shouldn’t try to use the old library any more.

Work the error, and consider moving to a less obsolete board.

That has a docs directory with the API docs in it as well.

What error?

But medium term, as @cslorabox suggests, moving to a device with more memory will make this much easier.