# Questions about using UHD with USRP2

**URL:** <https://www.ruby-forum.com/t/questions-about-using-uhd-with-usrp2/199349>\
**Category:** GNU Radio\
**Created:** [November 19, 2010, 5:38am UTC](https://www.ruby-forum.com/t/questions-about-using-uhd-with-usrp2/199349 "2010-11-19T05:38:40Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![okkezSS](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/o/85f322/32.png) [@okkezSS](https://www.ruby-forum.com/u/okkezSS)\
**Post date:** [November 19, 2010, 5:38am UTC](https://www.ruby-forum.com/t/questions-about-using-uhd-with-usrp2/199349/1 "2010-11-19T05:38:40Z")

</div>

p { margin-bottom: 0.08in; }

First, I am not quite sure if it is a  
good idea to use UHD with USRP2 right now.

I have the UHD driver installed and the  
USRP2 board detected.

What I need to do first is to write a  
basic program to collect some data from the USRP2 board by C++.

But I can not find any introduction  
file or example to explain what I should do.

For example, which directory I should  
include in the Makefile?

Which class I should use? What is the  
relationship or these classes?

How can I set the setting of the  
daughter board?

Thanks!

---

<div class="post-metadata">

**Author:** ![peng\_senl](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/9de0a6/32.png) [@peng\_senl](https://www.ruby-forum.com/u/peng_senl)\
**Post date:** [November 19, 2010, 5:44am UTC](https://www.ruby-forum.com/t/questions-about-using-uhd-with-usrp2/199349/2 "2010-11-19T05:44:19Z")

</div>

> For example, which directory I should  
> include in the Makefile?
> 
> Which class I should use? What is the  
> relationship or these classes?
> 
> How can I set the setting of the  
> daughter board?

Take a look at the single USRP API:

[http://www.ettus.com/uhd\_docs/manual/html/coding.html#high-level-the-single-usrp](http://www.ettus.com/uhd_docs/manual/html/coding.html#high-level-the-single-usrp)

[http://www.ettus.com/uhd\_docs/doxygen/html/classuhd\_1\_1usrp\_1\_1single\_\_usrp.html](http://www.ettus.com/uhd_docs/doxygen/html/classuhd_1_1usrp_1_1single__usrp.html)

Also look at the examples that come with UHD:

[http://code.ettus.com/redmine/ettus/projects/uhd/repository/revisions/master/show/host/examples](http://code.ettus.com/redmine/ettus/projects/uhd/repository/revisions/master/show/host/examples)

-josh

---

<div class="post-metadata">

**Author:** ![peng\_senl](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/9de0a6/32.png) [@peng\_senl](https://www.ruby-forum.com/u/peng_senl)\
**Post date:** [November 19, 2010, 5:49am UTC](https://www.ruby-forum.com/t/questions-about-using-uhd-with-usrp2/199349/3 "2010-11-19T05:49:58Z")

</div>

On 11/18/2010 11:37 PM, peng senl wrote:

> But I can not find any introduction file or example to explain what I
> 
> * * *
> 
> Discuss-gnuradio mailing list  
> [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
> [Discuss-gnuradio Info Page](http://lists.gnu.org/mailman/listinfo/discuss-gnuradio)

The Doxygen docs for the API for UHD start here:

[http://www.ettus.com/uhd\_docs/doxygen/html/index.html](http://www.ettus.com/uhd_docs/doxygen/html/index.html)

Do you really need C++? Is there something about the Python generated  
by GRC that won’t  
let you do what you want to do?

Keep in mind that _ALL_ the performance-critical components of Gnu Radio  
are already  
implemented in C++ – all the DSP blocks, data-movement, etc, etc.  
There’s essentially  
_zero_ performance penalty for coding in Python, or structuring your  
flow-graph using  
GRC. The Python code handles flow-graph “management”, but flow-graph  
execution happens  
within a compiled C++ environment.
