# Difference between usrp in gnuradio and usrp in grc\_gnuradio

**URL:** <https://www.ruby-forum.com/t/difference-between-usrp-in-gnuradio-and-usrp-in-grc-gnuradio/218228>\
**Category:** GNU Radio\
**Created:** [March 25, 2012, 9:49am UTC](https://www.ruby-forum.com/t/difference-between-usrp-in-gnuradio-and-usrp-in-grc-gnuradio/218228 "2012-03-25T09:49:42Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![dubstep](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/cdc98d/32.png) [@dubstep](https://www.ruby-forum.com/u/dubstep)\
**Post date:** [March 25, 2012, 9:49am UTC](https://www.ruby-forum.com/t/difference-between-usrp-in-gnuradio-and-usrp-in-grc-gnuradio/218228/1 "2012-03-25T09:49:42Z")

</div>

I’m examining a GNU Radio Lab material:  
Blad, Olofsson - 2011 - Software-Defined Radio Lab 1 Getting in Touch  
with  
GNU Radio and the  
USRP[http://dl.dropbox.com/u/11382666/Blad%2C%20Olofsson%20-%202011%20-%20Software-Defined%20Radio%20Lab%201%20Getting%20in%20Touch%20with%20GNU%20Radio%20and%20the%20USRP.pdf](http://dl.dropbox.com/u/11382666/Blad%2C%20Olofsson%20-%202011%20-%20Software-Defined%20Radio%20Lab%201%20Getting%20in%20Touch%20with%20GNU%20Radio%20and%20the%20USRP.pdf)

This uses LFRX/LFTX daughterboards and the following codes for  
transmitting  
a signal (assume all variables are set correctly):

from gnuradio import usrp

# … blahblah

subdev\_spec = (0,0)  
subdev = self.u.selected\_subdev(subdev\_spec)  
self.u.set\_mux(self.u.determine\_tx\_mux\_value(subdev\_spec))  
self.u.tune(0, subdev, carrier)  
subdev.set\_gain(0)

Currently, however, I wanted to modify this codes for a RFX2400  
daughterboard, and when I use that codes without any changes, it doesn’t  
work  
I cannot see anything but noise with usrp\_fft.py. Thus, I changed the  
codes  
with the following:

from grc\_gnuradio import usrp as grc\_usrp

# … blahblah

self.usrp\_simple\_sink\_x\_0 = grc\_usrp.simple\_sink\_c(which=0, side=“A”)  
self.usrp\_simple\_sink\_x\_0.set\_interp\_rate(500)  
self.usrp\_simple\_sink\_x\_0.set\_frequency(2.412\*(10\*\*9), verbose=False)  
self.usrp\_simple\_sink\_x\_0.set\_gain(0)  
self.usrp\_simple\_sink\_x\_0.set\_enable(True)  
self.usrp\_simple\_sink\_x\_0.set\_auto\_tr(True)

And then it finally works fine.

Is there any difference between using usrp in gnuradio and usrp in  
grc\_gnuradio ?  
And the former code is only working for LFRX/LFTX ? and the latter one  
is  
working for other ones?

---

<div class="post-metadata">

**Author:** ![Songsong\_G](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/49beb7/32.png) [@Songsong\_G](https://www.ruby-forum.com/u/Songsong_G)\
**Post date:** [March 25, 2012, 10:15am UTC](https://www.ruby-forum.com/t/difference-between-usrp-in-gnuradio-and-usrp-in-grc-gnuradio/218228/2 "2012-03-25T10:15:47Z")

</div>

> Is there any difference between using usrp in gnuradio and usrp in  
> grc\_gnuradio ?  
> And the former code is only working for LFRX/LFTX ? and the latter one is  
> working for other ones?

The grc\_gnuradio is a USRP API wrapper (written in python). I created  
this wrapper for GRC because the gr-usrp API was very difficult to use.

However, you should know that both APIs have been replaced by the gr-uhd  
component. Examples can be found here:

> **[examples « gr-uhd - gnuradio.git - GNU Radio](https://www.gnuradio.org/cgit/gnuradio.git/tree/gr-uhd/examples)**

-Josh

---

<div class="post-metadata">

**Author:** ![Songsong\_G](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/49beb7/32.png) [@Songsong\_G](https://www.ruby-forum.com/u/Songsong_G)\
**Post date:** [April 5, 2012, 2:22pm UTC](https://www.ruby-forum.com/t/difference-between-usrp-in-gnuradio-and-usrp-in-grc-gnuradio/218228/3 "2012-04-05T14:22:59Z")

</div>

Hi Songsong ,  
The lab material which you have mentioned seems to be good one. Can you  
share some more if they are available. It will be a good reference to  
start  
with GnuRadio for beginners.

Thanks

Songsong G. wrote:

> ## from gnuradio import usrp work self.usrp\_simple\_sink\_x\_0.set\_enable(True)

* * *

## Sumit Kr. Research Assistant Communication Research center IIIT Hyderabad India

View this message in context:  
[http://old.nabble.com/Difference-between-usrp-in-gnuradio-and-usrp-in-grc\_gnuradio-tp33567618p33569420.html](http://old.nabble.com/Difference-between-usrp-in-gnuradio-and-usrp-in-grc_gnuradio-tp33567618p33569420.html)  
Sent from the GnuRadio mailing list archive at [Nabble.com](http://Nabble.com).
