Just got a Realtek RTL2832U and R820T based RTL-SDR dongle from Collin to play with, it is cheap approximate 20 pounds, hackers are probably using it to receive the AM,FM or RF signals from the ships and airplanes. Having seen many SDR things from Hackaday, but it is my first time to play with SDR.

To transform the USB dongle into a SDR, a driver is needed to be installed, the src of driver could be found https://github.com/steve-m/librtlsdr, still you need to compile and install the driver.

My first attempt is on my Mac Air. Just happen to find a compiled version for the OSX from the berkeley signal processing course, which rtl_sdr, rtl_tcp, rtl_test and the corresponding libraries are included. However, trying the testing command rtl_test -t failed to open the rtlsdr device for some reason.


Found 1 device(s):
0: Generic RTL2832U (e.g. hama nano)
Using device 0: Generic RTL2832U (e.g. hama nano)
Failed to open rtlsdr device #0.

Could not fix the problem at the moment, could be admin privilege issue ?? anyway, continue to try it out in my ubuntu 14.04 desktop.

1. compiling and installing the driver again from https://github.com/steve-m/librtlsdr, ( make sure libusb1.0 is installed in prior, using command : apt-get install libusb-1.0-0-dev ).

rtl_test -t

found the similar problem like MAC computer’s that it failed to open the device along with a message.

Using device 0: Generic RTL2832U (e.g. hama nano)
Failed to open rtlsdr device #0.
Kernel driver is active, or device is claimed by second instance of librtlsdr

the simple fix is to use sudo modprobe -r dvb_usb_rtl28xxu
The result from the test is


Found 1 device(s):
0: Generic, RTL2832U, SN: 77771111153705700
Using device 0: Generic RTL2832U
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.

which lists the chipset, tuner and gain values.

A permanent fix on this issue to avoid input the command times and times again is to configure as below

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

add the line
blacklist dvb_usb_rtl28xxu
save the conf and restart the linux.

Further more, tried to test FM signals using this command

rtl_fm -f 96.3e6 -M wbfm -s 200000 -r 48000 - | aplay -r 48k -f S16_LE
then you can hear the FM signal noises,
so basically it means the driver is working, so the dougle is working, and finally we can get the RF signals.

so to manipulate the signals, http://gnuradio.org/ is needed to be installed, a simple way is to install a compiled version through
$ apt-get install gnuradio

and then you would like to have a user interface application to work with, https://github.com/csete/gqrx is seemingly the best one, which requires QT, gnuradio and driver to be installed in prior. When trying to compile and install qqrx from the src, a problem occurred that Project ERROR: Package gnuradio-analog not found. I have no idea why gnuradio-analog components is not found or not in the compiled version. Anyway, I removed the compiled gnuradio and tried to compile and install the lastest gnuradio from the source code – http://gnuradio.org/redmine/news/44. Specific guide could be found here , http://gnuradio.org/redmine/projects/gnuradio/wiki/UbuntuInstall.

The compiling and installation process usually takes a hour long. Tried to install gqrx again, but another issue found : Project ERROR: Package gnuradio-osmosdr not found. No idea why some packages are still missing after the complete installation of gnuradio.

However, luckily found a online compiled version.
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

so at last gqrx is installed

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

so right now I got the things running by typing the gqrx in the ubuntu applications.
unnamed
So let me see what I can do more about it.

Advertisements