GNURadio-Companion (GRC)
What follows are three "step by step" guides relating to the installation and updating of GRC.
To execute and study the DSP flow graphs contained on this github site, it is necessary to install a version of GNURadio Companion (GRC) on your computer. Below is a trouble free method to do that installation: GNU Radio Installation Procedure. Computer requirements for GRC are a multi-core CPU, 2 GHz or above clock speed, and 4 MB of memory. More information regarding the entire GRC project is available at the project website: http://gnuradio.org/redmine/projects/gnuradio
GRC is in a constant state of development. Once GRC is installed, the version can be updated using git. The method to Update GRC versions using git is included below.
New DSP blocks are developed out of the version "tree" and are termed "out of tree" (OOT) modules. These OOT modules are added using GNURadio Block Installation Procedure.
GNU Radio Installation Procedure - Step by Step
Tom McDermott, N5EG John Petrich, W7FU May 5, 2014
The following procedure is recommended as one reliable method to install GRC3.7.3 and above into Ubuntu 14.04. The procedure consists of five steps:
1) Only if necessary, remove prior GRC installations and residuals. This includes “distribution” versions downloaded via the Ubuntu Software Center, even if you have “removed” it via the Software Center. Copy and paste the “Gnuradio_remove” script file into your Ubuntu Home directory. http://svn.tapr.org/filedetails.php?repname=OpenHPSDR+Main&path=%2Ftrunk%2FN5EG%2FGRC3.7%2FGnuradio_remove This step is not necessary if you have not previously attempted to install GRC onto your hard drive. 2) Copy and paste the latest available “build-gnuradio” script file provided by Marcus Leech http://sbrac.org/files/build-gnuradio into the Ubuntu Home directory. 3) Make sure that GCC is installed. 4) Execute the build script file. 5) Open the GRC application and check that the application is functional.
Step 1: (Note: $ is the prompt character displayed by the terminal, don't type it yourself.) Open the Terminal and at the “~$” prompt enter:
$ sudo apt-get purge gnuradio (and Enter)
Step 2: 1. Copy and paste the file “Gnuradio_remove” to your Home directory. (You may need to copy and paste to your Desktop as an intermediate step then copy and paste to the Home directory) 2. Open your Home directory in the graphical browser. 3. Right click the file “Gnuradio_remove” and select “Properties”. A popup will open. 4. Select the “Permissions” tab. 5. Select the check-mark "Allow executing file as a program" 6. Close the popup menu then close the Home directory. 7. Open the Terminal. At the “~$” prompt enter ~$ sudo ./Gnuradio_remove (and Enter) (this command instructs the OS to execute the remove script located in the Home directory)
Step 3: Determine if GCC (GNU Compiler Collection) is installed on your system. Using the Terminal, at the “~$” prompt enter:
~$ which gcc (Enter) If the result is a directory listing such as: /usr/bin/gcc ,then GCC is installed and no further action is necessary. If the result is a blank line, GCC is not installed, and it is necessary to install it for GRC to build. The package build-essential includes the compilers, linkers, make, and cmake. In the Terminal, at the “~$” prompt enter:
~$ sudo apt-get install build-essential ,or the alternative command: $ sudo apt-get --reinstall install build-essential (Enter)
Step 4: Execute the build-gnuradio script from your Home directory. You need to first mark the script file as executable (similar to how the Gnuradio_remove script was marked in step 2). In the Terminal “~$” prompt enter:
~$ ./build-gnuradio –m (Enter) (this command instructs the OS to execute the build script located in the Home directory and get the latest version of GRC)
(Note: The build process can take a long time depending on the capabilities of your computer. Computers at the i7 level require about 20 minutes to complete the build process. Computers at the i3 level can take hours to complete the build and single core computers longer yet. A number of “y” commands, for “yes”, are required in the Terminal during the initial stages of the build process, so pay attention.)
Step 5: To open GRC, after the build is compete, open the Terminal, at “~$” enter ~$ gnuradio-companion (Enter)
Update GRC versions using git John Petrich, W7FU May 8, 2014
This procedure is one method to update your version of GRC. The github function is the method of managing versions of GRC open source software. In the open source world of GRC, changes are frequent. The ability to update versions is important to keep abreast of the latest developments and bug fixes. Scripted installation versions of GRC automatically incorporate this functionality. Distribution versions may not and a reason to avoid distribution version installations of GRC.
The updating of GRC via git involves 3 steps:
Step 1: Use the Terminal and enter the following series of commands: $ cd gnuradio (Enter)
Step 2: $ git fetch origin (Enter) if there is no return, your version is current. If there are returns there are new releases.
Step 3: $ git pull origin (Enter) The new source code will be pulled down from the git website and positioned for installation.
Step 4: To install the revised source code, enter in the Terminal: $ cd build (Enter) $ make ../ (Enter) [Note the space between “make” and “../”] $ make clean (Enter) $ make (Enter) $ sudo make install (Enter) $ sudo ldconfig (Enter)
At this point your version of GRC is automatically updated using git.
GNU Radio DSP Block Installation Procedure Out-Of-Tree Module Tom McDermott, N5EG John Petrich, W7FU May 11, 2014
To install additional DSP block types, not included in the official released version of GNU Radio (called 'out-of-tree') there are three steps: Step 1: Download and un-compress the source code file for the desired block into the home directory. In this example we will demonstrate with the OOT module: gr-hpsdr.r.3227 Hermes NB block. Your home directory is usually identified as ~ and we want to un-compress the complete structure into a subdirectory of ~. That complete new block will include files and even deeper directories (for example, build files). Normally the un-compress program takes care of setting it all up for us. For example, you might create a new directory ~/gr-hpsdr.r.3227 and unzip the code into it. In Linux, directory names can include the dot character.
Step 2 Enter a series of commands in the Terminal that will compile and install the source code into the GNU Radio DSP library. The commands are those that follow the “$” sign in this text, for example: ~/ gr-hpsdr.r.3227/build/$ make
Step 3: Open GRC and confirm the presence of the block(s) in the library.
Step 1:
Create a new sub directory in the home directory.
In the Terminal at “~$”enter:
~$ mkdir gr-hpsdr.r.3227 (Enter)
~$ cd gr-hpsdr.r.3227 (Enter)
~/gr-hpsdr.r.3227$
Step 2: Down load and un-compress using the graphical archive manager to extract the source code into the newly created directory. Check the subdirectory to make sure that the un-compressed block files are present. ~/gr-hpsdr.r.3227$ ls (Enter) A list of the files in your new directory will be listed, including the source directory for the block you are intending to install. It should include some subdirectories, such as apps, build, cmake, python, etc. and the file CmakeLists.txt.
Step 3: In the Terminal, at the “~$” prompt enter the following series of commands: ~$ cd ~/ gr-hpsdr.r.3227 $ mkdir build $ cd build $ cmake ../ (Enter) [note the space after “cmake” and before “../”] $ make clean (Enter) $ make (Enter) $ sudo make install (Enter) $ sudo ldconfig (Enter) $ exit (Enter) and the terminal will close.
Step 4:
Open the GRC application and verify that the desired block is installed in the DSP library list. If you installed gr-hpsdr, for example, there would be a hpsdr selection on the panel with all the other DSP library categories. Inside that hpsdr library category will be the hermesNB block. Other out-of-tree modules will have other names given to them by their authors.