D-ATV Payload – Receiving with Linux + LeanSDR

Receiving DVB-S Signals – Linux + LeanSDR

If you’re running a Linux platform, we can receive the DVB-S signal using a RTLSDR and the LeanSDR software stack. This guide assumes you are running Ubuntu 20.04. It will probably work on other Ubuntu/Debian-based distributions, but has only been tested on Ubuntu 20.04.

Installing Dependencies

You’ll need to install a few dependencies to be able to compile and run the decoder. Open a terminal and run (note that the $ indicates the command is to be entered into a terminal, so should not be typed in):

$ sudo apt-get install build-essential rtl-sdr git libfftw3-dev libiio-dev libx11-dev mplayer

You can now download and compile the leansdr utility by running:

$ git clone http://github.com/projecthorus/leansdr.git

$ cd leansdr/src/apps

$ make


There may be some warnings about libiio not being found, these can be ignored.

Running the Decoder

Open a terminal and navigate to the leansdr/src/apps directory that we were in before. Start the decoder by running:

$ ./start_horus.sh

If you are running on a fast machine (i5 or better), I would recommend running:

$ ./start_horus_viterbi.sh

This enables Viterbi forward-error correction, which will improve demodulator performance, but does us a *lot* more CPU (95% of a core on my i5 laptop). It should give something like 3-4 dB decode improvement, so use it if you can! If all is working, a bunch of windows will immediately pop up, as follows:

The image above has annotations showing what each window represents. In this example we are receiving a reasonably clean (not perfect) signal, as evidenced by the constellation diagram showing four fairly clean regions.

The spectrum displays do not auto-scale like many other receiving software does, and so you may not see much in them if the signal is weak! The key window to look at to judge signal quality is the constellation diagram window – if you are seeing four distinct ‘blobs’ then you are likely receiving a signal!

Note that the video window (mplayer) will only show up once you are receiving a valid signal, and it may take a few seconds to appear even then.

You can stop the decoder by hitting Ctrl+C in the terminal window. You might need to press Ctrl+C a few times for it to completely exit.

In this case the signal level is actually a little bit too high, and if we reduce the gain slightly we can improve the decoder performance. To modify the gain settings (and other settings), you need to edit that start_horus.sh file we ran earlier. We can edit this in a terminal by running:

$ nano start_horus.sh

(or nano start_horus_viterbi.sh if you are using that version)

Look for a line containing GAIN=0 . The 0 value indicates the use of the RTLSDR’s automatic gain control (AGC), which should be sufficient in most cases.

If necessary, the gain can be adjusted by changing this value to something between 1 and 49.

Save the file by hitting Ctrl+X, then Y. Restart the decoder by running ./start_horus.sh

The above image shows the input level displays and constellation diagrams with a lower gain setting. The constellation regions now look a little cleaner.