# Communication problems between 2 USRP's

**URL:** <https://www.ruby-forum.com/t/communication-problems-between-2-usrps/242820>\
**Category:** GNU Radio\
**Created:** [July 31, 2015, 12:30am UTC](https://www.ruby-forum.com/t/communication-problems-between-2-usrps/242820 "2015-07-31T00:30:31Z")\
**Posts on this page:** 9\
**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:** [July 31, 2015, 12:30am UTC](https://www.ruby-forum.com/t/communication-problems-between-2-usrps/242820/1 "2015-07-31T00:30:31Z")

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

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:** [July 31, 2015, 4:24pm UTC](https://www.ruby-forum.com/t/communication-problems-between-2-usrps/242820/2 "2015-07-31T16:24:15Z")

</div>

On Thu, Jul 30, 2015 at 6:30 PM, John G. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
wrote:

> ```
> Actual sample rate: 0.250000 MSps
> 
> ```
> 
> called after throwing an instance of ‘uhd::runtime\_error’
> 
> ```
> Actual sample rate: 0.250000 MSps
> 
> ```
> 
> ok = False pktno = 35 n\_rcvd = 3 n\_right = 0
> 
> My USRP can access in the range of 2.4GHZ to 5GHZ. Please advice as to  
> what I can do. Thanks
> 
> Regards,  
> John

John,

There’s lots of things that can go wrong here. You didn’t set the gains  
or  
transmit amplitude. Do you know if you have a significant frequency  
offset  
between your two radios? You might need to adjust that.

The fact that you are getting “ok = False” means that the receiver saw a  
packet, but there were too many errors and the CRC check failed. Note  
there  
is no FEC applied to the benchmark scripts. So this could be due to low  
SNR, a bad channel, or, frankly, many other possibilities.

Tom

---

<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 1, 2015, 7:52pm UTC](https://www.ruby-forum.com/t/communication-problems-between-2-usrps/242820/3 "2015-08-01T19:52:13Z")

</div>

Hi Tom,  
So can you please advice what I can do next for them to be right?

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 3, 2015, 5:08pm UTC](https://www.ruby-forum.com/t/communication-problems-between-2-usrps/242820/4 "2015-08-03T17:08:57Z")

</div>

On Sat, Aug 1, 2015 at 1:52 PM, John G. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
wrote:

> Hi Tom,  
> So can you please advice what I can do next for them to be right?
> 
> Regards,  
> John

Too many things; you’ll have to go through it step-by-step. Best thing  
to  
start with is to transmit and use uhd\_fft at the receiver end to look at  
the signal. Make sure everything looks ok and try to find a gain setting  
that maximizes the SNR.

Tom

---

<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 3, 2015, 11:09pm UTC](https://www.ruby-forum.com/t/communication-problems-between-2-usrps/242820/5 "2015-08-03T23:09:02Z")

</div>

Hi Tom,  
I have actually added a jpg file which shows the output when given the  
command of uhd\_fft. Actually,my experiment is to transmit different data  
packets to the receiver with minimized errors with ./benchmark\_tx.py -f  
2.435G and ./benchmark\_rx.py -f 2.435G as commands . May I please know  
of how can to set the gain in this picture and also how this picture is  
useful for the reception of data packets. Please help as I am new to  
using GNU Radio and USRP. Thank you.

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 7, 2015, 11:53pm UTC](https://www.ruby-forum.com/t/communication-problems-between-2-usrps/242820/6 "2015-08-07T23:53:17Z")

</div>

Hi Tom,  
Attached is the picture that I have sent you previously. I have somewhat  
adjusted the receiver gain for the signal to be a flat one. As you have  
mentioned before about how to apply the gain settings to the benchmark  
scripts, how do you suggest I do that? Also, how do I change the  
transmitting gain setting. If I do this, will I be able to receive the  
data packet correctly?. I mean, I need to get n\_right=1, that is the CRC  
check needs to be right. Please suggest 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 4, 2015, 4:33pm UTC](https://www.ruby-forum.com/t/communication-problems-between-2-usrps/242820/7 "2015-08-04T16:33:21Z")

</div>

On Mon, Aug 3, 2015 at 5:09 PM, John G. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
wrote:

> John
> 
> Attachments:

[![](https://www.ruby-forum.com/attachment/10951/Screenshot_from_2015-08-03_16_03_15.png) ](https://www.ruby-forum.com/attachment/10951/Screenshot_from_2015-08-03_16_03_15.png)

Hi John,

That PNG you sent doesn’t show any signal that I can tell, which  
indicates  
that your gain settings are either too low to not see it or too high  
causing nonlinear effects. In this case, I’d guess the former. You can  
adjust the gain directly on the uhd\_fft app there with the RX Gain  
slider.  
Play with that to see if you can see the signal better. Then use the  
gain  
setting as an option to the benchmark scripts. You may also want to  
adjust  
the transmit gain setting, as well.

But the issue here isn’t GNU Radio or USRP. This is now radio. You have  
to  
have good enough signal power to receive data, and so you need to adjust  
the gains of the radio to make that happen.

Tom

---

<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 12, 2015, 2:05am UTC](https://www.ruby-forum.com/t/communication-problems-between-2-usrps/242820/8 "2015-08-12T02:05:02Z")

</div>

On Fri, Aug 7, 2015 at 5:53 PM, John G. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
wrote:

> Regards,  
> John
> 
> Attachments:

[![](https://www.ruby-forum.com/attachment/10970/Screenshot_from_2015-08-07_16_49_26.png) ](https://www.ruby-forum.com/attachment/10970/Screenshot_from_2015-08-07_16_49_26.png)

The problem is that I still don’t see a signal in that screen shot  
you’re  
sending me.

To adjust the gains and amplitudes, in the benchmark scripts, use the  
‘-h’  
flag to get help to see what options you can pass to it.

I cannot tell you if you will get the packets received correctly, and  
certainly not all of them will be. There is no error correction on that  
link, so even 1 bit wrong in a packet will force that entire packet to  
be  
marked as false because the CRC check will fail.

In the end, these aren’t so much GNU Radio questions but radio  
questions,  
so then it’s how you work with GNU Radio to address them. You have to  
work  
on sample rate, frequency offset, gains, etc. etc. The tools are all  
there  
with the sliders in the GUI apps and the command-line arguments for the  
benchmark programs.

Tom

---

<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 23, 2015, 1:43am UTC](https://www.ruby-forum.com/t/communication-problems-between-2-usrps/242820/9 "2015-08-23T01:43:28Z")

</div>

Hi Tom,  
Thanks for the reply. I have been trying to import ./benchmark\_tx.py -f  
2.435G and ./benchmark\_rxpy -f 2.435G commands and I have not yet been  
able to resolve the problem. I am attaching the files of the benchmark  
scripts. What do I need to change in order for my packet to receive  
correctly? Please help as I am new to GNU Radio.

Regards,  
John
