LoRa module with hardware serial

Hi folks, I would want to use a LoRa module with a board with multiple serial like Mega but the library published by seeed studio seem to be concepted to use with only software serial.

I tried also to use the RadioHead “cousin” library (actually the seeed studio library seem to be a fork of radiohead itself), but no luck the LoRa module won’t respond to my board.

Any ideas on how to put work the LoRa module with an hardware serial?

Hi, we quick checked the library, <LINK_TEXT text=“https://github.com/Seeed-Studio/Grove_L … 915MHz_RF/”>https://github.com/Seeed-Studio/Grove_LoRa_433MHz_and_915MHz_RF/</LINK_TEXT>, if we have to use the hardware serial, we have to change the RHUartDriver.cpp and RH_RF95.cpp as well. We will try to verify the result later on. thanks.

Seeed techsupport team


I am doing a project with a lora module and an arduino mega2560 which has more than one hardware serial. After going through the tutorial, I started to figure out a way to use one of the hardware serials on mega2560 instead of these software serials with my lora module. However, I found no way to do so as the official API currently does not support Hardware serial. Then I tried to modify some parts of the original official library, which did make possible to use hardware serials at the end. But the result came out with 2 separate libraries —the original one to use software serial and the modified one to use hardware serial, which is not favorable for my project involving uses of both a mega2560 using hardware serial and a Uno using software serial. It’s very inconvenient for me to frequently switch between two libraries while writing programs for two different boards. I am now requesting an official update to the existing API that adds the functionality to do the initialization with either a Hardware Serial or a Software Serial. I think this can help a lot of your customers who are doing project with lora modules. I have already added some minor modifications to the API : <LINK_TEXT text=“https://github.com/Windows10010/Grove_L … _915MHz_RF”>https://github.com/Windows10010/Grove_LoRa_433MHz_and_915MHz_RF</LINK_TEXT> (The one that can only initialize with a Hardware Serial)

Best Regards,

happy doing your lovely projects!

Billy Liang

Hi Billy

I talked to software team, they will modify the library this week and keep you posted. thanks.

I hope the modification in the LoRa library matches also with my problem with the Lotus Cortex-Mo+ and <RHutil/atomic.h>.

Hi Guys, Grove_LoRa_433MHz_and_915MHz_RF updated,

<LINK_TEXT text=“https://github.com/Seeed-Studio/Grove_L … F/tree/dev”>https://github.com/Seeed-Studio/Grove_LoRa_433MHz_and_915MHz_RF/tree/dev</LINK_TEXT>

The dev branch already supports both HardwareSerial and SoftwareSerial, I also added support for the Cortex-M0+ platform, Welcome testing and feedback to us.

<LINK_TEXT text=“https://github.com/Seeed-Studio/Grove_L … ial_server”>https://github.com/Seeed-Studio/Grove_LoRa_433MHz_and_915MHz_RF/tree/dev/examples/rf95_HardwareSerial_server</LINK_TEXT>

<LINK_TEXT text=“https://github.com/Seeed-Studio/Grove_L … f95_server”>https://github.com/Seeed-Studio/Grove_LoRa_433MHz_and_915MHz_RF/tree/dev/examples/rf95_server</LINK_TEXT>

Same demo, different serial ports

Great job! thanks you!

it works! :mrgreen:

Hi! This link doesn’t work for me.

I am trying to run Grove LoRa on a Arduino Nano 33 BLE, and maybe this HardwareSerial solution could fit in my project.


1 Like

Up for me :slight_smile:

Avail there now https://github.com/Seeed-Studio/Grove_LoRa_433MHz_and_915MHz_RF/releases
Release 2.0 supports HW Serial.

I am still having problem running the hardware serial on arduino due