software defined radio on the cheap with a DVB stick

I think I first learned about software defined radio a few years ago on the chaosradio podcast. I was totally excited about the idea, and immediately installed gnuradio not only on my computers, but at times also on the smartphone. The USRP has been on my wishlist ever since. That’s the hardware device most commonly used with gnuradio. The downside was the price tag. While the approx $ 1’000 are not much compared to commercial solutions, it was too much for just another project to toy around, and I didn’t have an idea for a project where I must have one so far.

Then in last February (2012), I read on a blog post that was probably linked from hacker news that somebody found out that a cheap DVB tuner USB stick could be used as an SDR receiver. That was exactly what I’ve been waiting for the past few years, except that a device with TX would be even cooler. Immediately I went to the local electronics shops with a compatibility list. But in most shops they had no clue, and they couldn’t even find out what chipset was in the devices they sold. In a more professional shop they tried to find out the chipset, and they had a device that looked very similar to one on the compatibility list. But it didn’t work. So, I ordered one directly from china. It took almost two months to get here, but then it took another two month before I really started experimenting with it beyond checking if I could sample something to the harddisk. Here is some background information.

I had gnuradio installed on my computers for some years without ever really using it. And just now when I was going to need it, it was removed from the debian and ubuntu repositories. They say the packaged version was outdated, and for this stuff, a recent version is required anyway. I was lucky, and found a ppa on launchpad with gnuradio as well as rtl-sdr packaged.

add-apt-repository ppa:roman-moravcik/gnuradio
apt-get update
apt-get install gnuradio librtlsdr-dev libgnuradio-baz-dev libosmosdr-dev libgnuradio-osmosdr-dev

So I could test the capabilities of my device:

$ 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
Supported gain values (18): -1.0 1.5 4.0 6.5 9.0 11.5 14.0 16.5 19.0 21.5 24.0 29.0 34.0 42.0 43.0 45.0 47.0 49.0
Benchmarking E4000 PLL...
[E4K] PLL not locked for 51000000 Hz!
[E4K] PLL not locked for 2182000000 Hz!
[E4K] PLL not locked for 1091000000 Hz!
[E4K] PLL not locked for 1265000000 Hz!
E4K range: 52 to 2181 MHz
E4K L-band gap: 1091 to 1265 MHz

Now, I tried to replicate a flow graph that I saw somewhere in the GnuRadioCompanion. That’s actually a really cool application. I reminded me a bit about harpia, in that you can connect some building blocks in a gui, and from that it generates a python script. Although, the flow graph looked the same, I kept getting errors when trying to execute:

Showing: "/home/richi/sourcecode/sdr_dvb_experiments/sdr.grc"

Generating: "/home/richi/sourcecode/sdr_dvb_experiments/top_block.py"
>>> Warning: This flow graph may not have flow control: no audio or usrp blocks found. Add a Misc->Throttle block to your flow graph to avoid CPU congestion.

Generating: "/home/richi/sourcecode/sdr_dvb_experiments/top_block.py"
>>> Warning: This flow graph may not have flow control: no audio or usrp blocks found. Add a Misc->Throttle block to your flow graph to avoid CPU congestion.

Executing: "/home/richi/sourcecode/sdr_dvb_experiments/top_block.py"

Traceback (most recent call last):
  File "/home/richi/sourcecode/sdr_dvb_experiments/top_block.py", line 194, in <module>
    tb = top_block()
  File "/home/richi/sourcecode/sdr_dvb_experiments/top_block.py", line 49, in __init__
    proportion=0,
  File "/usr/lib/python2.7/dist-packages/gnuradio/wxgui/forms/forms.py", line 234, in __init__
    self._add_widget(self._text_box, label)
  File "/usr/lib/python2.7/dist-packages/gnuradio/wxgui/forms/forms.py", line 113, in _add_widget
    update(self[INT_KEY])
  File "/usr/lib/python2.7/dist-packages/gnuradio/wxgui/forms/forms.py", line 101, in <lambda>
    update = lambda x: wx.PostEvent(widget, DataEvent(x))
  File "/usr/lib/python2.7/dist-packages/gnuradio/wxgui/forms/forms.py", line 53, in __init__
    wx.PyEvent.__init__(self, wx.NewId(), EVT_DATA.typeId)
AttributeError: 'PyEventBinder' object has no attribute 'typeId'

Hmmm, strange. Let’s wait for an updated version of those experimental packages…

In the meantime, I found out about sdrsharp and how to get it to run. Well, I don’t particularly like .net stuff, and with the instructions I have an application sitting in some random location with some arbitrary configuration. But at least it works, at least the nightly build.  It is pretty buggy, and it’s not the fancy decoding of whatever protocol you like that’s so cool about gnuradio, but it’s a nice visualization. But somehow I have the impression there should be more to see at 88MHz FM since a local radio station transmits at that frequency.

There’s another visualization app in the makes: GqRx

Last time I tries I couldn’t get it to work, but from what I understand, the support for the DVB sticks was added only recently. And this one is based on gnuradio and Qt. On top of that, it will probably appear packaged sometime soon. So, definitely something to look forward to…

Update 15.09.2012

I found out that the GnuRadioCompanion works on my netbook which as well as my Workstation runs Ubuntu 12.04, although only 32bit. In a recent drdobs rticle I found a grc file that works well. Although the netbooks has barely enough performance.

Update 28.10.2012

After the upgrade to Ubuntu 12.10 quantal, everything works fine on my workstation as well. And this machine is powerful enough to smoothly run gnuradio. I can now listen to FM radio using the blocks from the Dr Dobbs article.


Posted

in

, ,

by

Comments

2 responses to “software defined radio on the cheap with a DVB stick”

  1. Murat TA1DB Avatar
    Murat TA1DB

    Hi,
    I have GNU Radio and GRC installed on Windows 7 but unfortunately without RTL2832 support i..e. I have no “RTL2832” source. I am trying to add this source to my existing GRC installation or at least to run the Multimode.py but I always get error messages about missed files etc. therefore I can’t succeed. I run RTL test execs like rtl_test rtl_fm etc and I use SDR# HDSDR with ExtIO and Zadig, not problem on these at all, however I can’t run multimode and GRC with RTL2832 source.
    For ubuntu and others there are many scripts to load the complete GNU package with RTL2832 support but as far as I understand and experienced these doesn’t work on Win7. I apprecaite very much if someone can help me on how to add a RTL2832 source to my GRC. Thanks in advance.

  2. p cyr Avatar

    I have 2 of these devices and there is no software that will run them the recomended software sigmire is not all there and other programe show up at dead websites this is the biggest scam I have ever seen to expensive to send them back it cost as much for postage than the piece of junk is worth never again this is by far the most not supported piece of junk I have ever bought I guess I will mail them to the trash I will also reprogram them with a torch then a software update with a hammer

Leave a Reply

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