Forum: GNU Radio how to take input from multiple subdevices in the USRP simultaneously

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
5922e30e9ad98210ebd1e219266750aa?d=identicon&s=25 sHabzbd (Guest)
on 2009-03-12 17:43
(Received via mailing list)
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 Ahmed
PhD. Student
Victoria University, Melbourne, AUS


--
View this message in context:
http://www.nabble.com/how-to-take-input-from-multi...
Sent from the GnuRadio mailing list archive at Nabble.com.
745d8202ef5a58c1058d0e5395a78f9c?d=identicon&s=25 Eric Blossom (Guest)
on 2009-03-12 18:09
(Received via mailing list)
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
5922e30e9ad98210ebd1e219266750aa?d=identicon&s=25 Shabbir Ahmed (Guest)
on 2009-03-16 05:16
(Received via mailing list)
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
D0072e69d706bb3ca211d33a1b536e2c?d=identicon&s=25 Johnathan Corgan (Guest)
on 2009-03-16 15:13
(Received via mailing list)
On Sun, Mar 15, 2009 at 9:15 PM, Shabbir Ahmed
<shabbirahmed.bd@gmail.com> wrote:

> 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"

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

Johnathan
5922e30e9ad98210ebd1e219266750aa?d=identicon&s=25 Shabbir Ahmed (Guest)
on 2009-06-11 22:06
(Received via mailing list)
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.
This topic is locked and can not be replied to.