Getting Started With RTL-SDR

sdr_feat

GNU Radio

GNU Radio is an incredible piece of software, allowing you to design and create software based radios. When these software radios are combined with a general purpose hardware receiver such as RTL-SDR, you can replace what would have once taken a whole room full of expensive radio equipment with a decently powerful desktop computer.

A “simple” software radio in GNU Radio

Unfortunately, this power comes at a steep price. GNU Radio is a very complex program, and anyone without a working knowledge of radio technology will have a lot of trouble getting anything done on their own with it. Luckily for those of us without ham licenses, there is more user-friendly software available for RTL-SDR, but they all require GNU Radio installed to function, so we’ll need to go ahead and build GNU Radio even if you never intend on using it directly.

The suggested method of installing the latest version of GNU Radio is to use the “build-gnuradio” script written by Marcus Leech. Running this script will download all of the latest sources, configure the system, and build all of the binaries. This may take quite some time depending on your hardware, so don’t expect to do anything with your computer for the next hour or so.

To start the GNU Radio build process, simply download the script and make it executable:

bash$ wget http://www.sbrac.org/files/build-gnuradio
Resolving www.sbrac.org... 174.142.32.20
Connecting to www.sbrac.org|174.142.32.20|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 29181 (28K) [text/plain]
Saving to: `build-gnuradio'
100%[======================================>] 29,181      --.-K/s   in 0.1s
2012-06-24 19:38:08 (255 KB/s) - `build-gnuradio' saved [29181/29181]
bash$ chmod +x ./build-gnuradio
bash$ ./build-gnuradio
This script will install Gnu Radio from current GIT sources
You will require Internet access from the computer on which this
script runs. You will also require SUDO access. You will require
approximately 500MB of free disk space to perform the build.

This script will, as a side-effect, remove any existing Gnu Radio
installation that was installed from your Linux distribution packages.
It must do this to prevent problems due to interference between
a linux-distribution-installed Gnu Radio/UHD and one installed from GIT source.

The whole process may take up to two hours to complete, depending on the
capabilities of your system.

Proceed?

This a very complete and well implemented installation script, it’s even smart enough to install required dependencies (there are quite a few) via your distribution’s package manager. Not only does the script build and install GNU Radio itself, but it will also download all of the RTL-SDR packages as well.

If you really want to build GNU Radio from source manually, you can do so by following along with the build guide from the GNU Radio Wiki. This is how I originally got GNU Radio installed on my machine before using “build-gnuradio”, though I would certainly use the script for future installations.

Note: Your distribution may already include GNU Radio in its repositories, but that version is likely too old, and certainly won’t include the RTL-SDR software with it. So even if you are on a distribution which offers precompiled GNU Radio packages, build it from source.

RTL-SDR Benchmark

Before going any farther, it would be a good idea to use our newly installed RTL-SDR software to test the hardware and make sure everything is operating as expected. RTL-SDR includes a handy tool to benchmark the capability of a connected RTL2832U tuner, which we can use to verify the hardware and software is communicating properly. To test your tuner and run a quick benchmark on it, simply do the following:

bash$ rtl_test -t
Found 1 device(s):
  0:  ezcap USB 2.0 DVB-T/DAB/FM dongle

Using device 0: ezcap USB 2.0 DVB-T/DAB/FM dongle
Found Elonics E4000 tuner
Benchmarking E4000 PLL...
[E4K] PLL not locked for 51000000 Hz!
[E4K] PLL not locked for 2229000000 Hz!
[E4K] PLL not locked for 1115000000 Hz!
[E4K] PLL not locked for 1245000000 Hz!
E4K range: 52 to 2228 MHz
E4K L-band gap: 1115 to 1245 MHz

This output shows us that the Ezcap device is being detected properly, and that it contains the desired E4000 tuner hardware. In addition, it has run a quick test and verified its capability to tune between 52 and 2228 MHz (with the expected gap in the 1100-1250 MHz area).

If you don’t see your device under rtl_test, something’s wrong. Check you permissions on the device, and that your distributions kernel is up to date. If everything seems to be in order, you may want to head to ##rtlsdr on Freenode or the RTL-SDR subpage on reddit to ask for help.

Gqrx

Developed by the very talented Alexandru Csete (OZ9AEC), Gqrx has only recently gained RTL-SDR support, but is already one of the best options for new users. It features a very straightforward Qt GUI, and has enough functionality and features to keep a beginner interested while they get the hang of things. I’ve tried a few of the GUI tools for RTL-SDR, and I’ve had the best luck (by far) with Gqrx.

Opening Gqrx project in Qt Creator

Gqrx is a QT4 program, and as such its installation is a bit different from what you might expect. To begin with, make sure you have QT4 installed via your distribution’s package manager, and that have the “qtcreator” tool installed.

Then download the source for Gqrx via its page on github (click “Download as tar.gz”), and extract it into a directory on your system. After the Gqrx source has been extracted, open Qt Creator, click “File”, then “Open File or Project”. In the following dialog, navigate to where you extracted the source and select the file named “gqrx.pro”.

A dialog should pop up titled “Target Setup” with “Desktop” selected. You can simply click “Finished” on this dialog, after which Qt Creator will scan this file for a minute or so, which will be indicated by two loading bars on the right hand side.

Once the source code has been scanned and Qt Creator is ready to proceed, click “Build” followed by “Build All”. This process can take several minutes depending on processor speed, and you will likely see many warnings pop up in the bottom display, this doesn’t seem to effect the build and it should complete successfully (I received over 500 warnings before Gqrx finished building).

Once it is complete a directory should have been created in the same directory the Gqrx source was in called “gqrx-build-desktop”. In this directory you will find the “gqrx” binary which you can run to start the program.


Tom Nardi

Tom is a Network Engineer with focus on GNU/Linux and open source software. He is a frequent submitter to "2600", and maintains a personal site of his projects and areas of research at: www.digifail.com .

Related posts

  • Pingback: Getting Started With RTL-SDR | OpenSource.Cipto.US

  • Zilvinas Atkociunas

    Nice article!
    Just yesterday I saw linrad has got rtlsdr support too!

  • Joe

    Thanks for the article.

    Just a small grammatical error: “You now possess a software defined radio setup that would have costed hundreds of dollars” -> cost.

    http://www.verbix.com/webverbix/English/cost.html

  • http://profiles.google.com/plattypus1 Justin Nelson

    Ham isn’t an acronym, so it needn’t be capitalized. Thanks for the article, I’m buying one of these things right-the-hell-now.

    73 DE AE6YD

  • Pingback: Getting started with software defined radio - Hack a Day

  • Pingback: Getting started with software defined radio | vis a vis | visual mind

  • Pingback: Getting started with software defined radio « Hackaday « Cool Internet Projects

  • Pingback: Links 27/6/2012: Google Tablet, CyanogenMod 7.2 | Techrights

  • Pingback: Getting started with software defined radio | Hacking Academy

  • en1gma

    this is fucking amazing
    the real DEVS never get mentioned in this at all

    where the fuck is SDRSHARP that is way better then GQRX!

    “To start the GNU Radio build process, simply download the script and make it executable:”

    hey you fucking prick the guy who made that is name Patchvonbraum

    “RTL-SDR Benchmark”

    fucking prick again
    the guys name is (I Believe) Steve|m

    do some fucking research you fuck and next time mention the devs names
    hackaday is really letting me down
    i cant tell if they are blatently not mentioning the REAL devs or if they are just fucking clueless

    • WTF?

      Yo…what are you even trying to say. You want the dev to be mentioned by name everytime their software is referenced in a guide or online? Are you serious???

      • jgm

        Yup, including 17 pages of LIbreOffice contributors every time that’s mentioned. :-) Actually, he wants their handles(?) mentioned, which is even more ridiculous.

    • Sue W

      Lighten up bébé…The idea of Hack-A-Day, Make blog, adafruit blog etc. is to showcase interesting links or ideas, is it not? We can all do the “research” if we are interested in the idea…

      As for being clueless, your complaint would be more readable with less invective and more links or content.

    • http://www.digifail.com/ Tom Nardi

      Listen, it would be one thing to claim that somebody ELSE was the developer of a piece of software. In that case, I could see how you would be upset that the proper developer wasn’t getting credited, and somebody else was grabbing the notoriety (such as it is). Certainly that would be a mistake that needs fixing.

      But to be this pissed off because each developer wasn’t named specifically in the article is absolutely ridiculous. If we had to call out the devs for every piece of software we covered here on the site, we wouldn’t have time to actually write the articles. You want us to include a list of 10,000 or so developers every time we mention Linux too?

      The fact is, people don’t write open source software for fame and fortune. In almost every case, they wrote the software because it filled a need for themselves (either practical, or just in the challenge) and they decided to share it with others.

      I can absolutely guarantee you that the developers of RTL-SDR are not sitting around worrying about whether or not all of their names are reprinted every time somebody mentions their project. They are just happy it’s being used and improved upon, which is the whole point of putting something out as open source.

  • http://profile.yahoo.com/YEBNHQY6UK6EV45OHENQLN4KNU Alan

    en1gma has an abusive tone – but also a point.
    You don’t need to dump Windows to use SDR – SDR Sharp works fine.

  • Kilouy

    sweet! nice job

  • Falcon5nz

    Hey man, Thanks for the article. Just one point, isn’t gain closer to sensitivity? Wouldn’t “…which is essentially the sensitivity. Turn this up to hear more of the signal…” have made more sense?

  • Pingback: KW 26 « μcpat

  • Big_James

    I don’t think all of those ezcap sticks are created equal. Your table says that the ezcap usb 2.0 stick has an E4000 tuner. Mine has an fc0013 in it and also says EzTV645 on the board inside the case. It was purchased from the link that you proclaimed worked (deal extreme). i have yet to get the drivers working properly but I’m working on it.

    J

    • http://www.digifail.com/ Tom Nardi

      Probably not, the suppliers DX uses are pretty well known for changing internal components as they see fit. Basically, they use whatever they can get the cheapest at that point in time.

      You got the exact same SKU as the one I used? DX sells three identical Ezcap tuners all with different price points, SKUs, and internals.

  • ErrK

    definitely going to solder in an F connector

    • http://www.digifail.com/ Tom Nardi

      Good idea.

      I plan on putting mine into a metal enclosure to try and cut down on outside interference. If you look on the RTL-SDR Reddit, there are a few good threads about hardware modifications to clean up the signal and improve sensitivity.

  • Kyle Hotchkiss

    Hey! Could you get that images content into an actual table with links?

  • Pingback: $30 sdr rx - The RadioReference.com Forums

  • didiet radityo

    please i have an error

    $ rtl_test -t
    Found 1 device(s):
    0: Generic RTL2832U (e.g. hama nano)

    Using device 0: Generic RTL2832U (e.g. hama nano)
    usb_claim_interface error -6
    Failed to open rtlsdr device #0.

    if you have a clue to solve this let me now..
    thanx
    best regard

    • Guest

      Hi. Same problem. What now?

      • Darren

        Why not just blacklist the module?

    • dan__n

      Hi Didiet. Solution for you (and me :-):

      =============================================
      git clone git://git.osmocom.org/rtl-sdr.git
      cd rtl-sdr/src/

      echo -e ’1056a1057,1058n> libusb_detach_kernel_driver(dev->devh, 0);n> ‘ | patch -i – librtlsdr.c

      cd ..
      mkdir build
      cd build
      cmake ../
      make
      sudo make install
      =============================================

      Enojoy!

      • Petter Gustad

        Which version of the source does this patch belong to? I think the line numbers have changed. It did not work for me with 5f88049c0.

        What part of the code should be patched? Is this available in the repo yet?

        • eMPee584

          The line numbers have indeed changed a lot, just look here for the context where to insert the line:http://lists.osmocom.org/pipermail/osmocom-sdr/2012-May/000105.html

          The problem is that the DVB-T driver registers with the kernel and claims the device, so it needs to be detached in order to reclaim it by libsdr. Why they haven’t included that patch in their current git code i have no idea?!

    • kurt

      Dear ,

      that’s the solution for me

      Running as an unprivileged user
      The rtl-sdr project comes with udev rules, so you can access the device as a regular user. To install the udev rules:

      ~$ cd src/rtl-sdr/
      ~/src/rtl-sdr$ sudo cp rtl-sdr.rules /etc/udev/rules.d/
      ~/src/rtl-sdr$ sudo service udev restart
      Stopping the hotplug events dispatcher: udevd.
      Starting the hotplug events dispatcher: udevd.
      Now if you eject and re-insert your USB stick, udev should set the correct permissions.

      • dan__n

        But this may not be enough and the patch is then needed.

  • Jay

    Nice quick start guide. Worked just as described. Only the QT piece could benefit from abit more detail for newbies like me. I ended up getting the QT Linux online installer from http://qt.nokia.com/downloads/ and then it was pretty straightforward. Thank you!

  • Pingback: Fun with cheap TV-tuner dongles and Software Defined Radio (SDR) « Outguessing the machine

  • Pingback: Getting Started with RTL-SDR « kabelmast

  • Pingback: Open Source's Final Frontier: Interview with Alexandru Csete

  • Pingback: New to SDR and Digital Decoding - The RadioReference.com Forums

  • Pingback: hybrid FM TV tuner for streaming - Page 2

  • Pingback: My 3 SDR Choices-HELP! - The RadioReference.com Forums

  • Pingback: Four short links: 23 October 2012 - O'Reilly Radar

  • Pingback: Cheapo Software Defined Radio – Getting Started With RTL-SDR « @ggregator

  • Pingback: Software Defined Radio | TinkerSoc

  • Pingback: Software Defined Radio on ASUS Eeepc | Kent Frazier, K5KNT

  • Pingback: GNU_Radio | Pearltrees

  • Pingback: GNU Radio and Gqrx SDR Receiver « Jeff's Skinner Box

  • Pingback: RTL2832 SDR on Arch Linux Fixes — Tx0Rx0

  • Pingback: Wine Lovers Guide

  • http://www.peluzza.es/ peluzza

    Hi! thanks for this amazing tutorial!
    I live in Spain, Europe, so, i’m wondering what would happen if I plug the eztv to my tv home antenna, it has a tv amplifier and it cover 2200mhz range.

    Has anyone tried it?

    Regards!

Top