Multiple Receivers Configuration on a Quad-Core Raspberry Pi

Raspberry Pi can host multiple DVB-T dongles, each with own (e.g. sector) antenna. This is a guide how to configure multiple OGN receivers and decoders.

Written by Ibisek, based on kind help and advice from Paweł Jałocha.

Why Multiple Receivers?

We wanted to have better coverage than with a simple rod antenna so the idea was to use four sector antennas. These antennas were specially designed and built for this frequency range and purpose.

Configuration

Step 0

It is good to start with successfully working configuration as described in Comprehensive installation guide for Raspberry Pi.

Step 1 - Serial Number

Each RTL receiver has an internal EEPROM which stores some information about the particular dongle. For example a blue 802T2 dongle may have a default configuration like this:

Found 1 device(s):
  0:  Generic RTL2832U OEM

Using device 0: Generic RTL2832U OEM
Found Rafael Micro R820T tuner

Current configuration:
__________________________________________
Vendor ID:              0x0bda
Product ID:             0x2838
Manufacturer:           Realtek
Product:                RTL2838UHIDIR
Serial number:          00000001
Serial number enabled:  yes
IR endpoint enabled:    yes
Remote wakeup enabled:  no
__________________________________________

The OGN receiver/decoder needs to distinguish between each of the dongles. In the initial state their serial number is configured to 00000001, which can be seen in dmesg output:

[    4.617675] usb 1-1.5.3: New USB device found, idVendor=0bda, idProduct=2838
[    4.617688] usb 1-1.5.3: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[    4.617697] usb 1-1.5.3: Product: RTL2838UHIDIR
[    4.617706] usb 1-1.5.3: Manufacturer: Realtek
[    4.617714] usb 1-1.5.3: SerialNumber: 00000001

For that matter we need to change serial number of each dongle to a unique value. This is done by the rtl_eeprom utility. See the rtl_eeprom manual or just type

rtl_eeprom -h

The serial number can be a set of number and characters unique for each dongle you connect to a single raspi. A good choice might be to put the frequency correction there, for example Mi+20ppm, or just a simple serial number like dongle0001.

Having plugged-in only one dongle the chosen serial number is then written to the dongle using

rtl_eeprom -s lkkaRtl0001

Once the new serial numbers are set you can see them again in the dmesg output:

[    4.617714] usb 1-1.5.3: SerialNumber: lkkaRtl0001

Step 2 - FIFOs

As we will run extra instances of ogn-decode and ogn-xxx for each dongle, we need the same number of FIFOs as receivers. Therefore, for our four receivers we need to create additional FIFOs:

cd rtlsdr-ogn
sudo mkfifo ogn-rf-1.fifo
sudo mkfifo ogn-rf-2.fifo
sudo mkfifo ogn-rf-3.fifo
sudo mkfifo ogn-rf-4.fifo

Step 3 - Configuration Files

Each receiver has a separate configuration file in which we specify particular FIFO, dongle serial number, frequency correction, aprs source (remember you have more of them) and http diagnostics/debug port:

vim receiver-1.conf

RF:
{ 
  PipeName = "ogn-rf-1.fifo";
  DeviceSerial = "lkkaRtl0001";
} ;

APRS:
    { Call = "myaprs-1";     # APRS callsign (max. 9 characters) Please refer to http://wiki.glidernet.org/receiver-naming-convention
} ;

HTTP:
{ Port=8080;
} ;

(only changes are shown above)

Please also note the port setting. Start with 8080 and for every other configuration file increase this number by 2.

Step 3 - rtlsdr-ogn Service Startup Config

If you start the receiver(s) using the rtlsdr-ogn service, you also want to edit its config file:

sudo vim /etc/rtlsdr-ogn.conf

add:

50000  pi /opt/rtlsdr-ogn    ./ogn-rf     receiver-1.conf
50001  pi /opt/rtlsdr-ogn    ./ogn-decode receiver-1.conf

50002  pi /opt/rtlsdr-ogn    ./ogn-rf     receiver-2.conf                                                                                                                      
50003  pi /opt/rtlsdr-ogn    ./ogn-decode receiver-2.conf                                                                                                                      

50004  pi /opt/rtlsdr-ogn    ./ogn-rf     receiver-3.conf                                                                                                                      
50005  pi /opt/rtlsdr-ogn    ./ogn-decode receiver-3.conf

50006  pi /opt/rtlsdr-ogn    ./ogn-rf     receiver-4.conf                                                                                                                      
50007  pi /opt/rtlsdr-ogn    ./ogn-decode receiver-4.conf

Now we need to restart the service (stop and start the receiver(s) and decoder(s)) and we are finished.

sudo service rtlsdr-ogn restart

You can test if everything runs smoothly by telneting to each of the ports 50000-50007. Additionally, you can see decoding info on HTTP ports 8080-8087.

Extra tips

One of the things that may need a consideration is additional power supply as powering all the dongles from the original 5V/2A Raspberry Pi power supply may be insufficient (mainly due to the narrow power trails on the Raspi's PCB). Here a powered USB hub is a good solution.

Second issue may be high temperature on the raspi's CPU caused by heavy load induced by the decoders. Therefore a heat sink or even a fan may be needed :)

Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License