GNU Radio Stuff

Assembling the USRP

Posted in Setup by gnuradio on October 20, 2008

The Universal Software Radio Peripheral, or USRP (pronounced “usurp”) is designed to allow general purpose computers to function as high bandwidth software radios. In essence, it serves as a digital baseband and IF section of a radio communication system. In addition, it has a well-defined electrical and mechanical interface to RF front-ends (daughterboards) which can translate between that IF or baseband and the RF bands of interest. The basic design philosophy behind the USRP has been to do all of the waveform-specific processing, like modulation and demodulation, on the host CPU. All of the high-speed general purpose operations like digital up- and down-conversion, decimation and interpolation are done on the FPGA.

-Ettus Research

To assemble the USRP, start with this page on Cornell university where it begins with the USRP in box and talks about how to assemble it with the BasicRX/BasicTX daughterboards.

Then Continue to this picture set from flickr where some one shows the finished product.

When assembling be careful of static electricity that you generate – it could potentially destroy the boards. Consider using anti static mats to prevent such situations. Also remember to only plug in or unplug daughterboards when the power is off. If you forget this, you’ll blow the tiny on-board fuse and the board will stop working.


The USRP motherboard is capable of handling anything from DC to 2.9 GHz, but you need
the matching daughterboards for specific ranges. Daughterboards [ettus.com] include:

  • BasicRX, 0.1-300 MHz receive
  • BasicTX, 0.1-200 MHz transmit
  • LFRX, DC-30 MHz receive
  • LFTX, DC-30 MHz transmit
  • TVRX, 50-860 MHz receive
  • DBSRX, 800-2400 MHz receive
  • RFX400, 400-500 MHz Transceiver
  • RFX900, 800-1000 MHz Transceiver
  • RFX1200, 1150-1400 MHz Transceiver
  • RFX1800, 1500-2100 MHz Transceiver
  • RFX2400, 2250-2900 MHz Transceiver

Also, you obviously need to have the matching antenna to actually receive something useful in
a given frequency range.

-source

For more information on the daughterboards read through these two pdfs which have a list of TX and RX daughterboards and Transceiver daughterboards along with their features. Furthermore check out the USRP Documentation on gnuradio.org which focuses mainly on the internal hardware structure of the USRP.

Finally as an example, using a telescopic antenna attached via a BNC to SMA converter hooked up to the USRP, you can listen to FM radio or watch analog TV.

Installing GNU Radio

Posted in Setup by gnuradio on October 20, 2008

The Faster Method (no compilation needed)

After a clean installation of Fedora Core 8 (or 9), let it do its automatic updates (this might take a while). After it has done all the updates open a command prompt.

su
yum groupinstall "Engineering and Scientific" "Development Tools"
yum install fftw-devel cppunit-devel wxPython-devel libusb-devel guile boost-devel alsa-lib-devel numpy gsl-devel python-devel pygsl python-cheetah python-lxml
yum install sdcc

add this to .bashrc

export PATH=/usr/libexec/sdcc:$PATH
export PYTHONPATH=/usr/local/lib/python2.5/site-packages

then either do this

. ~/.bashrc

or logout and log back in so the changes propagate the system. After logging back in, you could take two approaches: follow the build guide which is on the GNU Radio wiki or follow on for the quicker setup. In a command prompt:

su
yum install gnuradio
yum install gnuradio-examples
yum install usrp

(or just yum install gnuradio gnuradio-examples usrp)
The GNU Radio examples will be copied here:

/usr/share/gnuradio/examples

some of the other packages you could also install:

gnuradio-devel (containg gnuradio header)
usrp-devel (containg usrp header)
gnuradio-doc (containg gnuradio documentation)

to make sure GNU Radio has been installed successfully try this:

python /usr/share/gnuradio/examples/audio/dial_tone.py

and if you can hear a dial tone sound then all is well.



Connecting to the USRP

Now you need to set up permissions for users to use the USRP Board. To do so we need to add a new group which will have access to the USRP (Note: You may need to use /usr/bin instead of /usr/sbin).

/usr/sbin/groupadd usrp

Now add a user to that group

/usr/sbin/usermod -G usrp -a

Now you need to create the read/write access to USRP. To do this, a file needs to be created.
Create a new text file and name it

10-usrp.rules

then add this line to it:

ACTION=="add", BUS=="usb", SYSFS{idVendor}=="fffe", SYSFS{idProduct}=="0002", GROUP:="usrp", MODE:="0660"

Then copy that file to the rules.d folder (in my case I’m copying from desktop to the destination)

cp /home/jon/Desktop/10-usrp.rules /etc/udev/rules.d/

You are almost done. Again log out and log back in. Now plug in the USRP and test the connection.
Keep in mind that the USRP 1 only works with computers with USB 2.0, so anything lower and your setup won’t work (more info including how to potentially fix this). Now enter the following command and you should see root and USRP under the user groups.

ls -lR /dev/bus/usb

[root@localhost jon]# ls -lR /dev/bus/usb
/dev/bus/usb:
total 0
drwxr-xr-x 2 root root 80 2008-06-05 06:23 001
drwxr-xr-x 2 root root 60 2008-06-05 05:02 002
drwxr-xr-x 2 root root 120 2008-06-05 05:02 003
drwxr-xr-x 2 root root 60 2008-06-05 05:02 004

/dev/bus/usb/001:
total 0
crw-r--r-- 1 root root 189, 0 2008-06-05 05:02 001
crw-rw---- 1 root usrp 189, 3 2008-06-05 06:23 004

to test that you indeed have a connection with the USRP you can run the benchmark_usb example which is in the examples/usrp/. I personally like to use the FM radio example:

python /usr/share/gnuradio/examples/usrp/usrp_wfm_rcv.py

If you can hear statics (or even a radio station) then you have successfully installed GNU Radio and USRP! Congrats…



Some Common Errors (when running example python demos)


RuntimeError: can't open usrp1

Solution: First unplug and plug back in the USRP’s USB connection, if that didn’t work then unplug and plug back in the power cord.


RunTimeError: audio_alsa_sink

Solution: You could first try running that demo again with the plughw option. Example:

$ ./dial_tone.py -O plughw:0,0

If that didn’t resolve the problem then it is very likely that the sound card is in use by some other application (flash in a browser, mp3 player) or possibly a previous run of a gnuradio app that didn’t
exit clearly (just get rid of them). And if so run:

$ killall esd

which will effectively kill your Esound daemon thereby only allowing one application at a time to use the sound card. Or you could check see which process is keeping the sound card busy:

lsof -V /dev/dsp

and kill the pid that’s keeping it busy.


Series of "aUaUaU"'s printing out

Solution: Consider running the demo with the -O plughw:0,0 option. Check this wiki page to find out what those “aU”’s mean or check out this GNU Radio mailing list thread for more information on the solution given.

___________________________________________________________
Reference for the GNU radio installation:
http://ossie.wireless.vt.edu/download/labs/OSSIE_0.6.2_lab4_final.pdf