# Gr-osmosdr - No RTL2832 Source Block

**URL:** <https://www.ruby-forum.com/t/gr-osmosdr-no-rtl2832-source-block/239777>\
**Category:** GNU Radio\
**Created:** [March 14, 2014, 12:31am UTC](https://www.ruby-forum.com/t/gr-osmosdr-no-rtl2832-source-block/239777 "2014-03-14T00:31:52Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![musicdenotation](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/ea666f/32.png) [@musicdenotation](https://www.ruby-forum.com/u/musicdenotation)\
**Post date:** [March 14, 2014, 12:31am UTC](https://www.ruby-forum.com/t/gr-osmosdr-no-rtl2832-source-block/239777/1 "2014-03-14T00:31:52Z")

</div>

Hi List,

I’ve recently been trying to get gnuradio-3.6.5 to talk to my  
RTL2832-based  
tuner dongle. I installed gr-osmosdr, and all of the blocks seem to  
load  
fine in gnuradio-companion. Except for one, the rtl2832 source block.  
Every time I run some code that uses osmosdr.source, I end up with this  
traceback:

Traceback (most recent call last):  
File “./rtl\_flex\_noX.py”, line 123, in   
tb = app\_top\_block(options, queue)  
File “./rtl\_flex\_noX.py”, line 45, in **init**  
self.u = osmosdr.source( args=“%s”%(options.device) )  
AttributeError: ‘module’ object has no attribute ‘source’

I tried installing gr-baz (as per this post on Reddit:  
[Reddit - Dive into anything](http://www.reddit.com/r/RTLSDR/comments/sn4t2/how_does_one_get_rtl_as_source_in_gnu/))  
[http://www.reddit.com/r/RTLSDR/comments/sn4t2/how\_does\_one\_get\_rtl\_as\_source\_in\_gnu/](http://www.reddit.com/r/RTLSDR/comments/sn4t2/how_does_one_get_rtl_as_source_in_gnu/)  
and I had zero luck whatsoever trying to get it to work. I did some  
further  
digging regarding what functions were available in osmosdr using  
dir(osmosdr) in Python and got this:

[‘SwigPyIterator’, ‘SwigPyIterator\_swigregister’, ‘\_RTLD\_GLOBAL’,  
‘ **builtins** ’, ‘ **doc** ’, ‘ **file** ’, ‘ **name** ’, ‘ **package** ’,  
‘ **path** ’, ‘\_dlopenflags’, ‘device’, ‘device\_find’,  
‘device\_swigregister’,  
‘device\_t’, ‘device\_t\_swigregister’, ‘devices\_t’,  
‘devices\_t\_swigregister’,  
‘meta\_range\_t’, ‘meta\_range\_t\_swigregister’, ‘osmosdr\_sink\_c\_sptr’,  
‘osmosdr\_sink\_c\_sptr\_swigregister’, ‘osmosdr\_source\_c\_sptr’,  
‘osmosdr\_source\_c\_sptr\_swigregister’, ‘osmosdr\_swig’, ‘range\_t’,  
‘range\_t\_swigregister’, ‘range\_vector\_t’, ‘range\_vector\_t\_swigregister’,  
‘sink\_c’, ‘source\_c’, ‘string\_string\_dict\_t’,  
‘string\_string\_dict\_t\_swigregister’, ‘string\_vector\_t’,  
‘string\_vector\_t\_swigregister’, ‘sys’]

Oddly enough there was a function called source\_c, but no function  
called  
source. When I make gr-osmosdr with cmake, these are the enabled and  
disabled components:

## – ###################################################### – # gr-osmosdr enabled components – ###################################################### – \* Python support – \* sysmocom OsmoSDR – \* IQ File Source – \* Osmocom RTLSDR – \* RTLSDR TCP Client – \* RFSPACE Receivers

– ######################################################  
– # gr-osmosdr disabled components  
– ######################################################  
– \* Osmocom IQ Imbalance Correction  
– \* FUNcube Dongle  
– \* FUNcube Dongle Pro+  
– \* Ettus USRP Devices  
– \* Osmocom MiriSDR  
– \* HackRF Jawbreaker  
– \* nuand bladeRF  
– \* AIRSPY Receiver

Is osmosdr.source() in one of the disabled components? If so, what  
dependencies do I need to install to get that component to work? I  
can’t  
seem to find any straightforward information as to what dependencies I  
need  
to get all the components to work.

I’ve been working on this for the past week and I have had little luck,  
so  
any help will be greatly appreciated 🙂

–  
View this message in context:  
[http://gnuradio.4.n7.nabble.com/gr-osmosdr-No-RTL2832-Source-Block-tp46936.html](http://gnuradio.4.n7.nabble.com/gr-osmosdr-No-RTL2832-Source-Block-tp46936.html)  
Sent from the GnuRadio mailing list archive at [Nabble.com](http://Nabble.com).

---

<div class="post-metadata">

**Author:** ![spam9642](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/48db29/32.png) [@spam9642](https://www.ruby-forum.com/u/spam9642)\
**Post date:** [March 14, 2014, 7:03am UTC](https://www.ruby-forum.com/t/gr-osmosdr-no-rtl2832-source-block/239777/2 "2014-03-14T07:03:31Z")

</div>

Hi,

osmosdr.source is the name in gnuradio 3.7.x version  
osmosdr.source\_c is the name in gnuradio 3.6.x version

Are you sure your application is compatible with gnuradio 3.6.x ?

Cheers,

Sylvain

---

<div class="post-metadata">

**Author:** ![spam9642](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/48db29/32.png) [@spam9642](https://www.ruby-forum.com/u/spam9642)\
**Post date:** [March 17, 2014, 10:58am UTC](https://www.ruby-forum.com/t/gr-osmosdr-no-rtl2832-source-block/239777/3 "2014-03-17T10:58:53Z")

</div>

Ah, that would make sense. I converted all references to osmosdr.source  
into osmosdr.source\_c and everything seems to work fine now.

Thanks heaps for your help! 🙂
