# Tx\_ofdm and rx\_ofdm

**URL:** <https://www.ruby-forum.com/t/tx-ofdm-and-rx-ofdm/229993>\
**Category:** GNU Radio\
**Created:** [May 26, 2014, 1:20pm UTC](https://www.ruby-forum.com/t/tx-ofdm-and-rx-ofdm/229993 "2014-05-26T13:20:32Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![jason\_sam](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/7993a0/32.png) [@jason\_sam](https://www.ruby-forum.com/u/jason_sam)\
**Post date:** [May 26, 2014, 1:20pm UTC](https://www.ruby-forum.com/t/tx-ofdm-and-rx-ofdm/229993/1 "2014-05-26T13:20:32Z")

</div>

Hi:  
Now I run the example(tx\_ofdm and rx\_ofdm) through two usrps.(The  
version of my gnuradio is 3.7.4).  
1.But in the receive part I receive two many things like this:  
INFO: Detected an invalid packet at item 139632  
INFO: Parser returned #f  
INFO: Detected an invalid packet at item 139680  
INFO: Parser returned #f  
INFO: Detected an invalid packet at item 139728  
INFO: Parser returned #f  
INFO: Detected an invalid packet at item 139776  
INFO: Parser returned #f  
INFO: Detected an invalid packet at item 139824  
INFO: Parser returned #f  
INFO: Detected an invalid packet at item 139872  
INFO: Parser returned #f  
INFO: Detected an invalid packet at item 139920  
INFO: Parser returned #f  
INFO: Detected an invalid packet at item 139968  
INFO: Parser returned #f  
INFO: Detected an invalid packet at item 140016  
INFO: Parser returned #f  
INFO: Detected an invalid packet at item 140064  
And I search the maillist and I find someone encounter the same problem  
like  
me.([Re: [Discuss-gnuradio] Fwd: Questions on rx\_ofdm example in GR 3.7.1](http://lists.gnu.org/archive/html/discuss-gnuradio/2013-11/msg00082.html))And  
I see"As long as the receive SNR is high enough, the problem does not  
show up."And I try to increase the “Multiply Const” to increase the  
snr.But it failed.And I try to increase the receive gain.And also  
failed.Can someone help me?Thank you very much.  
2.And in the transmit part:  
UHD Warning:  
The hardware does not support the requested TX sample rate:  
Target sample rate: 0.100000 MSps  
Actual sample rate: 0.195312 MSps  
And the device I use is USRP N210.And I set the sample rate is 100k.  
Some days ago,someone tell me set the sample rate 100M/even number.And  
the 100k seems right,why this UHD warning?Can someone tell me what is  
the appropriate sample rate for USRP N210?Thank you very much.  
Any advices will be appreciated.Thank you.  
Best regards  
xianda

---

<div class="post-metadata">

**Author:** ![xianda](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/x/b38774/32.png) [@xianda](https://www.ruby-forum.com/u/xianda)\
**Post date:** [May 26, 2014, 1:43pm UTC](https://www.ruby-forum.com/t/tx-ofdm-and-rx-ofdm/229993/2 "2014-05-26T13:43:59Z")

</div>

Hi xianda,

I found out that using a factor of 0.05 in the multiply const works best  
for me, with USRPs about 50 - 100 cm appart and rx and tx gains set to  
0.

Try using a sample rate of 200k and you shouldn’t get that sample rate  
error again.

Regards,  
Jawad

---

<div class="post-metadata">

**Author:** ![xianda](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/x/b38774/32.png) [@xianda](https://www.ruby-forum.com/u/xianda)\
**Post date:** [May 26, 2014, 2:24pm UTC](https://www.ruby-forum.com/t/tx-ofdm-and-rx-ofdm/229993/3 "2014-05-26T14:24:02Z")

</div>

Hi Jawad:  
Thank you so much for your kindly reply.  
But the first problem still exist.Can you send me your test document and  
I test.Thank you.  
And the second problem is solved.Can you tell me why 200k is ok while  
100k failed?(they are all 10M/(even number)).Thank you.  
Best regards,  
xianda

At 2014-05-26 19:42:28,“Jawad S.” [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

Hi xianda,

I found out that using a factor of 0.05 in the multiply const works best  
for me, with USRPs about 50 - 100 cm appart and rx and tx gains set to  
0.

Try using a sample rate of 200k and you shouldn’t get that sample rate  
error again.

Regards,

Jawad

---

<div class="post-metadata">

**Author:** ![xianda](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/x/b38774/32.png) [@xianda](https://www.ruby-forum.com/u/xianda)\
**Post date:** [May 26, 2014, 2:41pm UTC](https://www.ruby-forum.com/t/tx-ofdm-and-rx-ofdm/229993/4 "2014-05-26T14:41:54Z")

</div>

On 26.05.2014 13:03, xianda wrote:

> Hi:  
> Now I run the example(tx\_ofdm and rx\_ofdm) through two usrps.(The  
> version of my gnuradio is 3.7.4).  
> 1.But in the receive part I receive two many things like this:  
> INFO: Detected an invalid packet at item 139632  
> INFO: Parser returned #f

Xianda,

this questions pops up a lot on this list, and 99% of the time it means  
your RF settings are distorting your signal. Try reducing gain and  
multiplier, and make sure you get a nice spectrum before you try and  
receive (i.e. check it with uhd\_fft and make sure it’s rectangular).

> UHD Warning:  
> The hardware does not support the requested TX sample rate:  
> Target sample rate: 0.100000 MSps  
> Actual sample rate: 0.195312 MSps  
> And the device I use is USRP N210.And I set the sample rate is 100k.  
> Some days ago,someone tell me set the sample rate 100M/even number.And  
> the 100k seems right,why this UHD warning?Can someone tell me what is  
> the appropriate sample rate for USRP N210?Thank you very much.

If you want 100K, you need to resample on the host. A stock N210 can go  
down to 100e6/512 (i.e. what you’re seeing). But that’s OK, resampling  
from 200k to 100k is not too CPU-intensive if you have a decent  
hardware.

M

---

<div class="post-metadata">

**Author:** ![xianda](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/x/b38774/32.png) [@xianda](https://www.ruby-forum.com/u/xianda)\
**Post date:** [May 26, 2014, 2:45pm UTC](https://www.ruby-forum.com/t/tx-ofdm-and-rx-ofdm/229993/5 "2014-05-26T14:45:36Z")

</div>

First of all, I removed the OFDM receiver part from tx\_ofdm and replaced  
it  
by a USRP sink and added a tag debugger to know when the data was  
generated  
from the transmitter.

I also removed the OFDM transmitter part from rx\_ofdm and replaced it by  
a  
USRP source.

You can see all of this in the files attached. Change the frequencies  
and  
sample rates according to your needs.

As long as there is data being sent and received, you shouldn’t see any  
of  
the warning messages from the receiver.

Regarding the sampling rate problem, I believe there is a minimal sample  
rate and you can’t go below it.

Regards,  
Jawad

2014-05-26 14:22 GMT+02:00 xianda [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid):

---

<div class="post-metadata">

**Author:** ![xianda](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/x/b38774/32.png) [@xianda](https://www.ruby-forum.com/u/xianda)\
**Post date:** [May 26, 2014, 4:42pm UTC](https://www.ruby-forum.com/t/tx-ofdm-and-rx-ofdm/229993/6 "2014-05-26T16:42:10Z")

</div>

Hi Martin:  
Thank you so much for your help.It can run.Thanks.  
Best regards  
xianda

---

<div class="post-metadata">

**Author:** ![xianda](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/x/b38774/32.png) [@xianda](https://www.ruby-forum.com/u/xianda)\
**Post date:** [May 26, 2014, 4:39pm UTC](https://www.ruby-forum.com/t/tx-ofdm-and-rx-ofdm/229993/7 "2014-05-26T16:39:42Z")

</div>

Hi Jawad:  
Thank you so much for your help.Now it can run.Thanks.  
Best regards

At 2014-05-26 20:44:13,“Jawad S.” [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

First of all, I removed the OFDM receiver part from tx\_ofdm and replaced  
it by a USRP sink and added a tag debugger to know when the data was  
generated from the transmitter.

I also removed the OFDM transmitter part from rx\_ofdm and replaced it by  
a USRP source.

You can see all of this in the files attached. Change the frequencies  
and sample rates according to your needs.

As long as there is data being sent and received, you shouldn’t see any  
of the warning messages from the receiver.

Regarding the sampling rate problem, I believe there is a minimal sample  
rate and you can’t go below it.

Regards,

Jawad

2014-05-26 14:22 GMT+02:00 xianda [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid):  
Hi Jawad:  
Thank you so much for your kindly reply.  
But the first problem still exist.Can you send me your test document and  
I test.Thank you.  
And the second problem is solved.Can you tell me why 200k is ok while  
100k failed?(they are all 10M/(even number)).Thank you.  
Best regards,  
xianda

At 2014-05-26 19:42:28,“Jawad S.” [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

Hi xianda,

I found out that using a factor of 0.05 in the multiply const works best  
for me, with USRPs about 50 - 100 cm appart and rx and tx gains set to  
0.

Try using a sample rate of 200k and you shouldn’t get that sample rate  
error again.

Regards,

Jawad

---

<div class="post-metadata">

**Author:** ![xianda](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/x/b38774/32.png) [@xianda](https://www.ruby-forum.com/u/xianda)\
**Post date:** [August 25, 2014, 4:02pm UTC](https://www.ruby-forum.com/t/tx-ofdm-and-rx-ofdm/229993/8 "2014-08-25T16:02:30Z")

</div>

Hi xianda,

May I know the type of USRP are you using for the above .grc files?  
Currently using a ettus USRP with RFX2400MHz daughter board.

I had tried the .grc file attached to one of the thread on this site,  
but unable to receive the right data successfully.

In the rx\_ofdm.grc file, i had replaced the USRP source with the output  
of tx\_ofdm.grc (i had written the output of the tx\_ofdm to a file sink,  
followed by replacing the USRP source with the “received file”)

At the beginning of receiving each data, the packet length of mine is at  
200 instead of 96.

I had the error too! Am i suppose to tweak the samp\_rate or the sampling  
frequency.

INFO: Detected an invalid packet at item 252356  
INFO: Parser returned #f  
INFO: Detected an invalid packet at item 252402  
INFO: Parser returned #f  
INFO: Detected an invalid packet at item 252448  
INFO: Parser returned #f  
INFO: Detected an invalid packet at item 252494  
INFO: Parser returned #f  
INFO: Detected an invalid packet at item 252540  
INFO: Parser returned #f  
INFO: Detected an invalid packet at item 252586  
INFO: Parser returned #f  
INFO: Detected an invalid packet at item 252632  
INFO: Parser returned #f

Thank you in advance,
