# Help to get control over USRP from custom block

**URL:** <https://www.ruby-forum.com/t/help-to-get-control-over-usrp-from-custom-block/233961>\
**Category:** GNU Radio\
**Created:** [January 26, 2015, 12:55pm UTC](https://www.ruby-forum.com/t/help-to-get-control-over-usrp-from-custom-block/233961 "2015-01-26T12:55:34Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![addis\_a](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/c4cdca/32.png) [@addis\_a](https://www.ruby-forum.com/u/addis_a)\
**Post date:** [January 26, 2015, 12:55pm UTC](https://www.ruby-forum.com/t/help-to-get-control-over-usrp-from-custom-block/233961/1 "2015-01-26T12:55:34Z")

</div>

Hi all,

A last attempt this time, after struggling already several months with  
this subject…

From within my custom (out-of-tree) C++ block I need full control over  
USRP sink/source. According to the documentation, the command interface  
only implements three functions (gain, center frequency and LO\_offset ).  
I need much more functionality however (sensors, IQ-imbalance, etc…),  
so I looked at another solution.

In my custom block class I added a method that takes 2 pointers:

```
boost::shared_prt<gr::uhd::usrp_sink>
boost::shared_prt<gr::uhd::usrp_source>

```

In the Python top\_block.py code I add a call to this method in order to  
pass the USRP pointers from Python to my C++ custom block.

The pointers seem to be valid in C++, but apparently the corresponding  
classes have empty virtual methods, so if I want to use the pointers  
nothing happens or Python crashes.

Does anybody know how to get pointers that have all functionality  
implemented from the original Ettus library? I am completely stuck… It  
may be an ugly hack, but I just need to get things done now.

Regards,

```
   Jeroen

```

This message may contain information that is not intended for you. If  
you are not the addressee or if this message was sent to you by mistake,  
you are requested to inform the sender and delete the message. TNO  
accepts no liability for the content of this e-mail, for the manner in  
which you use it and for damage of any kind resulting from the risks  
inherent to the electronic transmission of messages.
