Skip to content

University Humble Bundle

Artur Balanuta edited this page Jul 31, 2018 · 8 revisions

This tutorial will show you how to install one of our University Humble Bundle Boxes. The Box contains a RAK831 LoRa Gateway Concentrator Module and a MAX-7Q GPS module running on top of a Raspberry Pi 3. The system is powered over Power over Ethernet so the system can be powered using a single cable.

Installation and Waterproofing

An important step for a long lasting installation is waterproofing. The bundle provides a IP66/NMEA 4X certified polycarbonate waterproof case. Nonetheless the antenna and ethernet cable should be further isolated to prevent water damage. The below images show a proper application of the provided coaxial sealant to protect against moisture and corrosion.

Create an OpenChirp Device and Generate the Device Token

Please follow the Devices Tutorial to create an OpenChirp Device and Generate a Device Token. You will need the device id, endpoint, and the device token later for configuring the lora-gateway-bridge. Use the LoRa Gateway Template when making your device so you have all of the standard transducers. After you are done setting up your RPI, you will install a LoRaWAN Gateway Service which will take a gateway_ID that is generated from the software running on your PI.

Configure the LoRa Gateway

The box has DHCP enabled on the Ethernet interface enabled. Use the MAC address provided on the box to find the box IP and SSH into it. The SSH credentials will be provided over email and the use of a new password is encouraged.

Configure the gateway bridge service by modifying /etc/default/lora-gateway-bridge. Please set the following parameters as indicated:

  • MQTT_SERVER="tls://mqtt.openchirp.io:8883"
  • MQTT_PREFIX="<your_openchirp_device_endpoint> available on the OC website for your device"
  • MQTT_USERNAME="<your_openchirp_device_id> which is the last 24 digits, number part, of the endpoint"
  • MQTT_PASSWORD="<your_openchirp_device_generated_token>"

<your_openchirp_device_endpoint>, <your_openchirp_device_id>, and <your_openchirp_device_generated_token> should be replaced based on your OpenChirp device you created earlier.

Start the service and confirm that it is running properly

sudo systemctl start lora-gateway-bridge
sudo systemctl status lora-gateway-bridge
sudo systemctl enable lora-gateway-bridge # make the service start at boot

Link OpenChirp Gateway Service

After starting the service a gateway ID is composed from the Ethernet MAC address. It is stored in the local configuration file (/opt/oc-lora-gw-pf-dev/configs/local_conf.json) as gateway_ID. This ID is needed by OpenChirp. To get it run:

cat /opt/oc-lora-gw-pf-dev/configs/local_conf.json

Using the OpenChirp.io website, navigate to your previously created OpenChirp Device. Navigate to the Services tab and click Link Service. Select LoRaWAN Gateway, input your gateway_ID, and click Save. After refreshing the page, you should see a status that indicates your gateway was registered with the provided ID.

You may also want to add the TimeSeries service for visualizing debug data over time.

Fake GPS coordinates

We can force "fake" GPS coordinates in the case that the Gateway cannot be placed outside.

Edit /opt/oc-lora-gw-pf-dev/configs/local_conf.json

add fake_GPS options:

{
 "gateway_conf": {
     "gateway_ID": "xxxxxxxxxxx",
     "autoquit_threshold": 5,
     //"gps_tty_path": "/dev/ttyAMA0",
     "server_address": "localhost",
     "serv_port_up": 1700,
     "serv_port_down": 1700,
     "fake_gps": true,
     "ref_latitude": 40.244362,
     "ref_longitude": -79.519109,
     "ref_altitude": 0
 }
}