Skip to content
Series of sketches and configuration files to test LoRa nodes and gateway
C++ Python
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.


The target of this repository files is to send different kinds of payloads from simple LoRa nodes to a Raspberry Pi LoRa concentrator (or gateway) to be converted to MQTT and elaborated via Node-Red or sent to LoRaWAN.


Nodes consist of Arduino boards like Arduino Pro Mini or ESP32 mounting LoRa modules like SX127x or RF9x. The most popular libraries:

Note: Be aware that Arduino-LoRa and Heltec LoRa libraries cannot easily coexist because of duplicated library error when compiling for Lora-ESP32 board


The concentrator is made of a Raspberry Pi Rev. 2 with SX127x module and is based on library:


All these tests were made using a Raspberry Pi concentrator prepared as follows. These steps are just provided as an example and should be adapted to your setting:

  • download and install Raspbian to SD card, plug to Raspberry, boot and follow installation procedure
  • enable SPI (GPIO interface) using raspi-config tool via terminal console
  • install PyLoRa library (link above)
  • test your LoRa module with PyLoRa to get messages from sensors
  • install Paho-MQTT to allow sending mqtt packets from Python scripts
  • install Mosquitto MQTT broker (kind of server) on local or remote machine, that will manage MQTT messages
  • test publishing MQTT LoRA messages via python script and show them in console using Mosquitto
  • install node-red (if not already installed) and set a flow to get and use your incoming MQTT data
  • install node-red Dashboard to create a dashboard for your sensors data that you can edit via nodes and flows
  • install node-red-admin to set a degree of security if you wish to access your node-red remotely - Be aware that this is NOT a strong security setting (see link below).
  • create a python script to perform the lora listening an MQTT publishing, and set it to start at boot


See also


ESP32 board

IR nodes



other issues


The sketches provided are licensed under the MIT Licence. Other files provided as example belong to their respective owners as stated within each file.

You can’t perform that action at this time.