Installing software and registering our gateway to TTN
Let's update, upgrade and install git :
sudo apt-get update && sudo apt-get upgrade && sudo apt-get install git -y
After that we will clone the repository from ttn-zurich (SPI branch) :
git clone https://github.com/ttn-zh/ic880a-gateway.git ~/ic880a-gateway
and we will enter the newly created directory :
cd ic880a-gateway
To continue, the important parts are our Gateway EUI (provided by
install script in terminal) and our gateway's GPS coordinates (lat,
lng)(provided during our ttn registration).
So, we have a terminal open and also our browser.
We login to our ttn account and we go to Console --> Gateways --> Register gateway
We check the box saying "I'm using the legacy packet forwarder" and we are here :
To obtain Gateway EUI, we run install script in terminal:
sudo ./install.sh spi
We stop here and we copy-paste the EUI from terminal to Gateway EUI in registration.
We continue in registration to fill the other blanks and check the correct info.
For me (Greece) it was :
Description --> you name it, (e.g. My new gateway)
Frequency Plan --> Europe 868Mhz
Router --> ttn-router-eu
Now in Location you click on the location of the gateway. In the upper right corner of the map, gateway's coordinates will appear. We will need them for the install script, which is waiting in terminal. Note them somewhere. After we enter all info, it should look like this :
Hit that "Register Gateway" button !!!!!!
We return to terminal and press N to the question "Do you want to use remote settings file?".
Then we write (manually, pasting gives hex I think) the info required. On Latitude and Longitude we enter the coordinates from registration.
The installation ends with this :
RasPi reboots and we notice that the hostname has changed and that, on RAK831, GPIO 3+4 leds light for a while at boot and then are off. And we have a bright red RX led !
Congrats !!!! You now have your RAK831 LoRa Gateway online !
Let's check :
In terminal :
systemctl status ttn-gateway.service
Also :
sudo apt-get install tcpdump
and
sudo tcpdump -AUq port 1700
Also :
sudo tail -f /var/log/syslog
(It logs every few seconds)
In TTN Console :
It checks every 30 seconds.
So, that was it ! Please review this guide and message me if something is wrong or needs change/improvement.
Wow !! Now let's make some LoRa nodes with sensors, deploy them and start testing !
Next step : TTN Mapper !