NEWSDR'11 -- The First New England Workshop on
Software-Defined Radio

Boston SDR User Group
Saturday 1 October 2011, 9:00 AM - 4:00 PM
8 St. Mary's Street, Boston, MA, USA

GNU Radio Installation
Testing GNU Radio
GNU Radio Companion
Video Streaming
Other Notes

Breakout Session

The following is a quick description of the installation process of GNU Radio. We will install the latest GNU Radio stable release and the necessary dependencies, show examples of GNU Radio python scripts, test the GNU Radio Companion and show a simple streaming video application using GStreamer. We show the installation and testing for GNU Radio when using the raw ethernet connection to the USRP, however UHD is suggested moving forward.

GNU Radio Installation

The following describes how to install GNU Radio from source using the latest stable release. You may also follow the instructions for installing from the binary packages found here.

1-) Download the latest stable release (3.4.1) from the GNU Radio Download site.

2-) Run the following script,, to install the dependencies required for running GNU Radio. In the terminal, go to the directory where you stored the file and run:

    bash Install_GNURadio_Dependencies

3-) Unzip the GNU Radio folder, change to the gnuradio-3.4.1 directory and run the following:

    ./configure --enable-grc --enable-gr-audio-alsa --enable-gr-wxgui --enable-gr-qtgui --enable-usrp2
    sudo make install

4-) To configure your linker / debugger, run:

    sudo ldconfig /usr/local/lib

5-) In order to communicate with the USRP2, you will need to either run files as root OR update the usrp2 socket opener with the following command:

    sudo chmod u+s /usr/local/bin/usrp2_socket_opener

Testing GNU Radio

We should now be able to test GNU Radio! Here are a few tests to check if audio, grc and usrp are working.

1-) Test the audio functionality with the script from gnuradio-examples. Save the file, change to the directory where it is stored and run 'python' from the terminal.

2-) Test GNU Radio Companion by running 'gnuradio-companion' from terminal. This should open up GRC as seen below.

3-) Check for USRP2 connection by running 'find_usrps' from terminal. If the USRP2 is connected properly, the D and F indicator lights and the ethernet light should be illuminated on the USRP2. You should see something similar to the following image.

GNU Radio Companion (GRC)

For the first GRC program, we will create the file that we tested previously. After opening GRC, follow the simple instructions below.

1-) Open the options block and replace 'tob_block' with 'dial_tone' in the ID box.

2-) Open the Variable block and change the value of samp_rate to 48000.

3-) Add two Signal Source blocks from the Sources section. Open each block and set the Output Type to Float and the amplitude to 0.1. Set the Frequency of one block as 350 and the other as 440.

4-) Add an Audio Sink block from the Sinks section. Open this block and change Num Inputs to 2.

5-) Connect the output pad of each Signal Source block to the Audio Sink block.

6-) You should now see something similar to the image below. Selecting the gears from the menu bar (circled in red below) will bring up a save file screen. Type the name of your GRC file and select save. You should hear the dial tone from your speakers and the file should be created in the directory where you saved the GRC file. NOTE: Make sure your audio is NOT muted!

Streaming Video

1-) On the transmitting system, install Gstreamer from package manager or use the following script:

2-) On the transmitting system, download the following script:

3-) Download the simple transmitter / receiver GRC files below:
     Transmitter: SV_transmitter.grc
     Receiver: SV_receiver.grc

4-) Create a buffer in the folder you will be working from:
     Transmitter: mkfifo txfifo.ogg
     Receiver: mkfifo rxfifo.ogg

5-) Your local directory on the transmitting and receiving systems should look as follows:

6-) Open each of the GRC files on the respective systems. Note that the frequency of the USRP2 source and sink should be set for the frequency of the daughter card installed in the USRP2 that you are using. Also, interpolation and decimation may need to be changed depending on the processing power of the computers you are using.

7-) Start the receiver by running SV_receiver.grc through GRC and running 'mplayer rxfifo.ogg' in a separate terminal.

8-) Start the transmitter by running SV_transmitter.grc through GRC and running './stream_video' in a separate terminal.

The video should now be displayed in real time on the transmitting system and with a slight delay on the receiving system. Note that your webcam must be UVC compatible in order to negotiate frame size, frame rate, etc. in Gstreamer. If the system can not find your webcam, you will need to update desired device by changing 'video0' to the device which you are using in the stream_video script. Additionally, feel free to add complexity to the transmitter and receiver to improve performance of the system!

Other Notes

NVidia Driver: If you are receiving the error below, you may need to update your Nvidia driver. To do this, run the following script:

    xlib: extension "GLX" missing on display ":0.0"

Last updated 09/30/2011 by M. Rahaim