# Mulitple USRP Stream Confusion

**URL:** <https://www.ruby-forum.com/t/mulitple-usrp-stream-confusion/232290>\
**Category:** GNU Radio\
**Created:** [September 30, 2014, 10:03pm UTC](https://www.ruby-forum.com/t/mulitple-usrp-stream-confusion/232290 "2014-09-30T22:03:27Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![addis\_a](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/c4cdca/32.png) [@addis\_a](https://www.ruby-forum.com/u/addis_a)\
**Post date:** [September 30, 2014, 10:03pm UTC](https://www.ruby-forum.com/t/mulitple-usrp-stream-confusion/232290/1 "2014-09-30T22:03:27Z")

</div>

Hello!

I am having trouble trying to create a continuous stream of complex  
shorts from multiple (2) X310 USRPs (each running 2 channels) over a  
single 1gigE switch (at a very low sampling rate); currently it appears  
as though I can only stream from one USRP at a time and I can’t seem to  
figure out why. I should note I don’t have this problem running each  
USRP on its own dedicated network (but unfortunately that won’t be  
possible moving forward).

To date, I have been using the rx\_multi\_samples example provided with  
UHD (source 003.007.002). I dont seem to have any issue connecting to  
both USRPs and setting the parameters via the args=addr0=192.168.10.2,  
addr1=192.168.10.3 command. It is just that when I call rx\_stream-\>recv  
only the lights on the USRP which was listed first in args turn on. The  
subdev spec and channel selection for each USRP is set to “A:A B:A” and  
“0,1” and the incoming data from rx\_stream is two channels of complex  
shorts (not 4 like I would expect from 2 USRPs).

Do I have to initiate the streams differently or am I missing something?

Thanks!

-Andrew

---

<div class="post-metadata">

**Author:** ![DaigleS\_AndrewS10](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/ed655f/32.png) [@DaigleS\_AndrewS10](https://www.ruby-forum.com/u/DaigleS_AndrewS10)\
**Post date:** [September 30, 2014, 11:05pm UTC](https://www.ruby-forum.com/t/mulitple-usrp-stream-confusion/232290/2 "2014-09-30T23:05:44Z")

</div>

Hey Andrew,

First, that subdev seems off – I’d assume it’s something like “A:0  
B:0”? Next, I’m not even sure what you mean you set the channels to  
“0,1” on both devices. You should have 1 streamer, with a channel  
setting of “0,1,2,3”. The ‘args’ string seems correct.

Does this help?

M

---

<div class="post-metadata">

**Author:** ![DaigleS\_AndrewS10](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/ed655f/32.png) [@DaigleS\_AndrewS10](https://www.ruby-forum.com/u/DaigleS_AndrewS10)\
**Post date:** [October 1, 2014, 2:57pm UTC](https://www.ruby-forum.com/t/mulitple-usrp-stream-confusion/232290/3 "2014-10-01T14:57:54Z")

</div>

Hello Martin,

Thanks for the response.

I should have mentioned that the subdev spec was set to A:A B:A because  
I am using the basic RX boards. Trying “0:A 0:B” instead gives the  
following error: “0:A is not a valid rx subdevice specification on  
mboard 0. possible values are: [A:AB, A:BA, A:A, A:B, B:AB, B:BA, B:A,  
B:B].”

Your suggestion to set the channel as 0,1,2,3 seemed to work perfectly  
(not sure how I missed that) as now I am getting four complex shorts out  
of my setup (an example of what is now in the buffer is shown below):

(-3,-2)(3,0)(-1,0)(1,0)  
(2,-1)(0,0)(-3,0)(-2,0)  
(3,5)(1,0)(-1,0)(-1,0)  
(4,-2)(-4,0)(-1,0)(2,0)

In getting the channels to stream however, I ran across another strange  
occurrence. After looking at the FFT data it appears as though the  
following commands only set the frequency of the first channel:

uhd::tune\_request\_t tune\_request(freq);  
usrp-\>set\_rx\_freq(tune\_request);

Channels 1,2, and 3 all show single peaks centered at 0 Hz in the FFT  
window. I was able to correct this by directly setting the frequency of  
each channel independently (as shown below) , but I was under the  
impression that when you create the usrp devices to begin with it should  
apply commands across all channels?

uhd::tune\_request\_t tune\_request(freq);  
usrp-\>set\_rx\_freq(tune\_request, 0);  
usrp-\>set\_rx\_freq(tune\_request, 1);  
usrp-\>set\_rx\_freq(tune\_request, 2);  
usrp-\>set\_rx\_freq(tune\_request, 3);

Thanks again! This is really a great product and I look forward to  
getting more acquainted with what it can do.

-Andrew

* * *

From: [discuss-gnuradio-bounces+andrew.daigle=removed\_email\_address@domain.invalid](mailto:discuss-gnuradio-bounces+andrew.daigle=removed_email_address@domain.invalid)  
[discuss-gnuradio-bounces+andrew.daigle=removed\_email\_address@domain.invalid] on behalf of  
Martin B. [removed\_email\_address@domain.invalid]  
Sent: Tuesday, September 30, 2014 5:04 PM  
To: [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
Subject: Re: [Discuss-gnuradio] Mulitple USRP Stream Confusion

Hey Andrew,

First, that subdev seems off – I’d assume it’s something like “A:0  
B:0”? Next, I’m not even sure what you mean you set the channels to  
“0,1” on both devices. You should have 1 streamer, with a channel  
setting of “0,1,2,3”. The ‘args’ string seems correct.

Does this help?

M

On 30.09.2014 13:01, Daigle, Andrew - 1008 - MITLL wrote:

> To date, I have been using the rx\_multi\_samples example provided with  
> Thanks!
> 
> -Andrew
> 
> * * *
> 
> Discuss-gnuradio mailing list  
> [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
> [Discuss-gnuradio Info Page](https://lists.gnu.org/mailman/listinfo/discuss-gnuradio)

* * *

Discuss-gnuradio mailing list  
[removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)

> **[Discuss-gnuradio Info Page](https://lists.gnu.org/mailman/listinfo/discuss-gnuradio)**

---

<div class="post-metadata">

**Author:** ![DaigleS\_AndrewS10](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/ed655f/32.png) [@DaigleS\_AndrewS10](https://www.ruby-forum.com/u/DaigleS_AndrewS10)\
**Post date:** [October 1, 2014, 3:49pm UTC](https://www.ruby-forum.com/t/mulitple-usrp-stream-confusion/232290/4 "2014-10-01T15:49:12Z")

</div>

No, since you can easily have independent channels inside a multi-usrp  
block, gain and frequency parameters need to be set for each

channel. You can see how this works when you do the same thing from  
within GRC, and look at the generated code.

On 2014-10-01 08:54, Daigle, Andrew - 1008 - MITLL wrote:

> (3,5)(1,0)(-1,0)(-1,0)  
> usrp-\>set\_rx\_freq(tune\_request, 0);  
> To: [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)
> 
> M
> 
> On 30.09.2014 13:01, Daigle, Andrew - 1008 - MITLL wrote:
> 
> > Hello! I am having trouble trying to create a continuous stream of complex  
> > shorts from multiple (2) X310 USRPs (each running 2 channels) over a single 1gigE  
> > switch (at a very low sampling rate); currently it appears as though I can only  
> > stream from one USRP at a time and I can’t seem to figure out why. I should note I  
> > don’t have this problem running each USRP on its own dedicated network (but  
> > unfortunately that won’t be possible moving forward). To date, I have been using  
> > the rx\_multi\_samples example provided with UHD (source 003.007.002). I don’t seem  
> > to have any issue connecting to both USRPs and setting the parameters via the  
> > args=“addr0=192.168.10.2, addr1=192.168.10.3” command. It is just that when I call  
> > rx\_stream-\>recv only the lights on the USRP which was listed first in args turn  
> > on. The subdev spec and channel selection for each USRP is set to “A:A B:A” and  
> > “0,1” and the incoming data from rx\_stream is two channels of complex shorts (not  
> > 4 like I would expect from 2  
> > USRPs). Do I have to initiate the streams differently or am I missing  
> > something? Thanks! -Andrew  
> > \_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_ Discuss-gnuradio mailing  
> > list [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
> > [Discuss-gnuradio Info Page](https://lists.gnu.org/mailman/listinfo/discuss-gnuradio) [1]
> 
> * * *
> 
> Discuss-gnuradio mailing list  
> [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
> [Discuss-gnuradio Info Page](https://lists.gnu.org/mailman/listinfo/discuss-gnuradio) [1]
> 
> * * *
> 
> Discuss-gnuradio mailing list  
> [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
> [Discuss-gnuradio Info Page](https://lists.gnu.org/mailman/listinfo/discuss-gnuradio) [1]

Links:
