# Channel setting for USRP

**URL:** <https://www.ruby-forum.com/t/channel-setting-for-usrp/242972>\
**Category:** GNU Radio\
**Created:** [August 12, 2015, 1:34am UTC](https://www.ruby-forum.com/t/channel-setting-for-usrp/242972 "2015-08-12T01:34:32Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Rafa\_F](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/958977/32.png) [@Rafa\_F](https://www.ruby-forum.com/u/Rafa_F)\
**Post date:** [August 12, 2015, 1:34am UTC](https://www.ruby-forum.com/t/channel-setting-for-usrp/242972/1 "2015-08-12T01:34:32Z")

</div>

Hi all,  
I want to transmit the data between two USRP’s and make them communicate  
with each other. But I guess the packets are not being received  
properly.  
My USRP daughterboard model is XCVR2450. When I am running  
./benchmark\_tx.py -f 2.435G, it is starting to transmit the packets but  
a small error occured given below,

linux; GNU C++ version 4.8.4; Boost\_105500;  
UHD\_003.009.git-144-g407e3086

Using Volk machine: avx\_64\_mmx  
– Opening a USRP1 device…  
– Using FPGA clock rate of 64.000000MHz…

No gain specified.  
Setting gain to 7.500000 (from [-20.000000, 35.000000])

UHD Warning:  
The hardware does not support the requested TX sample rate:  
Target sample rate: 0.050000 MSps  
Actual sample rate: 0.250000 MSps

Symbol Rate: 25000.000000  
Requested sps: 2.000000  
Given sample rate: 250000.000000  
Actual sps for rate: 10.000000

Requested sample rate: 50000.000000  
Actual sample rate: 250000.000000  
…U…terminate  
called after throwing an instance of ‘uhd::runtime\_error’  
what(): RuntimeError: usb tx2 transfer status: 1  
Aborted (core dumped).

But towards the receiver side, I gave the command ./benchmark\_rx.py -f  
2.435GG,it has shown the result given below with n\_right=0.

linux; GNU C++ version 4.8.4; Boost\_105500;  
UHD\_003.009.git-144-g407e3086

Using Volk machine: avx\_64\_mmx  
– Opening a USRP1 device…  
– Using FPGA clock rate of 64.000000MHz…

No gain specified.  
Setting gain to 56.250000 (from [0.000000, 112.500000])

UHD Warning:  
The hardware does not support the requested RX sample rate:  
Target sample rate: 0.050000 MSps  
Actual sample rate: 0.250000 MSps

Symbol Rate: 25000.000000  
Requested sps: 2.000000  
Given sample rate: 250000.000000  
Actual sps for rate: 10.000000

Requested sample rate: 50000.000000  
Actual sample rate: 250000.000000  
ok = False pktno = 53034 n\_rcvd = 1 n\_right = 0  
ok = False pktno = 24 n\_rcvd = 2 n\_right = 0  
ok = False pktno = 35 n\_rcvd = 3 n\_right = 0  
ok = False pktno = 44 n\_rcvd = 4 n\_right = 0  
ok = False pktno = 46 n\_rcvd = 5 n\_right = 0  
ok = False pktno = 46 n\_rcvd = 6 n\_right = 0  
ok = False pktno = 3872 n\_rcvd = 7 n\_right = 0  
ok = False pktno = 12304 n\_rcvd = 8 n\_right = 0  
ok = False pktno = 49 n\_rcvd = 9 n\_right = 0  
ok = False pktno = 50 n\_rcvd = 10 n\_right = 0  
ok = False pktno = 54 n\_rcvd = 11 n\_right = 0  
ok = False pktno = 200 n\_rcvd = 12 n\_right = 0  
ok = False pktno = 63 n\_rcvd = 13 n\_right = 0

How would I be able to know if the USRP is maintained in the same  
channel?What commands do I need to give so that the packet is received  
correctly as n\_right=1.  
My USRP can access in the range of 2.4GHZ to 5GHZ. Please advice as to  
what I can do. Thanks

Regards,  
John

---

<div class="post-metadata">

**Author:** ![softf5ajivanet](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/9f8e36/32.png) [@softf5ajivanet](https://www.ruby-forum.com/u/softf5ajivanet)\
**Post date:** [August 22, 2015, 2:47pm UTC](https://www.ruby-forum.com/t/channel-setting-for-usrp/242972/2 "2015-08-22T14:47:27Z")

</div>

Hi John or Ravi,

I don’t know whether your questions have been solved. I think Tom has  
extensively discussed [1] a lot of things that can happen here, so  
you’re aware of the fact that transmission-wise, there’s the whole world  
of radio channel that could distort your signal.

So let’s talk a bit about what’s wrong with the hardware settings you  
use:

_Transmitter_

> No gain specified.  
> You should really specify the gain. That defines how much power comes  
> out of your antenna. For a start, you might want to use a moderately  
> high setting, so something like 25 would be good.  
> Actual sample rate: 250000.000000  
> I you must really fix that. As I’ve explained two weeks ago:  
> as the warning says, the sampling rates you’re trying to use on both  
> TX and RX side are lower than the minimum sampling rates. You should  
> fix that. It’s not hard, you just need basic understanding of what the  
> program does.  
> To spell this out: the data rate together with the samples per symbol  
> define your sample rate. For your USRP, this rate must be at least  
> 250kS/s. The effect of you not correcting your flow graph is that the  
> script generates a signal that the USRP converts to an analog signal at  
> five times the speed that you specify – this means all frequencies with  
> your complex baseband are five times as high!

> 

…U…  
Oh, that’s bad. You’re seeing an U like “Underrun”, which means your PC  
was too slow at supplying samples to the USRP. This seriously breaks  
your signal. Now, I don’t know your computer, but I know that 250kS/s is  
really no load for any PC nowadays – I haven’t seen any PC being too  
slow for this very low rate. How old is your PC? Are you doing something  
else on it? Or are you running in a virtual machine?

> terminate  
> called after throwing an instance of ‘uhd::runtime\_error’  
> what(): RuntimeError: usb tx2 transfer status: 1  
> Aborted (core dumped).  
> That’s even worse. It can happen if you cancel the script using  
> “ctrl+c”, but this looks like there is something seriously wrong with  
> your USB2 controller. Again, what computer are you using?

_Receiver_

> No gain specified.  
> Setting gain to 56.250000 (from [0.000000, 112.500000])  
> The same as above. More gain = more signal power, but don’t overdo it.  
> You will need to experiment. As Tom explained, letting the transmitter  
> run and observing the spectrum with something like usrp\_spectrum\_sense  
> will help you determine settings that make sense. First, however, I can  
> not stress this enough, fix your sample rate issue!

> Requested sample rate: 50000.000000  
> Actual sample rate: 250000.000000  
> The same as above. Both your RX and your TX are running at 250kS/s  
> instead of the 50kS/s that you specified. Luckily, this means that the  
> effect kind of cancels itself out – still, fix that!

- 

General\*

> How would I be able to know if the USRP is maintained in the same  
> channel?  
> You set both TX and RX to the same frequency, and since there is only  
> one physical medium (the space between the RX and TX antenna), you can  
> be sure. There’s no concept like “this specific part of spectrum belongs  
> to channel number 12” in the physical world – just frequencies, and  
> Maxwell’s Equations governing the propagation of radio waves.

> What commands do I need to give so that the packet is received  
> correctly as n\_right=1.  
> Tom has explained enough that it’s not like that. You will need to find  
> out yourself.

Best regards,  
Marcus

PS: Do you have a preferred name to address you by? “Ravi” is as fine to  
me as “John”, so I’d suggest you pick one and stick with that, because  
it’s less confusing.

[1] “Communication Problems between 2 USRP” email thred

---

<div class="post-metadata">

**Author:** ![softf5ajivanet](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/9f8e36/32.png) [@softf5ajivanet](https://www.ruby-forum.com/u/softf5ajivanet)\
**Post date:** [August 22, 2015, 2:47pm UTC](https://www.ruby-forum.com/t/channel-setting-for-usrp/242972/3 "2015-08-22T14:47:28Z")

</div>

Hi John or Ravi,

I don’t know whether your questions have been solved. I think Tom has  
extensively discussed [1] a lot of things that can happen here, so  
you’re aware of the fact that transmission-wise, there’s the whole world  
of radio channel that could distort your signal.

So let’s talk a bit about what’s wrong with the hardware settings you  
use:

_Transmitter_

> No gain specified.  
> You should really specify the gain. That defines how much power comes  
> out of your antenna. For a start, you might want to use a moderately  
> high setting, so something like 25 would be good.  
> Actual sample rate: 250000.000000  
> I you must really fix that. As I’ve explained two weeks ago:  
> as the warning says, the sampling rates you’re trying to use on both  
> TX and RX side are lower than the minimum sampling rates. You should  
> fix that. It’s not hard, you just need basic understanding of what the  
> program does.  
> To spell this out: the data rate together with the samples per symbol  
> define your sample rate. For your USRP, this rate must be at least  
> 250kS/s. The effect of you not correcting your flow graph is that the  
> script generates a signal that the USRP converts to an analog signal at  
> five times the speed that you specify – this means all frequencies with  
> your complex baseband are five times as high!

> 

…U…  
Oh, that’s bad. You’re seeing an U like “Underrun”, which means your PC  
was too slow at supplying samples to the USRP. This seriously breaks  
your signal. Now, I don’t know your computer, but I know that 250kS/s is  
really no load for any PC nowadays – I haven’t seen any PC being too  
slow for this very low rate. How old is your PC? Are you doing something  
else on it? Or are you running in a virtual machine?

> terminate  
> called after throwing an instance of ‘uhd::runtime\_error’  
> what(): RuntimeError: usb tx2 transfer status: 1  
> Aborted (core dumped).  
> That’s even worse. It can happen if you cancel the script using  
> “ctrl+c”, but this looks like there is something seriously wrong with  
> your USB2 controller. Again, what computer are you using?

_Receiver_

> No gain specified.  
> Setting gain to 56.250000 (from [0.000000, 112.500000])  
> The same as above. More gain = more signal power, but don’t overdo it.  
> You will need to experiment. As Tom explained, letting the transmitter  
> run and observing the spectrum with something like usrp\_spectrum\_sense  
> will help you determine settings that make sense. First, however, I can  
> not stress this enough, fix your sample rate issue!

> Requested sample rate: 50000.000000  
> Actual sample rate: 250000.000000  
> The same as above. Both your RX and your TX are running at 250kS/s  
> instead of the 50kS/s that you specified. Luckily, this means that the  
> effect kind of cancels itself out – still, fix that!

- 

General\*

> How would I be able to know if the USRP is maintained in the same  
> channel?  
> You set both TX and RX to the same frequency, and since there is only  
> one physical medium (the space between the RX and TX antenna), you can  
> be sure. There’s no concept like “this specific part of spectrum belongs  
> to channel number 12” in the physical world – just frequencies, and  
> Maxwell’s Equations governing the propagation of radio waves.

> What commands do I need to give so that the packet is received  
> correctly as n\_right=1.  
> Tom has explained enough that it’s not like that. You will need to find  
> out yourself.

Best regards,  
Marcus

PS: Do you have a preferred name to address you by? “Ravi” is as fine to  
me as “John”, so I’d suggest you pick one and stick with that, because  
it’s less confusing.

[1] “Communication Problems between 2 USRP” email thread
