discuss-gnuradio
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Discuss-gnuradio] Problem using TVRX2 on multiple channels


From: shea_watson
Subject: Re: [Discuss-gnuradio] Problem using TVRX2 on multiple channels
Date: Sat, 25 Feb 2012 19:49:41 -0800 (PST)

!

It was this line that I needed:

                self.uhd_usrp_source_0.set_subdev_spec("A:RX1 A:RX2", 0)

Also, I had to update my UHD drivers.  Must've been broken somewhere.

Thanks!
SW

mleech wrote:
> 
> On 25/02/12 09:00 PM, shea_watson wrote:
>> Now i'm getting another error that i wasn't getting before...
>>
>> Exception in thread Thread-2:
>> Traceback (most recent call last):
>>   File "/usr/lib/python2.7/threading.py", line 552, in __bootstrap_inner
>>     self.run()
>>   File "./runDTVPos.py", line 333, in run
>>     tb = collect_double_tb(f0,filename0,f1,filename1,nsamples)
>>   File
>> "/home/shea/Dropbox/SDP/Shea/DTVPos/Code/USRP_collection_double.py",
>> line 38, in __init__
>>     channels=range(2),
>>   File "/usr/local/lib/python2.7/dist-packages/gnuradio/uhd/__init__.py",
>> line 112, in constructor_interceptor
>>     return old_constructor(*args)
>>   File "/usr/local/lib/python2.7/dist-packages/gnuradio/uhd/uhd_swig.py",
>> line 2826, in usrp_source
>>     return _uhd_swig.usrp_source(*args)
>> RuntimeError: Operation not permitted
>>
>> Am I not calling the constructor for the source right?
>>   
>>   
> This GRC flow-graph works just fine with two TVRX2 channels, albeit,
> specifying a B100 platform.
> (I've attached them).
> 
> 
> This is with the latest UHD + Gnu Radio, fresh from GIT as of a couple
> of days ago.
> 
> 
> -- 
> Principal Investigator
> Shirleys Bay Radio Astronomy Consortium
> http://www.sbrac.org
> 
> 
>  
> #!/usr/bin/env python
> ##################################################
> # Gnuradio Python Flow Graph
> # Title: Dual Tvrx2 Test
> # Generated: Sat Feb 25 21:28:10 2012
> ##################################################
> 
> from gnuradio import eng_notation
> from gnuradio import gr
> from gnuradio import uhd
> from gnuradio import window
> from gnuradio.eng_option import eng_option
> from gnuradio.gr import firdes
> from gnuradio.wxgui import fftsink2
> from grc_gnuradio import wxgui as grc_wxgui
> from optparse import OptionParser
> import wx
> 
> class dual_tvrx2_test(grc_wxgui.top_block_gui):
> 
>       def __init__(self):
>               grc_wxgui.top_block_gui.__init__(self, title="Dual Tvrx2 Test")
>               _icon_path = 
> "/usr/share/icons/hicolor/32x32/apps/gnuradio-grc.png"
>               self.SetIcon(wx.Icon(_icon_path, wx.BITMAP_TYPE_ANY))
> 
>               ##################################################
>               # Variables
>               ##################################################
>               self.samp_rate = samp_rate = 320e3
> 
>               ##################################################
>               # Blocks
>               ##################################################
>               self.wxgui_fftsink2_0_0 = fftsink2.fft_sink_c(
>                       self.GetWin(),
>                       baseband_freq=0,
>                       y_per_div=10,
>                       y_divs=10,
>                       ref_level=0,
>                       ref_scale=2.0,
>                       sample_rate=samp_rate,
>                       fft_size=1024,
>                       fft_rate=5,
>                       average=True,
>                       avg_alpha=0.1,
>                       title="FFT Plot",
>                       peak_hold=False,
>               )
>               self.Add(self.wxgui_fftsink2_0_0.win)
>               self.wxgui_fftsink2_0 = fftsink2.fft_sink_c(
>                       self.GetWin(),
>                       baseband_freq=0,
>                       y_per_div=10,
>                       y_divs=10,
>                       ref_level=0,
>                       ref_scale=2.0,
>                       sample_rate=samp_rate,
>                       fft_size=1024,
>                       fft_rate=5,
>                       average=True,
>                       avg_alpha=0.1,
>                       title="FFT Plot",
>                       peak_hold=False,
>               )
>               self.Add(self.wxgui_fftsink2_0.win)
>               self.uhd_usrp_source_0 = uhd.usrp_source(
>                       device_addr="type=b100",
>                       stream_args=uhd.stream_args(
>                               cpu_format="fc32",
>                               channels=range(2),
>                       ),
>               )
>               self.uhd_usrp_source_0.set_subdev_spec("A:RX1 A:RX2", 0)
>               self.uhd_usrp_source_0.set_samp_rate(samp_rate)
>               self.uhd_usrp_source_0.set_center_freq(106.1e6, 0)
>               self.uhd_usrp_source_0.set_gain(25, 0)
>               self.uhd_usrp_source_0.set_center_freq(101.1e6, 1)
>               self.uhd_usrp_source_0.set_gain(25, 1)
> 
>               ##################################################
>               # Connections
>               ##################################################
>               self.connect((self.uhd_usrp_source_0, 0), 
> (self.wxgui_fftsink2_0, 0))
>               self.connect((self.uhd_usrp_source_0, 1), 
> (self.wxgui_fftsink2_0_0, 0))
> 
>       def get_samp_rate(self):
>               return self.samp_rate
> 
>       def set_samp_rate(self, samp_rate):
>               self.samp_rate = samp_rate
>               self.uhd_usrp_source_0.set_samp_rate(self.samp_rate)
>               self.wxgui_fftsink2_0.set_sample_rate(self.samp_rate)
>               self.wxgui_fftsink2_0_0.set_sample_rate(self.samp_rate)
> 
> if __name__ == '__main__':
>       parser = OptionParser(option_class=eng_option, usage="%prog: [options]")
>       (options, args) = parser.parse_args()
>       tb = dual_tvrx2_test()
>       tb.Run(True)
> 
> 
> _______________________________________________
> Discuss-gnuradio mailing list
> address@hidden
> https://lists.gnu.org/mailman/listinfo/discuss-gnuradio
> 
> 

-- 
View this message in context: 
http://old.nabble.com/Problem-using-TVRX2-on-multiple-channels-tp33392627p33393143.html
Sent from the GnuRadio mailing list archive at Nabble.com.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]