Monday, July 6, 2015

Install GNURadio on Ubuntu 12.04 using install script

When using HackRF device, it is necessary to have GNURadio installed and running in our machine. Until today, what I used was a USB drive installed with a live linux image. This live linux image was pre-configured with GNURadio and other relevant tools. I have written a separate article about GNURadio based on this live linux image. This time, I'm installing GNURadio and relevant tools on my Ubuntu 12.04 system which will save me from requiring to restart the computer to go for a live linux image whenever I have to use HackRF.

Since the installation of GNURadio from source files is a big hassle, I found a wonderful installation script extremely helpful. GNURadio website has indicated it as a good way to install GNURadio and therefore, I decided to go with it. Here's the steps I followed to perform the installation using that script.

(1) Create a folder named 'src' somewhere in the home directory and move into it using terminal

mkdir src
cd src/

(2) Run the following command

wget http://www.sbrac.org/files/build-gnuradio && chmod a+x ./build-gnuradio && ./build-gnuradio

It takes a very long time to download source files and packages, compile them and configure all the necessary things.

(3) Add the following line to the ".bachrc" file in your home directory. This information was printed on the screen during the installation process of the previous step. That's why I followed it to set this path.

export PYTHONPATH=/usr/local/lib/python2.7/dist-packages

(4) Now plug-in HackRF device into a USB port and run following command.

sudo hackrf_info

An output much similar to the following should appear in the terminal then.

Found HackRF board 0:
Board ID Number: 2 (HackRF One)
Firmware Version: 2014.08.1
Part ID Number: 0xa000cb3c 0x00544f46
Serial Number: 0x00000000 0x00000000 0x14d463dc 0x2f6662e1

(5) Now we can start gnuradio companion (GRC) in order to try hackrf device using the following command.

sudo gnuradio-companion

That's it. After the GRC windowed showed up, we can start creating different flow graphs and run them with HackRF device.

Reference:

No comments:

Post a Comment