Updated LoRa/LoRaWAN library and impacts on your source codes

With the Spring Launch Event comes as well an updated RAK4631 Arduino BSP and an updated LoRaWAN library (SX126x-Arduino library).
These updates will unfortunately break backward compatibility with existing software.
Changes:

  • The LoRaWAN library now supports all regions without re-compiling
  • The handling of LoRa transceiver interrupts and LoRa/LoRaWAN events is now done in the background, there is no more need to call Radio.IrqProcess() from the main loop() or from a separate task.
    Why:
    First goal was to make the LoRa/LoRaWAN handling independent from any time consuming actions, functions, calculations that might happen in your application.
    Second goal was to make the library more flexible regarding the international regional LoRaWAN specifications.

The updates are published, you will get notifications in Arduino IDE about the update in the next few days (after April 12th 2021).

Here you can find more details about the changes and how to handle them:

Update notes

And another important news:

And another change. As we will bring out more WisBlock Core modules with Arduino support, we were looking in an easier way to install the RAK module Arduino BSP.

Please read how our new Arduino BSP support is working:
RAKwireless-Arduino-BSP-Index

1 Like

Hi,
I am trying to compile this example for my RAK4630 -

The compile fails with an error message relating to this library.

Is the example code now out of date? How can I fix this issue?

Thanks
Alan

Welcome to RAK forum @Alangward :slight_smile:

Regarding your issue, can you share the error you got?

Can you try first to update your SX126x-Arduino library then try again?

Also, I advise you to create another thread/topic for this issue instead of putting it is this thread :+1:

Hi Carl,
Thanks for the very fast response - I was not expecting it so soon. I’m not sure how to move this conversation to another thread in such a way as you’s know I had responded?
This is the error:
In file included from /home/alan/Arduino/libraries/SX126x-Arduino/src/mac/LoRaMacHelper.h:26,
from /home/alan/Arduino/libraries/SX126x-Arduino/src/LoRaWan-Arduino.h:17,
from /home/alan/Arduino/libraries/SX126x-Arduino/src/LoRaWan-RAK4630.h:4,
from /home/alan/Arduino/GPS_Tracker.ino/GPS_Tracker.ino.ino:26:
/home/alan/Arduino/libraries/SX126x-Arduino/src/mac/Commissioning.h:42:2: error: #error “SX126x-Arduino V2.0 does support all LoRaWAN regions without definition of 'REGION_XXYYY.\n\nPlease read detailed information how to use it on SX126x-Arduino/README_V2.md at master · beegee-tokyo/SX126x-Arduino · GitHub”
42 | #error “SX126x-Arduino V2.0 does support all LoRaWAN regions without definition of 'REGION_XXYYY.\n\nPlease read detailed information how to use it on SX126x-Arduino/README_V2.md at master · beegee-tokyo/SX126x-Arduino · GitHub”
| ^~~~~
exit status 1
Error compiling for board WisBlock Core RAK4631 Board.

NOTE. That I have RAK4630 not a RAK 4631.

Thanks
Alan

Hello Alan,
You might need to update the BSP as well. Please note that there is a change in the additional BPS URL for RAKwireless BSP.
Installation for WisBlock core Arduino BSP has changed

Hi Bernd
Thanks for the reply.
I only started on this yesterday, so everything is up to date. Unless there is something I’m missing that isn’t mentioned in the installation instructions.
I have seen the link you included.
I see where and why the error is being generated and I have looked for a #define for a REGION… , but there is none that I can see.

Thanks
Alan

Hi @Alangward ,

Can you confirm if this is the version of the library you have?

You can check it by clicking the highlighted link in the arduino code. You must click that link in the Arduino IDE so it will automatically redirect you to the library manager.

Hi Carl,
Yes, that’s exactly what I have.
Thanks
Alan

How about on the board manager?

Can you confirm if this is you version?

It wasn’t , but it is now. It now compiles , but I am now getting another error:

Arduino: 1.8.15 (Linux), Board: “WisBlock Core RAK4631 Board, 0.3.2 SoftDevice s140 6.1.1, Level 0 (Release)”

exec: “adafruit-nrfutil”: executable file not found in $PATH
Error compiling for board WisBlock Core RAK4631 Board.

Can you try to install adafruit-nrfutil via pip?

pip3 install --user adafruit-nrfutil

Then check if it is installed by checking the version?

adafruit-nrfutil version

This can also be a good reference.

Thanks for this. I’ll try it in the morning

Cheers
Alan

Hi Carl,
It now compiles cleanly and eventually I uploaded it successfully.
So all is good now - thanks very much for the help.
Cheers
Alan

1 Like