Skip to content
Artur Balanuta edited this page Sep 7, 2017 · 27 revisions

(Under Construction)

This tutorial will show you how to add a LoRa Gateway using a MultiTech Conduit (MTCDT) and a LoRa accessory board (MTAC-LORA).

Prepare the Hardware

Before inserting the LoRa mCard the Operating System and software should be updated.

Install the latest version of mLinux Operating System

Visit Flashing mLinux Firmware for a detailed process on how to update your MultiTech Conduit to the most recent version. For this consider the pre-built images in the Download Section for your specific Hardware (MTCDT). Verify that the LoRa mCard was detected using the command: mts-io-sysfs show lora/hw-version

Packet Forwarder Configuration

After determining the HW of the LoRa mCard (mts-io-sysfs show lora/hw-version) the correspondent configuration file should be copied to the working directory and the lora-packet-forwarder started. Check the following link for configuration examples.

# Create the configuration folder
mkdir /var/config/lora/

# Copy the configuration file (in our case the MTAC-LORA-1.5 and US915 Region) 
wget <link to text file> -O /var/config/lora/global_conf.json
cp /opt/lora/local_conf.json /var/config/lora/

# Configure the local_conf.json file to localhost and port 1700
{
 "gateway_conf": {
    "server_address": "localhost",
    "serv_port_up": 1700,
    "serv_port_down": 1700
    }
}

# Enable start-up on boot
update-rc.d lora-packet-forwarder defaults 80 30

# Edit /etc/default/lora-packet-forwarder:
ENABLED = "yes"

# Start packet forwarder using this command
/etc/init.d/lora-packet-forwarder start

# Check if the process is running
ps -faux | grep /var/run/lora

Install the LoRa Gateway Bridge

Download the latest release of the precompiled LoRa Gateway Bridge Binary (lora-gateway-bridge_x.x.x_linux_arm.tar.gz) from the loraserver.io website into the /opt/lora/ folder. Decompress it (tar -xf lora-gateway-bridge_*_linux_arm.tar.gz) and delete the compressed file. Configuration examples.

# Create new user
useradd --system -U -M gatewaybridge -d /bin/false

# Create and complete the default configuration file
nano /var/config/lora/lora-gateway-bridge.conf
chown gatewaybridge:gatewaybridge /var/config/lora/lora-gateway-bridge.conf
chmod 640 /var/config/lora/lora-gateway-bridge.conf

# Create init file and enable boot at startup
nano /etc/init.d/lora-gateway-bridge
chmod +x /etc/init.d/lora-gateway-bridge
update-rc.d lora-gateway-bridge defaults

Other Configurations

Stop and remove unused Service

/etc/init.d/mosquitto stop update-rc.d -f mosquitto remove

After starting the service a new gateway_ID is generated based on the Ethernet MAC address. It is stored in the local configuration file (/etc/lora-gateway-pf/local_conf.json). Remember it for future use.

Clone this wiki locally