One of the advantages of the LoRa transceivers, when compared to the traditional RTTY modulation used by most High Altitude Balloons, is that it requires very little processing power at the receiver. So instead of using a PC or a high end tablet or phone to decode the transmissions, all you need is a simple microprocessor with (assuming you want to upload data to the web for mapping) an internet connection.
The latter requirement makes devices such as the Raspberry Pi ideal for the task. A Pi, plus wired or wireless connection, just needs a simple board added with a LoRa transceiver connected to the SPI pins. And that’s exactly what Uputronics has made – and here’s a prototype board that they sent to me:
Normally it comes with a single 434MHz LoRa device but here I’ve added a second (you could add a 434MHz or 868MHz model). The remainder of this post will assume that the board is populated with just one device, in position 1.
Physically install is very simple – just push on to the Pi model A+ or B+, using a standard pin header extender (supplied). Or an pin header with extended pins can be used if you want to stack another board on top.
Next, burn an operating system onto a suitable SD card. For this purpose anything from 4GB should be fine. The following instructions are for Raspbian, and no other operating systems have been tested.
First, run raspi-config:
Then expand the filesystem, as you would normally do, then choose Advanced Options –> SPI and enable SPI.
It’s also worthwhile to change the hostname (Advanced Options –> Hostname). Finally, close the program and choose the reboot option.
Once rebooted, login again. We now have some software to install. First, install wiringPi, which is used for the SPI library and to read the status of the LoRa module via 2 of its INT pins:
cd ~ git clone git://git.drogon.net/wiringPi cd wiringPi ./build
Next, install SSDV which is used to decode download images:
cd ~ git clone https://github.com/fsphil/ssdv.git cd ssdv sudo make install
The gateway software uses the curl library for internet access (uploading telemetry data and/or image data), so install that:
sudo apt-get install libcurl4-openssl-dev
and the ncurses library used for the screen display:
sudo apt-get install libncurses5-dev
Finally, install the gateway software itself:
cd ~ git clone https://github.com/PiInTheSky/lora-gateway.git cd lora-gateway make
That completes the installation, so now for the configuration. The main settings are in a file gateway.txt in the above folder (/home/pi/lora-gateway). Here’s a simple example:
tracker=MYCALLSIGNfrequency_0=434.451 mode_0=2 #frequency_1=434.450 #mode_1=0
This firstly sets your callsign, which if you are a radio amateur would normally be your radio callsign, but it can be something else.
The next part sets the frequency and mode for the first LoRa device (the one in position “1”). Frequency is in MHz and should match the frequency of the tracker that you intend to receive. “Mode” is described below, where the other (optional) settings are also described. The final lines are commented out, to disable the second LoRa module.
tracker=<callsign>. This is whatever callsign you want to appear as on the tracking map and/or SSDV page. EnableHabitat=<Yes/No>. Enables/disables telemetry upload to habitat. EnableSSDV=<Yes/No>. Enables/disables image upload to the SSDV server. frequency_<n>=<freq in MHz>. This sets the frequency for LoRa module <n> (0 for first, 1 for second). e.g. frequency_0=434.450 mode_<n>=<mode>. Sets the "mode" for the selected LoRa module. This offers a simple way of setting the various LoRa parameters (SF etc.) in one go. The modes are: 0 = (normal for telemetry) Explicit mode, Error coding 4:8, Bandwidth 20.8kHz, SF 11, Low data rate optimize on 1 = (normal for SSDV) Implicit mode, Error coding 4:5, Bandwidth 20.8kHz, SF 6, Low data rate optimize off 2 = (normal for repeater) Explicit mode, Error coding 4:8, Bandwidth 62.5kHz, SF 8, Low data rate optimize off 3 = (normal for fast SSDV) Explicit mode, Error coding 4:6, Bandwidth 250kHz, SF 7, Low data rate optimize off SF_<n>=<Spreading Factor> e.g. SF_0=7 Bandwidth_<n>=<Bandwidth>. e.g. Bandwidth_0=41K7. Options are 7K8, 10K4, 15K6, 20K8, 31K25, 41K7, 62K5, 125K, 250K, 500K Implicit_<n>=<Y/N>. e.g. Implicit_0=Y Coding_<n>=<error_coding>. e.g. Coding_0=5 (4:5)
To run, just type
and you will see a screen like this:
In this example, channel 0 (the LoRa module in position 1 on the board) is enabled, at 434.451MHz, and mode 0 which is a shorthand for a mode suitable for continuous long-range telemetry transmission.
The status display updates as packets are received:
Finally, to exit the program, press CTRL+C.