# How to send USRP data to the terminal window

**URL:** <https://www.ruby-forum.com/t/how-to-send-usrp-data-to-the-terminal-window/96269>\
**Category:** GNU Radio\
**Created:** [June 27, 2006, 8:33pm UTC](https://www.ruby-forum.com/t/how-to-send-usrp-data-to-the-terminal-window/96269 "2006-06-27T20:33:05Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![tony](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/ee7513/32.png) [@tony](https://www.ruby-forum.com/u/tony)\
**Post date:** [June 27, 2006, 8:33pm UTC](https://www.ruby-forum.com/t/how-to-send-usrp-data-to-the-terminal-window/96269/1 "2006-06-27T20:33:05Z")

</div>

I’m operating GNU Radio 2.8 on Ubuntu 6.06 LTS and using USRP mostly  
with the DBSRX rev 2.1 daughterboard. Can someone comment on 2  
questions.

How can you display the raw or processed USRP I & Q data on the screen?  
I’ve done this by using something like this:

.  
.  
.  
sink1 = gr.complex\_to\_float()  
sink2 = gr.file\_sink(gr.sizeof\_float,"/dev/tty")  
fg.connect(self,sink1,sink2)  
.  
.

but I’d like to refine the data output, time stamp it and only have it  
display based on one or more criterions. Is it reasonable to do this in  
Python or is sending the data to another process a better solution?

What is the format of the USRP complex output and the FFT output? Is it  
documented somewhere?

Many thanks to all that have worked on the GNU Radio project. I hope to  
become a contributing member as I gain more skill here.

Tony B

---

<div class="post-metadata">

**Author:** ![tony](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/ee7513/32.png) [@tony](https://www.ruby-forum.com/u/tony)\
**Post date:** [June 27, 2006, 9:25pm UTC](https://www.ruby-forum.com/t/how-to-send-usrp-data-to-the-terminal-window/96269/2 "2006-06-27T21:25:47Z")

</div>

On Tue, Jun 27, 2006 at 11:31:31AM -0700, Tony wrote:

> I’m operating GNU Radio 2.8 on Ubuntu 6.06 LTS and using USRP mostly  
> with the DBSRX rev 2.1 daughterboard. Can someone comment on 2  
> questions.

> How can you display the raw or processed USRP I & Q data on the  
> screen? I’ve done this by using something like this:

Unless you’re running at a really low rate, it’s unlikely that your  
screen can keep up.

> sink1 = gr.complex\_to\_float()  
> sink2 = gr.file\_sink(gr.sizeof\_float,"/dev/tty")  
> fg.connect(self,sink1,sink2)  
> .

> but I’d like to refine the data output, time stamp it and only have  
> it display based on one or more criterions. Is it reasonable to do  
> this in Python or is sending the data to another process a better  
> solution?

Depends on the data rate. Since the sample rate is constant, if you  
write it to a file you can figure out the time corresponding to any  
point in the file by starting at the file creation time stamp.

> What is the format of the USRP complex output and the FFT output?

The output of the USRP complex output is binary complex’s.  
That is, 32-bit float I, 32-bit float Q.

The output of the gr\_fft\_vcc is a vector of complex. The  
length of the vector is equal to the number of bins in the FFT.

> Is it documented somewhere?

It’s in the doxygen generated docs, or you can look at the relevant .h  
files and find it there.

In general GNU Radio processes binary numbers.  
These are typically floats, gr\_complex (== std::complex)  
and sometimes shorts, ints and unsigned chars.

Almost all blocks have some kind of suffix, e.g., usrp.source\_c.  
The suffix indicates the type of the input and/or output streams.

> Many thanks to all that have worked on the GNU Radio project.

You’re welcome.

> I hope to become a contributing member as I gain more skill here.  
> Tony B

Very good!  
Eric
