Central Seven

Science is fun!

SDR-RTL with R820T2 and DVB-T

I recently had the pleasure of purchasing a NooElec SDR-RTl. Based on the R820T2 chip, these $15 USB devices are capable of picking up signals from 24 to ~1766 MHz, which covers a fair bit of the usable spectrum.They can’t transmit, but they’re cheap enough and powerful enough that they would make a fun toy and great way to learn about Software Defined Radio (SDR). As a forward, I know absolutely nothing about SDR and RF. I’m setting up this post as a way for me to keep some notes about what I did to make things work.

So the basics, on my laptop I’m running Linux Mint 13 Maya (aka Ubuntu Precise 12.04 LTS). When I plug it in, I find this in the syslog:

[173458.614525] usb 2-1.2: new high-speed USB device number 7 using ehci_hcd
Dec 25 11:21:44 ZZZZ mtp-probe: checking bus 2, device 7: "/sys/devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.2"
Dec 25 11:21:44 ZZZZ mtp-probe: bus: 2, device: 7 was not an MTP device

Not especially helpful. Running lsusb showed the device, so that’s promising:
Bus 002 Device 010: ID 0bda:2832 Realtek Semiconductor Corp. RTL2832U DVB-T

I looked through a number of pages, and it looks like the next best step is to install GNUradio. One of the better references I found was GNUradio.org, which has nice instructions for installing from source. Supposedly Ubuntu has a repository or PPA out there that has a .deb with GNUradio, but I couldn’t find the working one. GNUradio links to a script that will do most of the heavy lifting of installing for you. It takes about a 30-45 minutes on my little laptop, took about 500 MB, but reported no errors.
wget http://www.sbrac.org/files/build-gnuradio
chmod +x build-gnuradio
./build-gnuradio

So with that done, quick test, sample rate of 1.8MHz at a frequency of 27MHz (which happens to the frequency of a new remote helicopter I received as a gift):
rtl_sdr /tmp/capture.bin -s 1.8e6 -f 27e6

If I run that without the device in, I get No supported devices found, but when I run it with it in…
Found 1 device(s):
0: Generic, RTL2832U, SN:

Using device 0: Generic RTL2832U
Found Rafael Micro R820T tuner
Sampling at 1800000 S/s.
Tuned to 27000000 Hz.
Tuner gain set to automatic.
Reading samples in async mode...

So that much works, anyway.

When I run gnuradio_companion, though, it doesn't list the RTL2832U as a source, so I'll need to install a little bit extra. GR-baz is a GNU-Radio Project that adds additional functionality to the standard GNU-radio

git clone git://github.com/balint256/gr-baz.git
cd gr-baz
mkdir build
cd build
cmake ..
make
sudo make install
sudo ldconfig

I ended up having to install a couple of dependencies, libusb-dev and libboost, to make it work.

Now I run gnuradio-companion again, and I see the RTL2832 module in the sources menu on the right frame.

Last step in the basics, actually demodulating something; pulling the signal from the noise. I tried the workflow available on this website, but I had the following errors:
Error: Block key "gr_throttle" not found in Platform - grc(GNU Radio Companion)
None
>>> Error: Block key "blks2_wfm_rcv" not found in Platform - grc(GNU Radio Companion)

It appears that with newer version of GNU radio, certain block keys have been moved around, so they're not found in the same place. At this point, things seem to be working. Will continue later to actually doing something useful.

Dantana • December 22, 2014


Previous Post

Next Post

Leave a Reply

Your email address will not be published / Required fields are marked *