Installing GNU Radio
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
leave a comment