RSU

[Sunday, January 31, 2010]

Install GNU Radio on Ubuntu 9.10 (Karmic) - from scratch (Windows Machine).

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

Wubi


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.

wubi installer
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.

photo-1.jpg Ubuntu Boot option after wubi install


5. Ubuntu will complete the installation. When you get to the login screen use the password that you entered in Step 2.

photo-2.jpg



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]
MyScreenshot1.png

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 universe
Thanks to jne for pointing out the last repo.

adding package source to ubuntu

The list should look something like this:

repo.png


9. Click Close and back on the main window click the reload button. [Reloading is important for the packet manager to load new packages].

reloading synaptic package manager


10. Now search for gnuradio and in the results, right click on gnuradio and click Mark for Installation. Do the same for gnuradio-companion.

MyScreenshot3.png


Screenshot-3.png

Once selected, the package manager will also mark dependencies for installation. All packets that are marked for installation are highlighted green.
Screenshot-5.png


11. Click Apply and apply on any confirmation dialog popups.

Screenshot-6.png



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.

Screenshot-7.png


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.

Screenshot-8.png




15. Hit Execute button (the one with an icon of gears). And Voila! it works!

Screenshot-9.png


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:

RF | February 5, 2010 at 5:14 PM

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?

Sidhant Gupta | February 7, 2010 at 3:38 PM

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?

Sidhant Gupta | February 7, 2010 at 3:47 PM

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.

RF | February 8, 2010 at 11:22 AM

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

RF | February 8, 2010 at 12:22 PM

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

Sidhant Gupta | February 8, 2010 at 5:59 PM

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

RF | February 12, 2010 at 11:15 AM

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

Anonymous | February 16, 2010 at 5:15 AM
This comment has been removed by a blog administrator.
Sidhant Gupta | February 16, 2010 at 8:44 AM

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.

Sidhant Gupta | February 16, 2010 at 8:47 AM

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.

Unknown | March 1, 2010 at 9:02 AM

Hey Sidhant

Dioes this version of Ubuntu connect to other wireless devices ?

Sidhant Gupta | March 1, 2010 at 9:19 AM

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.

Unknown | March 1, 2010 at 10:01 AM

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

Sidhant Gupta | March 1, 2010 at 10:05 AM

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.

Unknown | March 2, 2010 at 9:52 AM

Hey Managed to install and Wifi is good. Have to progress on USRP. Thanks a tonne

Sidhant Gupta | March 2, 2010 at 10:58 AM

Great! Let us know if you any any other questions regarding USRP.

engineer | October 18, 2010 at 3:52 AM

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.

Sidhant Gupta | October 18, 2010 at 9:23 AM

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?

Sidhant Gupta | October 20, 2010 at 11:39 AM

Sankalp,

Did you manage to fix your problem?

Sidhant

Fox | November 16, 2010 at 6:09 AM

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!!!

Sidhant Gupta | November 16, 2010 at 10:30 AM

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

Fox | November 20, 2010 at 11:02 AM

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.

Unknown | March 21, 2011 at 4:53 PM

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 !
;>

Sidhant Gupta | March 21, 2011 at 5:33 PM

Thanks Paulo!

Indrajit Prawira | July 20, 2011 at 7:58 PM

Hi Gupta.
I'm from Indonesia. Need your help. is this tutorial works on ubuntu 11.04 ??
waiting for yout reply. thanks :)

Sidhant Gupta | July 25, 2011 at 8:26 AM

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