Jump to content

Easy Way to Install from Source GNURadio & RTL Source Blocks.


Recommended Posts

I've spent countless hours trying to get GNURadio-Companion to install along with the needed "source blocks" to make an RTL-SDR Dongle work.

Online documention on this is very poor.

But I've got it to work, and just for fun I did it twice!

This How-To assumes you're running a freshly installed Ubuntu 14.04.1 LTS & assumes you're sort of a newbie to Linux as I am.

Below are the commands you type, do not include the quote signs.

1) Log into a desktop terminal
2) Make sure you're in your home directory by typing "cd ~"
3) Type "sudo apt-get install git-core"
4) Type "sudo apt-get install cmake"
5) Type "sudo apt-get install libusb-1.0-0-dev"
6) Type "sudo apt-get install build-essential"
7) Type "git clone git://git.osmocom.org/rtl-sdr.git"
8) Type "cd rtl-sdr"
9) Type "mkdir build"
10) Type "cd build"
11) Type "cmake ../ -DINSTALL_UDEV_RULES=ON"
12) Type "make"
13) Type "sudo make install"
14) Type "sudo ldconfig" If everything worked up to this point you should not see any messages after typing the sudo ldconfig command.
15) Type "cd ~"
16) Type "sudo cp ./rtl-sdr/rtl-sdr.rules /etc/udev/rules.d"
17) Type "sudo reboot" <-- not sure if a reboot is needed at this time, but I seen it listed on a partial list of how-to's, so I did it and my system worked!

Once your system reboots log back into a terminal window as before.
18) Type "cd /etc/modprobe.d"
19) Type "sudo nano no-rtl.conf" This will start your editor and put you into a blank file called no-rtl.conf. While you are in the editor type the following 3 lines:
blacklist dvb_usb_rtl28xxu
blacklist rtl2832
blacklist rtl2830

That is it, just those 3 lines, nothing more! To save the file hold the CTRL key and hit the "O" (oh, not zero), next it enter. Your file is now saved. To exit out of the nano editor type CTRL X.

20) Type "sudo reboot" <-- this reboot is needed!
Once your system reboots log back into a terminal window as before.
Plug your RTL-SDR into a USB port if you already hadn't.

21) Type "rtl-test -t" You should then see the name of your RTL device as well as some other info. The last line will say "No E4000 tuner found, aborting" Don't worry about this as your RTL-SDR dongle probably has the R820 tuner and not the E4000. If you want to receive ADS-B / Mode-S data you do NOT want the E4000 tuner as it will not tune 1090 MHz.
22) Type "cd ~"
23) Type "git clone git://github.com/pybombs/pybombs"
24) Type "cd /pybombs"
25) Type "./pybombs install uhd gnuradio hackrf" You will be asked a series of questions, simply hit the enter key after each question. It will run for a short time then ask for your sudo password, this actually might happen a couple times during the build process, each time enter your sudo password (same as your user password). You also might be asked to hit the "Y" key a couple times, sometimes I was and sometimes I wasn't. Most of what I've seen online says this process will take 1 1/2 to 2 hours. On my machine (2 Meg Ram & 1.5 GHz processor) it was much closer to 3 hours.

26) When the above build is done there is one last thing to install, this will bring in the "source" and "sink" blocks, something that is missing from every online set of instructions I've seen. Without the "source" block you have no way to use the RTL dongle! So now type "./pybombs install gr-osmosdr" this will take several minutes to run.
27) Type "./pybombs env"
28) Type "source /home/av8tor/target/setup_env.sh" Replace the word av8tor with your username you use to log into Ubuntu, just happens my username is av8tor.
29) Type "gnuradio-companion" now you're HOME FREE!!!

One last thing to remember is that everytime you reboot Ubuntu, you'll have to type the "source /home/av8tor/target/setup_env.sh" command or gnuradio-companion will NOT work.

I hope this helps other that have had a hardtime getting gnuradio to work.

George
www.MilAirComms.com

Link to comment
Share on other sites

Steps 18 and 19 are best done first. This blacklists some modules for devices that think they should deal with your RTL-SDR dongle when in fact they should not. Blacklisting ensures they don't get loaded again when the system boots up. To remove the modules from your current system without having to reboot, unplug the RTL-SDR dongle and then type:

rmmod dvb_usb_rtl28xxu

rmmod rtl2832

rmmod rtl2830

If the response is "rmmod: ERROR: Module <name> is not currently loaded" that's just fine for the reason stated. If the response is that it can't unload because it's in use, try the other ones first and come back to it later. They might be inter-dependant upon eachother.

Steps 15 and 16 can be replaced with:

15) Type "cd .."

16) Type "sudo cp ./rtl-sdr.rules /etc/udev/rules.d"

The reboot of step 17 can be skipped, but you must run "udevadm -R" to reload its rules (bringing in the new ones you got from step 16) and then remove (if you didn't already) and re-insert the RTL-SDR dongle so it gets re-detected and udev makes the device available on your system in accordance with those new rules.

To prevent having to type that 'source' command each time, you can edit your .bashrc file and add that command there. This is assuming you're using the bash shell, but most people are so I think it's a safe assumption. If you're running something else you should also know how to do something similar for your specific shell. If you don't run Gnu Radio Companion from a terminal but using some sort of icon/option on the desktop, you can instead also put the command in your .xsession or .xinitrc file (I forget which. One is processed when you start X using 'startx' the other when X is started automagically after boot. On most systems one is a symlink to the other). That way the environment it provides will be available to everything operating in X. This might cause other programs to act up so if things start to act 'weird', just remove it, put it back in the .bashrc and start gnuradio-companion from a terminal.

Edited by Cooper
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...