Software Defined Radio on Ubuntu USB HDD

I’d like to use Linux with my cheap USB RTL2832U DVB receiver and my Noelec Ham It Up upconverter to browse HF bands. The de facto SDR application that’s easy to use is SDR# (SDR Sharp). It’s a Microsoft Windows app. We don’t do Microsoft Windows here, so we need the nearest thing which is gqrx made by OZ9AEC. gqrx needs GNURadio (or, at least, very large parts of it). I’ve tried various installs of GNURadio SDR (Software Defined Radio) and it has all sorts of Python, etc. dependencies that can stop other tools working. Therefore I’m making a USB boot disk with Ubuntu, GNURadio, gqrx (‘SDR# for Linux’) and, of course, the drivers for the RTL238U.

Prerequisites

You’re going to need a USB hard disk – I used a 500GB which has more than enough room and didn’t cost much more than a USB flash drive of one tenth the capacity. The prerequisites for installing GNURadio alone are about 1.5G – of which there are many, many small files so you really do need a good sized partition to work in. You’re going to need to download Ubuntu and install it on the USB HDD. One tip, for safety and to ensure that Ubuntu doesn’t alter it, switch of your machine and unplug your computer’s internal HDD and boot from a USB stick with the Ubuntu distro on it. In that way you can be sure that when you unplug the USB HDD when all is said and done, you’re back to your usual workstation OS. I found out the hard way – Ubuntu 13.10 diddled with the boot loader on my internal HDD despite me asking it not to. After 30 minutes’ fraught work with the Boot Repair Linux distro on another USB flash drive I was eventually booting as expected – from the external HDD when plugged in at boot and from the internal HDD when unplugged at boot.

Install GNURadio

If you want to GNURadio to play nice with gqrx (and you probably are), you’re going to want to build GNURadio from source – the packages in the Ubuntu repository are a bit old. The easiest way to install GNURadio from source onto Ubuntu is to use Marcus Leech’s build-gnuradio script.

Get the script following the details on the GNURadio site.

This pretty much worked as expected for gnuradio and I was up and running with grcc and the dial_tone example quickly. Then I plugged in my DVB dongle and managed to get rtl_fm (already installed as part of the gnuradio install script.

rtl_fm -f 105.5M -s 44100 -g5 -l 10 - | aplay -t raw -r 44100 -c 1 -f S16_LE

Then, for the final step, gqrx, the ‘SDR# for Linux’.

sudo apt-get install qt4-default
sudo apt-get install phonon-backend-gstreamer

Change directory to ~/src or something like that.

git clone git://github.com/csete/gqrx.git
cd gqrx
qmake gqrx.pro
make

sudo rmmod dvb_usb_rtl28xxu rtl2832
sudo vi /etc/modprobe.d/no_rtl.conf

In that file, you need some directives to stop the TV watching software stack from loading (sheesh, who wants to watch TV with a DVB TV USB dongle?!?!?):

blacklist dvb_usb_rtl28xxu
blacklist rtl2832
blacklist rtl2830

Reboot, change directory to your gqrx build and

./gqrx

Screenshot from 2014-03-29 06:41:31