Hi folks,
I've just added RTL2832 support to gr-baz http://wiki.spench.net/wiki/Gr-baz with support for both tuners (Elonics E4000 and Fitipower FC0013).
I've taken rtl-sdr http://sdr.osmocom.org/trac/wiki/rtl-sdr and created a fully-featured GNU Radio Source block http://wiki.spench.net/wiki/Gr-baz#rtl_source_c 'baz.rtl_source_c' (with GRC block) that outputs complex values, and allows adjustment of frequency, sample rate and LNA gain. There is also an optional automatic tuner mode control for the E4000. The Source block performs internal multi-threaded buffering for smoother performance (this might be over-engineered, but it seemed to help with the ExtIO plugin http://wiki.spench.net/wiki/USRP_Interfaces I mentioned in my previous post here).
You can get the source code from my SVN http://svn.spench.net/main/gr-baz/ or github https://github.com/balint256/gr-baz (though please visit the info page http://wiki.spench.net/wiki/Gr-baz#rtl_source_c first for more info/pre-reqs - e.g. libusb-1.0, etc). It's experimental, and not the prettiest because I actually ported it back from the ExtIO plugin, but it works for me and if you want to help test/clean it up then that would be very much appreciated!
To see it in action, have a peek here: http://youtu.be/FUQd9HOVTk8
Balint @spenchdotnet http://twitter.com/spenchdotnet
Hi Balint, hi list!
Nice work creating a gnuradio source out of rtl-sdr, thank you for that. But I've tested it using a Dexatek DVB-T Dongle which uses a FC0013 tuner and there are two issues I ran into. First, there is the wrong handling of a return value when setting the frequency on the FC0013. The attached patch integrates the Dexatek and fixes that issue.
But the second one isn't as easy to fix because I guess you would need some more insight into how a Gnuradio block is constructed to do that. The following python std::runtime_error exception is thrown in grc everytime a graph using the RTL2832 source is started.
[...] Wait delay: 11,130 ms
gr_fir_fff: using SSE
Traceback (most recent call last): File "/home/mad/gr/top_block.py", line 109, in <module> tb = top_block() File "/home/mad/gr/top_block.py", line 82, in __init__ self.connect((self.rtl2832_source_0, 0), (self.blks2_wfm_rcv_0, 0)) File "/usr/local/lib/python2.7/dist-packages/gnuradio/gr/top_block.py", line 124, in connect self._connect(points[i-1], points[i]) File "/usr/local/lib/python2.7/dist-packages/gnuradio/gr/top_block.py", line 129, in _connect self._tb.primitive_connect(src_block.to_basic_block(), src_port, AttributeError: 'baz_rtl_source_c_sptr' object has no attribute 'to_basic_block'
Perhaps you have some idea about that. BTW, I'm using 3.5.2.1 Gnuradio with 2.7.2+ Python, your feaf6c commit of gr-baz and using stand-alone rtl-sdr the stick works well.
Regards, Mad
Dear Mad,
Thank you very much for identifying this bug, adding a new device and sending the patch! I have added it all to the code on SVN, githib and the Windows plugin.
As for the second issue, I can't shed any light on that. I'm actually still on 3.3 and 3.4 - I need to get with the 'program' :)
Kind regards, Balint
-----Original Message----- From: mad [mailto:mad@auth.se] Sent: Saturday, 31 March 2012 10:44 AM To: Balint Seeber Cc: osmocom-sdr@lists.osmocom.org Subject: Re: RTL2832 GNU Radio Source block now in gr-baz
Hi Balint, hi list!
Nice work creating a gnuradio source out of rtl-sdr, thank you for that. But I've tested it using a Dexatek DVB-T Dongle which uses a FC0013 tuner and there are two issues I ran into. First, there is the wrong handling of a return value when setting the frequency on the FC0013. The attached patch integrates the Dexatek and fixes that issue.
But the second one isn't as easy to fix because I guess you would need some more insight into how a Gnuradio block is constructed to do that. The following python std::runtime_error exception is thrown in grc everytime a graph using the RTL2832 source is started.
[...] Wait delay: 11,130 ms
gr_fir_fff: using SSE
Traceback (most recent call last): File "/home/mad/gr/top_block.py", line 109, in <module> tb = top_block() File "/home/mad/gr/top_block.py", line 82, in __init__ self.connect((self.rtl2832_source_0, 0), (self.blks2_wfm_rcv_0, 0)) File "/usr/local/lib/python2.7/dist-packages/gnuradio/gr/top_block.py", line 124, in connect self._connect(points[i-1], points[i]) File "/usr/local/lib/python2.7/dist-packages/gnuradio/gr/top_block.py", line 129, in _connect self._tb.primitive_connect(src_block.to_basic_block(), src_port, AttributeError: 'baz_rtl_source_c_sptr' object has no attribute 'to_basic_block'
Perhaps you have some idea about that. BTW, I'm using 3.5.2.1 Gnuradio with 2.7.2+ Python, your feaf6c commit of gr-baz and using stand-alone rtl-sdr the stick works well.
Regards, Mad