How to take input from multiple subdevices in the USRP simultaneously


#1

Hi Everyone:

I am guessing that my last post was not clear since I didnt get any
replies.
So here I go again.

  1. I am using two Flex900 daughter cards on a single USRP.
  2. I am getting to select two subdevices (0,0) and (1,0) ie. daughter
    board
    A or daughter board B
  3. 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.


#2

Hi Eric:

Thank you loads again for your recommendations. I did go through both
the
files that you mentioned.

  1. For the technique used in *“usrp_wfm_rcv2_nogui.py”. *We can
    retrieve
    two receive streams from a one daughter board, but this uses only one of
    the
    antennas either the “TX/RX” or “RX2”.

  2. For what is done in “multi_file.py”. We get to retrieve 4 streams
    from
    two daughter boards.

  3. Now my question. Is it possible to receive two streams from a single
    daughter board on a usrp, one from antenna “TX/RX” and the other from
    antenna “RX2”. ie.
    input 1: subdev(0,0)—“TX/RX”
    input 2: subdev(0,0)—“RX2”

    Do I still have to load the “std_4rx_0tx.rbf”??
    And use the same mux 0xf3f2f1f0??

Thank you loads in advance.

Shabbir


#3

On Sun, Mar 15, 2009 at 9:15 PM, Shabbir A.
removed_email_address@domain.invalid wrote:

  1. Now my question. Is it possible to receive two streams from a single
    daughter board on a usrp, one from antenna “TX/RX” and the other from
    antenna “RX2”. ie.
    input 1: subdev(0,0)—“TX/RX”
    input 2: subdev(0,0)—“RX2”

The RFX board only has one receiver on it, capable of using either of
these connectors, but not both simultaneously.

Johnathan


#4

On Thu, Mar 12, 2009 at 09:40:29AM -0700, sHabzbd wrote:

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.

Hi Shabbir,

I can point you to two different examples that between them do
something similar to what you’re trying to do.

The first is gnuradio-examples/python/usrp_wfm_rcv2_nogui.py.
This uses two DDCs to extract two streams from a single daughterboard.
You can ignore the fact that the signal processing is an FM recvr.

The second is gnuradio-examples/python/multi-antenna/multi_file.py.
This one expects two Basic Rx daughterboards, and extracts a total of
4 streams, 2 from each daughterboard.

In your case, since your extracting a single stream from each
daughterboard, you’ll want to use the tune method twice, once on each
daughterboard. Your rx mux setting should be 0x32103210

Eric


#5

You should check the multi_antenna examples. To the best of my
understanding
you can use two antennas with a single BASIC daughter boards. But with
the
Flex daughter boards u can use any one of the ports, either the RX2 or
the
TX/RX.
If you are working with Flex daughter boards, you could use two of them
each
connected with an antenna and take simulataneous feeds from them.

regards.