The IoT LoRa Gateway can be setup with a few different methods. In this tutorial we will show you how to set it up using our SD Card Image & LoRaWAN Provider The Things Network.
Our guide uses the pre-built SD Card image which has all of the software already installed and ready for use on it.
The SD Card image has a new tutorial from the 8th of January 2019 which has been updated. The tutorials
- Raspberry Pi & Gateway Hat Already Assembled
- SD Card – Preferably 8GB Class 10
- SD Card Reader
- Power Supply
- Ethernet Cable – If using a wired internet connection
Step 1 – Download our SD Card image
Begin by downloading the SD Card image from our Google Drive. Do this by going to http://pisupp.ly/iotsd, clicking on the zip file and confirming the download.
The version of the SD Card image may change over time with all previous versions being put in the archive folder. At the time of writing the version is 2018-01-07-iot-lora-gateway-lite.zip
Step 2 – Image the SD Card
Next we need to write the SD card, before we can do this we need to first download a tool to write the data to the SD Card. For this we recommend balenaEtcher (Previously Resin) as it’s compatible with most Operating Systems and is easy to use.
Download Etcher from https://www.balena.io/etcher & install it on your computer and then run it.
Next select the SD Card image by clicking Select Image, and navigating to where the zip file downloaded on your computer (Usually in your downloads folder).
Then select the SD Card you wish to have the image written to, this is usually the only one that shows up if you only have one SD card plugged in.
And then click flash! The software will now write the data to the SD Card and present you with this screen when completed.
If you have it where it says validation error then the image may not have been written correctly. Try removing the SD Card, plugging it back into your computer and repeating the process. If this then still fails you may have a faulty SD Card. The process can take 5-10 minutes depending on the speed of the SD Card, writer and computer.
Once completed you should get this screen.
Step 3 – Configuring the SD Card
Step 3.1 – The Things Network Setup
In this tutorial we are using The Things Network as our LoRaWAN Provider, The Things Network is a worldwide network where community members can setup gateways and use the network for their LoRa nodes.
The nodes transmit and can be picked up by any gateway that is setup with The Things Network and forwarded to your IOT Application.
Begin by going to https://console.thethingsnetwork.org/ and creating an account if not already signed up and then login. You should be presented with a page like this.
Now click gateways and then on the top right of the gateway box click register gateway.
On this window you need to fill out the following fields:
Gateway ID: This has to be a unique ID, this can be anything you like but has to be unique.
Description: This can be anything you like for you to have a description of a gateway.
Frequency Plan: This is the frequency of the gateway and should match your gateway. As we’re in Europe I’ve selected the Europe 868Mhz Plan.
Router: This is the closest server to your location, as we’re in Europe I’ve selected Europe but you might find there is a router closer to you.
Location: The location of the gateway is handy to put in, while not required it may be useful in the future and for signal coverage mapping.
Antenna Placement: If the gateway and antenna is indoors then select indoors, if the antenna is mounted externally select outdoors.
Next we want to modify a few settings.
Click on the settings tab and you should be able to see the settings we configured and then on the information tab to the left.
Then in brand type in Multi-channel Raspberry Pi gateway, it should auto complete.
And for model select Raspberry Pi with Pi Supply Gateway HAT.
Finally click update gateway and return to the main screen. The overview should look similar to this.
Step 3.2 – Setup Wi-Fi on the Raspberry Pi
Only if you are using a wireless connection, if you are using a wired internet connection you can skip this step.
This section will be completed soon.
Step 4 – Plug it all in!
Now we’re ready for assembly, start by putting the RAK833 module into the Gateway HAT and then push the Gateway HAT onto the Raspberry Pi’s GPIO Headers.
Put the SD Card into the Raspberry Pi and connect it to Ethernet (if not using wireless) and finally connect a power adapter.
You should see the Red light turn on on your Raspberry Pi and the Green LED Blink.
If your Red light doesn’t turn on or blinks intermittently then try a different power supply. If the Green LED Doesn’t blink at all repeat Step 2.
Wait for around 1-2 Minutes for the first time you boot your gateway while the initialization of Raspbian is completed.
Step 5 – Gateway Configuration
Finally we need to configure our gateway. To begin you will need to connect to your gateway from a computer on the same network.
Open a web browser, we have tested this in Google Chrome.
If you are on Mac OS or Linux you should be able to connect to your gateway by visiting http://iotloragateway.local , on Windows you will have to find the IP Address of your gateway. This can usually be done by looking at your router’s list of devices on the network and looking for the device with iotloragateway. As you can see on my network it is ip address 192.168.0.95 so I will type that in my browser.
This is the home page for our IoT LoRa Gateway Mangement software. We want to configure our gateway so we visit the Change Configuration Page.
On this page you will need to type in your email address in the first box. The gateway ID in the second box and copy and paste the Gateway Key from the TTN Console into the TTN Gateway Key Box.
You can see this side by side completed.
Now Click Update Configuration
To get the gateway to start we now need to go to the system controls tab at the top and click the restart button.
Once you click this button you will see a progress bar go across the screen and by the end the blue light should now be showing on the LoRa module and you will be re-directed to the homepage.
You should now be able to see your gateway’s ID, how many packet’s it has received and other handy information!
You can also use the Things Network Console to view packets live as they are received by your gateway. However for this to work a node must be transmitting LoRa Packets nearby!