# UHD source + sink PROBLEM

**URL:** <https://www.ruby-forum.com/t/uhd-source-sink-problem/215625>\
**Category:** GNU Radio\
**Created:** [January 10, 2012, 11:49pm UTC](https://www.ruby-forum.com/t/uhd-source-sink-problem/215625 "2012-01-10T23:49:45Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![luislavena](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/0ea827/32.png) [@luislavena](https://www.ruby-forum.com/u/luislavena)\
**Post date:** [January 10, 2012, 11:49pm UTC](https://www.ruby-forum.com/t/uhd-source-sink-problem/215625/1 "2012-01-10T23:49:45Z")

</div>

Here is my code for transmitting data from a file:  
from gnuradio import gr  
from gnuradio import uhd

symbolrate=0.5_10\*\*5  
samplerate=20_symbolrate # 1M  
fg=gr.top\_block()  
src=gr.file\_source(gr.sizeof\_gr\_complex_1,‘data.txt’,False)  
snk=uhd.usrp\_sink(‘serial=1R24X9U1’,uhd.io\_type.COMPLEX\_FLOAT32,1)  
snk.set\_samp\_rate(samplerate)  
snk.set\_center\_freq(2.4_10\*\*9)  
fg.connect(src,snk)  
fg.run()

## And I run the uhd\_fft.py on another USRP… i constantly get a peak at centr frequency for data being sent, why? [http://old.nabble.com/file/p33115067/data.txt](http://old.nabble.com/file/p33115067/data.txt) data.txt

View this message in context:  
[http://old.nabble.com/UHD-source-%2B-sink-PROBLEM-tp33115067p33115067.html](http://old.nabble.com/UHD-source-%2B-sink-PROBLEM-tp33115067p33115067.html)  
Sent from the GnuRadio mailing list archive at [Nabble.com](http://Nabble.com).

---

<div class="post-metadata">

**Author:** ![uzair\_b](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/u/a9adbd/32.png) [@uzair\_b](https://www.ruby-forum.com/u/uzair_b)\
**Post date:** [January 11, 2012, 12:05am UTC](https://www.ruby-forum.com/t/uhd-source-sink-problem/215625/2 "2012-01-11T00:05:13Z")

</div>

On 01/10/2012 05:48 PM, UB wrote:

> snk.set\_center\_freq(2.4\*10\*\*9)  
> fg.connect(src,snk)  
> fg.run()
> 
> And I run the uhd\_fft.py on another USRP.. i constantly get a peak at centr  
> frequency for data being sent, why?  
> [http://old.nabble.com/file/p33115067/data.txt](http://old.nabble.com/file/p33115067/data.txt) data.txt  
> Many different debugging approaches:

a) Plot your data with an FFT sink–rather than a usrp\_sink. Is there a  
spectral peak at DC?

b) There will always be a small amount of DC offset in both directions  
(RX and TX) that will  
cause an anomaly around DC. You can null this out to a certain  
extent using the calibrate  
routines (assuming you have a USRP2/N2XX and either a WBX or SBX  
card).

c) You can always offset tune your TX, to take the DC offset anomaly  
away from your main  
transmit bandwidth. Similarly in RX.

–  
Marcus L.  
Principal Investigator  
Shirleys Bay Radio Astronomy Consortium

> **[Live Draw HK Tercepat | Result HK | HK Pools | Live HK | HK Prize Hari Ini](https://www.sbrac.org)**
>
> Temukan live draw hk tercepat melalui halaman hk pools yang resmi dan dapatkan result hk prize melalui live hk secara langsung di situs kami.

---

<div class="post-metadata">

**Author:** ![uzair\_b](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/u/a9adbd/32.png) [@uzair\_b](https://www.ruby-forum.com/u/uzair_b)\
**Post date:** [January 11, 2012, 2:26am UTC](https://www.ruby-forum.com/t/uhd-source-sink-problem/215625/3 "2012-01-11T02:26:09Z")

</div>

To expand on what Marcus said about DC, look advanced tuning with  
tune\_request\_t:

[http://files.ettus.com/uhd\_docs/manual/html/general.html#two-stage-tuning-process](http://files.ettus.com/uhd_docs/manual/html/general.html#two-stage-tuning-process)

Cheers,  
Ben
