Hi Everyone:
I am guessing that my last post was not clear since I didnt get any
replies.
So here I go again.
- I am using two Flex900 daughter cards on a single USRP.
- I am getting to select two subdevices (0,0) and (1,0) ie. daughter
board
A or daughter board B - On each subdevice I am getting to select two antennas ‘TX/RX’ and
‘RX2’
Now here is the thing. I can take anyone of the input at a single time,
ie.
I can either get
a. subdevice(0,0) & antenna ‘TX/RX’
b. subdevice(0,0) & antenna ‘RX2’
c. subdevice(1,0) & antenna ‘TX/RX’
d. subdevice(1,0) & antenna ‘RX2’
That is I am getting to set the usrp mux with
tb.src_usrp.set_mux(usrp.determine_rx_mux_value(tb.src_usrp,
subdevice))
and then select and antenna for the subdevice
tb.subdev.select_rx_antenna(‘RX2’)
But I need to build a graph where I can take at least two of the above
mentioned inputs. And store them in two separate sinks if possible.
Using
two different sink_files.
Would really really appreciate any help or some direction or hint.
Thank you loads in advance.
Here goes the code that I could do so far.
##################################################################
#bring in blocks from the main gnu radio package
from gnuradio import gr
#bring in the USRP source/sink
from gnuradio import usrp
import sys
from gnuradio import audio
def build_graph():
#create the top block
tb=gr.top_block()
#creat the USRP source
tb.src_usrp=usrp.source_c(decim_rate=16)
#create a signal sink
tb.sink_file = gr.file_sink(gr.sizeof_gr_complex, ‘test89.dat’)
#create counter
tb.count=gr.head(gr.sizeof_gr_complex, int(2000))
#connect the source to the sink
tb.connect(tb.src_usrp,tb.count,tb.sink_file)
#choose the sub device
#subdev_spec = usrp.pick_rx_subdevice(tb.src_usrp)
subdev_spec = (0,0)
#subdev_spec = (1,0)
#Set the mux
tb.src_usrp.set_mux(usrp.determine_rx_mux_value(tb.src_usrp,
subdev_spec))
#get the sub-device
tb.subdev = usrp.selected_subdev(tb.src_usrp, subdev_spec)
#select receive antenna (‘TX/RX’ or ‘RX2’)
#tb.subdev.select_rx_antenna(‘TX/RX’)
tb.subdev.select_rx_antenna(‘RX2’)
#Set the gain
g=tb.subdev.gain_range()
gain=float(g[0]+g[1])/2
#gain=
tb.subdev.set_gain(gain)
#tune the center frequency
frequency=float(948e6)
tb.src_usrp.tune(0, tb.subdev, frequency)
return tb
if name == ‘main’:
tb = build_graph ()
tb.start ()
#################################################################
Thank you loads again.
Kind regards,
Shabbir A.
PhD. Student
Victoria University, Melbourne, AUS
–
View this message in context:
http://www.nabble.com/how-to-take-input-from-multiple-subdevices-in-the-USRP-simultaneously-tp22479958p22479958.html
Sent from the GnuRadio mailing list archive at Nabble.com.