Programming LoRa-E5 with Arduino, LoRa-E5 mini Point to Point Comminucation over 24 km

I am working on a project to program LoRa-E5 with Arduino instead of STM32CubeIDE. I hope this will be helpful to those who are interested.

As a way to program LoRa-E5 directly, the Wiki shows an example of using STM32CubeIDE. While this method is very sophisticated, it is far too complicated for me. I have found that by using some nice libraries, RadioLib, STM32LowPower, STM32RTC, I can write sketches in my familiar ArduinoIDE. I have tried and posted some basic functionality as shown in the link below.

Programming LoRa-E5 with Arduino, Grove-LoRa-E5 sleep current 0.7uA
Programming LoRa-E5 with Arduino, LoRa-E5 mini Battery Voltage Read
Programming LoRa-E5 with Arduino, Comparison of LoRa-E5 and LoRa-E5-LE transmit currents

I started an experiment to investigate the possible communication distance for point-to-point communication, which was my goal. First, I made a sketch of a point-to-point communication using a LoRa-E5 mini as Master and a LoRa-E5-LE mini as Slave.
The rules for my region are: transmit power less than 20 mW, bandwidth less than 200 kHz, antenna gain less than 3 dBi, and total transmission time per hour less than 360 seconds. The main LoRa parameters I set are freq=922.6MHz, power=13dBm, bw=125kHz, sf=12, cr=5, and send a 12-byte packet.

The sequence of operation is

  1. Master waits for a packet from Slave
  2. Slave sends a 12-byte packet (Slave’s UID, transmission time, battery voltage) and waits for a response from Master.
  3. Master receives the packet, checks the Slave’s UID and sends a 12-byte packet (Master’s UID, RSSI, SNR, dummy data) in response.
  4. Slave receives the packet, checks Master’s UID, then sleeps for 10 seconds in shutdown mode and wakes up with the RTC.

The device UID is used to check if the received packet is from the intended communication partner. By including Master’s RSSI and SNR in the response packet from Master, Slave can check the strength of its own signal. The activation method is to first activate Master to put it in a receive state, then activate Slave to start communication.

This is the sketch used for the experiment.
P2P_MasterSlave.zip (34.3 KB)

**** For reference ****
When compiled with ArduinoIDE2, the hex file is created in the folder below. Select and write the file with STA32CubeProgrammer.
In case of Windows
C:\Users\username\AppData\Local\Temp\arduino\sketches\32 digit HEX string\sketchname.ino.hex
In case of Linux
/tmp/arduino/sketches/32 digit HEX string/sketchname.ino.hex

IDE :          ArduinoIDE 2.2.1
BSP :          STM32 boards groups by STMicroelectronics 2.7.1
               Borad select        STM Boards groups / LoRa boars
               Board part number   LoRa-E5 mini (from Tools submenu 'Board part number')
Programmer :   STM32CubeProgrammer
Uploader :     ST-Link V2
Library :      RadioLib 6.4.2      https://github.com/jgromes/RadioLib
               STM32LowPower 1.2.5 https://github.com/stm32duino/STM32LowPower
               STM32RTC 1.4.0      https://github.com/stm32duino/STM32RTC

So far, results of 3.5 km have been obtained, and further experiments are planned.
I hope this will be helpful to those who are interested.

3 Likes

Wow, That is “BALLING” 3.5 Km, I love the technique , self SSI check pretty great stuff Msfujino
I would expect nothing less. My units are on order :wink: :v:
So the LE is very good on low power then?
Awesome stuff my guy.
GL :slight_smile: PJ

LoRa-E5 is an old design; it would be nice to have a LoRa version of XIAO, XIAO_LoRa_LE, similar to XIAO_BLE.

1 Like

Hi there,
Yes, they should be able too , make it just like that GnSS (GPS) Xiao.
But I want a 3G/4G Xiao. That would be the Winner too.
GL :slight_smile: PJ

In my area, the maximum possible experimental sight distance is 10 km, so I tried 10 km point-to-point communication. I chose a straight line over a lake, avoiding over urban areas as much as possible.
The result was a distance of 10.6 km, RSSI of -122.1 dBm, and SNR of -9.5 dB, ensuring stable communication. Since the theoretical limit of RSSI is -136.5 dBm, there is still a possibility to extend the distance.

Sketches used in the experiment
ESP32WL_P2P_LongRange.zip (30.3 KB)

3 Likes

Hello,
I am looking for LORA-E5 module software(source code) that enables it for LORA point-point communication. Please let me know if you can help me with this.

Thank you,
Naga.

look at the top of this thread he list several arduino libs he used with arduino IDE

In my previous experiments I had been able to achieve a communication distance of 10 km.
To further extend the communication distance, I used Google Map to find a line-of-sight route. The result was communication over a distance of 24.5 km, RSSI below the measurement limit of -127[dBm], and SNR of -15[dB]. However, it was susceptible to noise, and every time a truck passed by Slave, communication was lost or a verify error occurred, so I think 24 km is the limit.

The procedure is,

  1. Slave sends a packet (slave ID, random numbers, battery voltage, previous verify result) and waits for the response from Master
  2. Master receives a packet, checks the slave ID, and sends a packet (master ID, received random numbers, RSSI, SNR, time) in response. Record data to SD.
  3. Slave receives a packet, checks the master ID, and compares the received random numbers with the sent random numbers.

Sketches used in the experiment
STM32WL_P2P_Verify.zip (31.0 KB)

edit:
There was a problem with some of the sketches.
Since there are many devices communicating in the city, we may always need to check the ID of the communication partner. Here is the corrected sketch.
STM32WL_P2P_Verify_1.zip (31.1 KB)

3 Likes