DVB-S2 transmission and reception with SDR

Last updated: May 31, 2019

The DVB-S2 standard for digital satellite video broadcast is extremely well engineered. You would be hard pressed to find a more refined standard to exchange lots of data with minimal errors. With many good features like multiple modulation modes and multiple code rates (using the very powerful LDPC type of FEC code) the standard is quite a beast. Since it has been implemented and used by open-source and amateur radio communities, it is possible to transmit video to yourself using software defined radios. How cool is that?

What you need:

I’m sure it can work on other versions, but at least this establishes one case. The forum post for markro92’s software is here:

and the actual software is here:

http://v.1337team.tk/dvb-s_gui_amsat.zip

Just unzip the folder and run it. Easy! ( I first used SDR# to listen to FM radio, and I also viewed the DVB-S2 signal on the waterfall. This probably set up the windows driver for RTLSDR)

Getting GNU radio working is often less easy, but just try apt install gnuradio. I’ll assume it’s working for you, it’s really a separate issue. Getting the PLUTO SDR drivers is also a separate issue, and the guide on the wiki worked for me. With the basic elements ready, lets set up GNU radio. Use your expert Google-fu to get your PLUTO able to receive and transmit.

In GNU radio just navigate to the examples folder typically found in /usr/share/gnuradio/examples/. In the dtv folder there is an example flow graph called dvbs2_tx.grc. Copy that file to your project folder and open it.

Delete the sinks and place a PLUTO SDR sink instead. Next we’ll have to change all the settings to something the Demodulator can handle. I used a code rate of 1/4 with QPSK modulation and a rolloff factor of 0.2. Make sure to check your filter taps on the FFT block. I used 96 taps.

firdes.root_raised_cosine(1.0, samp_rate, samp_rate/2, rolloff, taps)

On my SDR sink I put the LO at 917 MHz so that I’m in an ISM band, and set the attenuation to 13 dB to keep it quiet. Viewing the spectrum through SDR# I didn’t see any other activity, just to be sure. Keep in mind the PLUTO has a minimum sample rate, so if you want to use a low symbol rate you will have to change the overall sample rate of the flow graph. I used 1000k sps, making the sample rate 2M. Later I will be interested to see how I can narrow the bandwidth of the signal.

That should do it for the flow graph, except we need to point the file source to a transport stream to transmit. We need to build a transport stream file that matches the settings of the flow graph, and to do that we use ffmpeg. For this test I simply used a single frame, a jpeg picture. ffmpeg can convert to .mp4 with

ffpeg -framerate 25 -i picname.jpeg -c:v libx264 -profile:v high -crf 20 -pix_fmt yuv420p output.mp4

and convert .mp4 to .ts with

ffmpeg -i output.mp4 -c:v copy -c:a copy -muxrate 478577 -f mpegts test1.ts

This muxrate is for the settings specified in the flow graph. You can get other transfer rates for different symbol rates using dtv-utils. Make sure your PLUTO sdr had adequate power and a stable USB connection, and start transmitting through the flow graph. You should be able to see the waterfall display on SDR# or the dvbs demodulator.

Set up VLC to receive a network stream from udp://@:8888.

It can take quite some time to get a carrier lock, so keep messing with the base band gain setting until you just barely see white on the waterfall. Sometimes during lock the symbol rate deviates from your setting, so I just toggle to 1001 and back to flush it.

I was only transmitting with the antennas that come with the SDR kits at about 2 feet distance. Next up there are many practical considerations before this is actually useful. But it was extremely cool to transmit a picture over the air with the use of GNU radio.

RTL-SDR for Ubuntu 20.04 LTS

Sometimes Google-fu isn’t enough and I actually have to use logic to solve problems. (wow!)

Setting up Ubuntu to use an RTL SDR usb dongle should be easy. It should be the standard steps you can find online right?

https://www.rtl-sdr.com/a-good-quickstart-guide-for-rtl-sdr-linux-users/

Well, not always. When I tried rtl_test -t I got an error message about needing to blacklist the kernel driver. Using lsmod I could see the names of modules, where I found that dvb_usb_rtl28xxu was in use. I thought I had already blacklisted the right ones based on advice from troubleshooting posts on reddit. Actually, I had to blacklist dvb_usb_rtl28xxu and not dvb_rtl28xxu. I guess wasting 2 hours doing this is just reward for relying on archived forum posts to do my dirty work. Here’s how to actually do it…

cd /etc/modprobe.d

sudo nano blacklist-rtl.conf

blacklist *rtl module you found using lsmod*