Installing GnuRadio on Ubuntu 9.10 tutorial with screenshots.
GnuRadio was a pain to setup until last year. I remember spending around 2 days to get it up and running. Like most open source softwares it lacks a solid documentation, but nevertheless it is a wonderful piece of software. Not long ago, GnuRadio folks made the whole installation process much easier by making it a Debian package for Ubuntu 9.04 and literally all you needed had to do was click "install" in the package manager.A few days back, I upgraded one of my dev machines to Ubuntu 9.10 (Karmic), the latest version and ran into trouble. So that you don't waste time figuring out what I already did, here is a quick tutorial. Since few folks I know that wish to use GnuRadio but don't even have Ubuntu installed, I will start from scratch.
You can skip to Step 6 if you already have Ubuntu 9.10 up and running.
1. Goto http://wubi-installer.org and download Wubi 9.10
2. Run Wubi.exe and when you get to the screen with options, choose the drive you wish to install Ubuntu 9.10 to [It will not effect your current OS in any way]. Choose the desktop environment as Ubuntu, and a username/password that you desire.
Image from: http://cache.techie-buzz.com/images/posts/wubi-installer.png
3. Click Install and Wubi will download a .iso image of Ubuntu that is right for your system. Don't be alarmed if you see amd64 in the torrent that it downloads. Ubuntu has one common 64-bit version which works on AMD/Intel.
4. You will be prompted to reboot. Do it, and you will see a new option in the boot menu. Select "Ubuntu", and in the next screen choose the first option.
5. Ubuntu will complete the installation. When you get to the login screen use the password that you entered in Step 2.
6. You should now have your brand new Ubuntu 9.10 up and running. Now the fun begins. Lets install GnuRadio. Open the Synaptic Package Manager.
[Off topic: In case you are wondering how to make your Ubuntu look slick like this, leave a comment below and I will post a quick tutorial]
7. Goto Settings > Repositories > Other Software and click Add.
8. Enter the following in the APT line and click Add Source. Do this for all three below.
deb http://gnuradio.org/ubuntu stable main deb-src http://gnuradio.org/ubuntu stable main deb http://mirrors.kernel.org/ubuntu jaunty main universeThanks to jne for pointing out the last repo.
The list should look something like this:
9. Click Close and back on the main window click the reload button. [Reloading is important for the packet manager to load new packages].
10. Now search for gnuradio and in the results, right click on gnuradio and click Mark for Installation. Do the same for gnuradio-companion.
Once selected, the package manager will also mark dependencies for installation. All packets that are marked for installation are highlighted green.
11. Click Apply and apply on any confirmation dialog popups.
12. If the installation goes smooth, you should now have GnuRadio Installed!
13. To test our installation, open a new terminal window and run the following command:
grc
GRC should open up.
14. Now make a flow graph to test it out. Simply use Audio Source or Signal Source and hook it up to the FFT or Scope graphical sinks.
15. Hit Execute button (the one with an icon of gears). And Voila! it works!
16. Congratulation! Now enjoy a cup of Hot Chocolate and have fun with GnuRadio :)
Two sample GRC flowgraphs to get you started (Right click and Save As..):AudioVisualizer.grc
VariableSignalSource.grc
If you find a mistake or something doesn't work, please feel free to leave a comment so that I can fix it.
26 comments:
Hi,
I followed you instructions and GNU Radio seems to have installed correctly but when I try to run a test flowgraph I get the following error:
Loading: "/home/fretenburg/GNURadio/AudioVisualizer.grc"
>>> Done
Showing: "/home/fretenburg/GNURadio/AudioVisualizer.grc"
Generating: "/home/fretenburg/GNURadio/top_block.py"
>>> Warning: This flow graph may not have flow control: no audio or usrp blocks found. Add a Misc->Throttle block to your flow graph to avoid CPU congestion.
Executing: "/home/fretenburg/GNURadio/top_block.py"
The program 'python' received an X Window System error.
This probably reflects a bug in the program.
The error was 'BadRequest (invalid request code or no such operation)'.
(Details: serial 486 error_code 1 request_code 135 minor_code 19)
(Note to programmers: normally, X errors are reported asynchronously;
that is, you will receive the error a while after causing it.
To debug your program, run it with the --sync command line
option to change this behavior. You can then get a meaningful
backtrace from your debugger if you break on the gdk_x_error() function.)
>>> Done
Any ideas what the problem might be?
Hello Russ,
I have never seen that error before and I suspect it is from GRC. I believe this error originates from the GTK and may have nothing to do with GNURadio.
I will investigate it further.
BTW, did you run OS updates after following the installation guide above?
From what I can find, this is nothing to do with GNURadio, it may be a bug in other system libraries. You may want to try changing some setting on your graphic card -- like openGL/no OpenGL etc. I am pretty sure this happens because of something to do with OpenGL.
Try editing the flow graph and instead of a graphical sink, put something else -- like a audio sink or null sink. If the flow graph runs, then we know for sure its the graphing libraries in ubuntu.
I suppose disabling OpenGL may solve the problem.
Hi Sidhant,
Thanks for your suggestions. I hadn't run OS updates after but I just did it and that didn't help. I tried a flow graph without a graphical sink and that works, as you suspected.
I also went through the list of required libraries that is on the gnu radio website (where is says "need for runtime and for compilation") and found a number of them were not installed on my system. So I installed them and that did not help.
So maybe it has something to do with OpenGL like you say, but I don't know how to disable OpenGL. I cannot see any kind of configuration for this in the preferences of admin menus. Can you give me some idea how to do this?
Thanks,
Russ
Hi Sidhant,
I found the problem and got it working. I had an issue with the video driver on my system - I had the fglrx ati driver installed but wasn't using it because it doesn't work with my video card. Just having it installed causes some problems though I found out. After uninstalling it and rebooting things work properly now.
Thanks for your help.
Russ
Russ,
Awesome!! I did some looking around and I was about to suggest you the same solution. I found that it is common to have problems with OpenGL in Ubuntu specialy if its an ATI graphic card.
I am glad things are working for you. In case you need any other help with GNURadio, leave a comment.
Sidhant
Hi Sidhant,
Ok, so how did you make Ubuntu look like that?
And on the topic of GNU Radio - I was wondering if you use it with the USRP hardware or with something else. I have not brought myself to purchase the HW yet and I am wondering what other people do with GNU Radio if they don't purchase a USRP.
Russ
Hey Russ,
I am using this theme:
http://gnome-look.org/content/show.php/Arc-Colors+GDM-Walls?content=88305
Try it out! :) I downloaded the theme and icon packages, un archived them, and then selected "Install Theme" from Right Click on Desktop->Change Background->Theme.
Russ,
About the HW. Yes I have the USRP, but I have been able to get away a lot of times (in fact serious research) by just using the sound card's line in as input. What are you planning to use the GNURadio for?
I have also seen some people use a NI DAQ card or other PCI DAQ with GNURadio, but I don't see anyone using this approach anymore. Most people either use sound card or the USRP.
Hey Sidhant
Dioes this version of Ubuntu connect to other wireless devices ?
Hey Tina,
Do you mean if this version of Ubuntu connects to a wireless network?
If so, yes it does. If you cant get it to work, first of all check if it even recognizes your wireless card or adapter.
I have sometimes in the past had troubles with Ubuntu connecting to wireless, but with recent versions, works well.
Yes the version Ubuntu 9.10. I am trying to connect on USRP2, so I ran into some probs with this version. I ll try downloading from wubi and check it out
Tina,
I am not sure if installing from WUBI will help, because essentially it will install the same thing -- Ubuntu 9.10.
Sometime, if nothing else works, I end up using a USB Wifi adapter.
Aah, and i see why you need Wifi badly, because USRP2 uses up the Ethernet port. BTW, I am running Ubuntu 9.10 on two IBM laptops and one Dell with no problems connecting to Wifi.
Hey Managed to install and Wifi is good. Have to progress on USRP. Thanks a tonne
Great! Let us know if you any any other questions regarding USRP.
hello sidhant,
i am trying to use my usrp with gnuradio but it shows following error
from gnuradio import usrp
File "/usr/local/lib/python2.5/site-packages/gnuradio/usrp/__init__.py",
line 25, in
from usrp_swig import *
File "/usr/local/lib/python2.5/site-packages/gnuradio/usrp/usrp_swig.py",
line 6, in
import _usrp_swig
can you please help me out. i am just stuck in between of no where bcoz of this.
it would be really thankful.
Hi Sankalp,
Is there another line after imprt _usrp_sqig in the error? Maybe that got left out while copy-pasting.
Also, which version of GNU Radio did you install?
Sankalp,
Did you manage to fix your problem?
Sidhant
Hi Sidhant. I would like to know if you have a tutorial to install GNU Radio on Ubuntu 10.10.
I did tried to install based on the "wiki" from gnuradio.org... but i have many errors and i don't know how to resolve them... and the website is very mess...Can This tutorial help me on Ubuntu 10.10?? Thank you!!!
Hi Oscar,
Yes this tutorial works for 10.10. In fact just recently I installed on 10.10 from this tutorial.
Just make this change:
Change this: deb http://mirrors.kernel.org/ubuntu jaunty main universe
TO: deb http://mirrors.kernel.org/ubuntu maverick main universe
Hi Sidhant
Thank you so so much!!!...
Now, i have a new challenge, to learn to work with GNU Radio.
Thus i need to get all information and literature as possible about programming with GNU Radio.
I would like to build a radio from scracht; the front-end, filters, demodulator, etc.
But i can't find info. So, i don't know if i must programming in python or in GNU Radio Companion (GRC).
I wolud like a tutorial or something.
THANKS IN ADVANCE.
Hi guys! I'm from Brazil and also starting Ununtu (ing) and a very new newbie on the GNU Radio world!
So, like I've been seeing a lot of people trying to install ( like I've done just before) and to start playing with it, here I send the brand new RECIPE for those seeking to install the version 3.0.0 GNU Radio Companion with the Ubuntu Maverick 10.10 :
1) First of all, install all the DEPENDENCES from here, ( the 10.10 version is the same as the previous 10.04): http://gnuradio.org/redmine/wiki/gnuradio/UbuntuInstall
2) Download do gnuradio-3.0.0.tar.gz from the same previous site, or just google it !
3) Use your Synaptic Packet Manager, like explained just above and make sure to change the source by Gupta doing this:
IMPORTANT: DO NOT INSTALL (OR SELECT TO BE INSTALLED BY SYNAPTIC, THE FOLLOWING TOW MODULES: GNURADIO AND GNURADIO-COMPANION)Just their dependencies listed after you select them to be installed, so wrapping up, you will selet this last both ( so the synaptic will mark their dependencies, and right after you click on both again in order to dismark ONLY this two)
Change this: deb http://mirrors.kernel.org/ubuntu jaunty main universe
TO: deb http://mirrors.kernel.org/ubuntu maverick main universe
4) Install the downloaded .tar.gz gnuradio 3.3.0
5) run this, it's very important to make the access to the visual program interface easier:
grc_setup_freedesktop install [to install a shortcut at Menu Applications > Pragramming]
6) Run the tests you want and be happy!!!
At my laptop I had to change the sample rate values to 44.1kHz and make Type: FLOAT on them to work properly.
And finally, I don't know why yet, the graph goes smooth, there are no code or run errors, but just after a few minutes the graph windows goes GRAY and it seems it crashes but I can see in the back that the code is still running! At a Layer One video at YouTube a guy said that this was due to the processing speed of the signal processing task that the processor couldn't follow in a smooth way all the signal that it has been receiving, processing the prevailing one and showing the just processed ones...
So if anyone get this same PROBLEM please help me!!!
Bye, and thanks for all the help!!! Let's continue cooperating and changing experiences, because I'd really want to do it in order to know people with the same taste as mine !
;>
Thanks Paulo!
Hi Gupta.
I'm from Indonesia. Need your help. is this tutorial works on ubuntu 11.04 ??
waiting for yout reply. thanks :)
Hi Indrajit,
You should try. I don;t see why it won't work. Maybe a few things have changed, but the packages are largely the same. Try it out!
Post a Comment