SX1301 LoRa Gateway Module Quick Start¶
SX1301 LoRa gateway module, It can cooperate with hardware that supports Linux operating system (such as Raspberry Pi), then it can work as a LoRa gateway.
Running SX1301 module with SPI mode (Raspberry Pi)¶
The Raspberry Pi SPI bus is disabled by default. Enter the following command in putty to open the Raspberry Pi configuration interface and enable the SPI bus.
Interfacing Options → SPI → Yes and may need restart Raspberry Pi.
Install SX1301 module relevant application and services via following commands:
mkdir lora cd lora sudo apt-get update sudo apt-get install git git clone https://github.com/Lora-net/lora_gateway.git # LoRa Gateway drivers git clone https://github.com/Lora-net/packet_forwarder.git # packet forwarding software git clone https://github.com/HelTecAutomation/lorasdk.git # This package will create a "lrgateway" service in Raspberry Pi cd /home/pi/lora/lora_gateway make clean all cd /home/pi/lora/packet_forwarder make clean all cd /home/pi/lora/lorasdk chmod +x install.sh ./install.sh #Run the script. After the script is run, it will create a service named "lrgateway". The purpose is to make the lora driver and data forwarding program run automatically at startup. sudo cp -f /home/pi/lora/lorasdk/global_conf_EU868.json /home/pi/lora/packet_forwarder/lora_pkt_fwd/global_conf.json #the "global_conf_EU868.json" may need change to your need.
The “global_conf.json” file determines the listening frequency of the gateway, which is the key to a node can successfully communicate with the gateway!
./install.sh is executed, if everything goes normal, the unique ID of the current gateway will be printed. While register a gateway on a LoRa server need this unique ID.
sudo systemctl status lrgateway in Raspberry Pi, if all goes well, the service is running:
Connect to LoRa Server¶
SX1301 module working with Raspberry Pi is most similar with HT-M01 gateway with Raspberry Pi in SPI mode. Steps to connect to a LoRa server, please refer to this document: