# (no subject)

**URL:** <https://www.ruby-forum.com/t/no-subject/229971>\
**Category:** GNU Radio\
**Created:** [May 24, 2014, 6:34pm UTC](https://www.ruby-forum.com/t/no-subject/229971 "2014-05-24T18:34:30Z")\
**Posts on this page:** 3\
**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 24, 2014, 6:34pm UTC](https://www.ruby-forum.com/t/no-subject/229971/1 "2014-05-24T18:34:30Z")

</div>

Hi  
I am trying to establish a simple link between two USRPs. My flow graph  
is  
File\_Source-\>PSK\_MOD(BPSK)-\>USRP\_sink  
USRP\_Source-\>PSK\_Demod-\>pack\_k\_bits-\>File\_Sink.  
The received data is not matching with the source data. I removed the  
USRPs  
and directly connected the PSK\_MOD to PSK\_DEMOD in flow gragh and  
compared  
the data. First 50 bits were in error but rest of the data were exactly  
the  
same after demodulation. I tried to add packet encoder in the  
transmitter  
side before modulation and packet decoder after demodulation and ended  
with  
nothing at the file sink. My question is why those first 50 bits are in  
error? and why packet encoder doesnt work when the data is transfered  
over  
the air? Any help would be appreciated  
Thanks in advance

Warm Regards

---

<div class="post-metadata">

**Author:** ![SHRIHARSHA\_BHAT\_K](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/bc79bd/32.png) [@SHRIHARSHA\_BHAT\_K](https://www.ruby-forum.com/u/SHRIHARSHA_BHAT_K)\
**Post date:** [May 24, 2014, 6:52pm UTC](https://www.ruby-forum.com/t/no-subject/229971/2 "2014-05-24T18:52:20Z")

</div>

hello SHRIHARSHA,  
If your simulation looks good, try and see what’s different about the  
incoming signal on air as opposed to the simulation. Is the frequency  
offset  
maybe too large? Is the received amplitude correct? Try mapping these  
into  
your simulation and see where things start to fall apart. At this point,  
you  
seem to have the basic setup correct and just need to continue to  
experiment  
with the settings.  
The packet decoder will work pefectly if the input signal of the  
demodulator  
is good enough. The sample rate is also an issue, you should find the  
best  
value for your application.  
Zakaria

–  
View this message in context:  
[http://gnuradio.4.n7.nabble.com/no-subject-tp48478p48479.html](http://gnuradio.4.n7.nabble.com/no-subject-tp48478p48479.html)  
Sent from the GnuRadio mailing list archive at [Nabble.com](http://Nabble.com).

---

<div class="post-metadata">

**Author:** ![SHRIHARSHA\_BHAT\_K](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/bc79bd/32.png) [@SHRIHARSHA\_BHAT\_K](https://www.ruby-forum.com/u/SHRIHARSHA_BHAT_K)\
**Post date:** [May 24, 2014, 10:29pm UTC](https://www.ruby-forum.com/t/no-subject/229971/3 "2014-05-24T22:29:59Z")

</div>

Hi Shriharsha,

As Zakaria already pointed out, since real channels are imperfect,  
packet losses _must_ occur.  
The demod will need some samples to lock on to your rx signal, so losses  
at start are to be expected.

I can only point you to some reference:  
there is a GNU Radio Companion file in  
gnuradio/gr-digital/examples/demod/ called dpsk\_loopback.grc . That  
should work.  
You can insert a channel model in between mod and demod, and see what  
happens. Increase channel influences (noise power, etc.) until they  
match or exceed  
what you’d expect from your real-world channel.  
Later, split the flowgraph in halves and connect them to your USRP  
sink/sources (don’t forget to remove the throttle at that point).

Greetings,  
Marcus

PS: For the future, when asking a question, please try to apply the  
hints from  
[http://gnuradio.org/redmine/projects/gnuradio/wiki/ReportingErrors](http://gnuradio.org/redmine/projects/gnuradio/wiki/ReportingErrors) .  
This will make it much easier to help you 🙂
