Pages

Sunday 6 December 2015

SDR Realtek RTL2832U from Aliexpress

Installation Packages



Before we begin installing our decoding radio software we will need to install the following components. Simply issue the following command from the command line:

sudo apt-get install git cmake libboost-all-dev libusb-1.0-0-dev python-scitools portaudio19-dev -y



gqrx - Software Defined Radio



"gqrx" is a Software Defined Radio that supports a wide range of devices. In this example we will be using the low cost RTL2832U based DVB-T dongles.

gqrx has the following features:


  • Discover devices attached to the computer.
  • Process I/Q data from the supported devices.
  • Change frequency, gain and apply various corrections (frequency, I/Q balance).
  • AM, SSB, FM-N and FM-W (mono and stereo) demodulators.
  • Special FM mode for NOAA APT.
  • Variable band pass filter.
  • AGC, squelch and noise blankers.
  • FFT plot and waterfall.
  • Record and playback audio to / from WAV file.
  • Spectrum analyzer mode where all signal processing is disabled

Installing gqrx



To install "gqrx" we need to add a "ppa" (Personal Package Archive) to our system. To do this we simply issue the following commands:

sudo add-apt-repository ppa:gqrx/releases
sudo apt-get update
sudo apt-get install 
gqrx-sdr

Once the relevant packages/software have been installed, you now insert your USB dongle. You can run a quick test to confirm that your system can see the USB device. Issue the command :

rtl_test -t

If you see the statement "Kernel driver is active, or device is claimed by second instance of librtlsdr", then don't panic, simply issue the command:

sudo modprobe -r dvb_usb_rtl28xxu

Basically the newer kernel that comes with Ubuntu already contains a DVB driver, however, we do not want to use this. The above "modprobe -r" command unloads this from the kernel, however for a permanent solution you will need to create the following file:



$ cd /etc/modprobe.d/
$ vi ban-rtl.conf

Now add the following line:


blacklist dvb_usb_rtl28xxu

Save your changes.  This change will come into effect when the system is re-booted. The name of the ".conf" file is not important as long as the file ends with ".conf". 



The command  rtl_test -t should give similar output:

Found 1 device(s):
  0:  Realtek, RTL2838UHIDIR, SN: 00000001

Using device 0: Generic RTL2832U OEM
Found Rafael Micro R820T tuner
Supported gain values (29): 0.0 0.9 1.4 2.7 3.7 7.7 8.7 12.5 14.4 15.7 16.6 19.7 20.7 22.9 25.4 28.0 29.7 32.8 33.8 36.4 37.2 38.6 40.2 42.1 43.4 43.9 44.5 48.0 49.6 
Sampling at 2048000 S/s.
No E4000 tuner found, aborting.
From the above we can see that our USB dongle has been recognised. (Found Rafael Micro R820T tuner)

Starting gqrx - Software Defined Radio

To start "gqrx" simply type gqrx at the command line. Hopefully now you should see a screen similar to the one below:

Wednesday 26 August 2015

Radio Tray elementary os fix

To Install type this in the terminal:
sudo apt-get install radiotray

Then go to:
gedit /usr/lib/python2.7/dist-packages/radiotray/SysTray.py

Now find this line: gtk.gdk.threads_init()

Comment it with a pound sign in front of it:
# gtk.gdk.threads_init()

Save it and open it from the apps drawer.