GNU Radio is an open-source software environment used to implement software-defined radios (SDRs). Using Python, users create flow-graphs by linking together different processing blocks. It’s a popular and easy way to simulate and test SDR systems. Its operation becomes even easier with the included GNU Radio Companion, a GUI application for creating flow-graphs (Figure 1).
Most SDR systems implemented in GNU Radio are developed in Linux. Non-Linux users will need to set up a dual-boot machine or use another computer to install the OS. For beginners (like myself) who would like to learn the GNU Radio environment, using a virtual machine is a good choice. In this post, I will share my experiences as I go through the whole process, from installing the virtual machine to running a GNU Radio project using the Nutaq Radio420X.
Figure 1 – GNU Radio Companion interface
Host PC specifications
My PC (the host computer) has the following specifications:
– Intel i5-3470S CPU @ 2.90 GHz
– 8 GB of RAM
– 2 Gigabit Ethernet cards
– Windows 7 64-bit
Setting the virtual machine
First, we need to install the virtual machine software. I choose Oracle’s VirtualBox because it’s free and easily available.
After installing the software, we create a new virtual machine. I used Fedora 17, as required in Nutaq’s GNU Radio user guide. VirtualBox requires some configuration options like CPU and memory size allocation. You should allocate the highest recommended sizes to get the best performance. The virtual machine is then ready to install the new OS. Insert a Fedora 17 LiveCD (image can be found here) and click the Start button*.
Figure 2 – Creating a new virtual machine
Once Fedora has booted, we install it on the virtual hard drive. Click Install to Hard Drive (Figure 3) and follow instructions to complete the installation.
Figure 3 – Installation of Fedora in VirtualBox
* If an error message appears at this point, make sure that your computer has virtualization enabled. This option can usually be switched on from the machine’s BIOS. Procedures to enable virtualization vary depending on the BIOS manufacturer. Check the information that came with your computer or go to the computer manufacturer’s website.
Configuring Fedora 17
Prior to installing GNU Radio and the Nutaq ADP, we have to install VirtualBox’s Guest Additions. First, open a terminal and enter super-user (su) mode. Run the following command:
yum install dkms
Figure 4 – Using the yum command in Fedora 17
After running the command, reboot the virtual machine. After it reboots, click Install Guest Additions under the Devices tab in VirtualBox.
Next, run the following commands in a terminal:
yum groupinstall development-libs development-tools
yum install libpcap-devel
yum install vim
Reboot the virtual machine again. The OS is now ready to install the Nutaq ADP and GNU Radio.
Installation of the Nutaq ADP and GNU Radio
Nutaq provides a complete guide for installing the ADP. The process is very simple and only involves a few steps. First, we need to download the .rpm file that will automatically install the software. ADP 6.3 is the currently available version. For a 64-bit Linux virtual machine, use nutaq-adp6-microtca-sdk-6-3-0-1-fc17-x86-64.rpm.
Once it is downloaded, go to the folder where the .rpm file is located and run the following command:
rpm –Uhv nutaq-adp6-microtca-sdk-6-3-0-1-fc17-x86-64.rpm
Next, enter the following commands to set the proper permissions on the Nutaq folder. Note that you must be in super-user (su) mode first. Replace <username> with your own user name.
chown –R <username> //opt/Nutaq
chgrp –R <username> //opt/Nutaq
chmod –R +x //opt/Nutaq
chown –R <username> //var/cache
For the ADP installation, Nutaq supplies a detailed guide to installing GNU Radio with the Radio420 (including steps to load the included GNU Radio bitstream in the Perseus, which won’t be detailed here).
Open a terminal window and enter the following line:
wget http://www.sbrac.org/files/build-gnuradio && chmod a+x ./build-gnuradio && ./build-gnuradio -v -ja
The command downloads and executes a script that builds the GNU Radio toolkit (including its dependencies from source) and installs it on the system. This process can take a while, so be patient. On my PC, the install took almost an hour.
Next, configure the path of the ADP6 libraries. I used Vim (a text editor) to edit the .bashrc file:
Press the “i” key to enter the insert mode and add the following lines:
Figure 5 – Nutaq ADP6 path configuration
Press ESC and then type :wq to save the file and close Vim.
We are now ready to install the Nutaq Radio420X’s GNU Radio plugins. Download the GNU Radio Plug-in for Nutaq SDR Systems and extract the gr-radio420 folder in your home directory. In a terminal window, go to the gr-radio420 folder and enter to the following command to launch the installation:
The script will install the Radio420 blocks.
Configuring Ethernet cards
At this point, the only step left is configuring the Ethernet cards. For my setup, I have two Ethernet cards installed in my computer. One connects to the local network while the other is for communicating with the SDR system.
Figure 6 shows VirtualBox’s network setting window with the two active adapters.
Figure 6 – Settings for the local network card (left) and for the SDR connections (right)
I use the Bridged Adapter option for the card connected to the Radio420X system and assigned a fixed IP address (i.e. 192.168.0.1) in the Windows 7 network configuration. In Fedora, we have to set a different IP within the same subnetwork (I use 192.168.0.2).
Then, we have to make sure that the network adapter can support jumbo frames since the default Radio420X frame size is 8192 bytes. In a terminal window, run the ifconfig command to verify the current maximum transmission unit (MTU) setting (Figure 7).
Figure 7 – Output of ifconfig command
In this case, I used the command ifconfig p16p1 mtu 9000 to raise the frame size of 1500 to 9000 bytes.
If your Ethernet card does not support jumbo frames, you will need to decrease the default frame size of the Radio420X. Open the radio420_api.h file (located in gr-radio420/lib/) and replace the value of the #define RTDEX_PACKET_SIZE (8192) with a smaller “power of 2” value such as 1024. Re-launch ./install.sh to complete the installation.
Operating the Radio420X in GNU Radio Companion
Now that everything is set up, we launch GNU Radio Companion by running the script ./launch_gnuradio_companion_x86_64.sh, located in the gr-radio420 folder.
Open an example project (see the Nutaq’s GNU Radio document) or create your own. See the following posts on how to operate Nutaq’s SDR with GNU Radio:
In this post we have seen how to set up a GNU Radio based SDR system using Nutaq’s Radio420X and a Windows-based PC. The virtual machine option provides a quick and handy way to use the GNU Radio environment without requiring an extra computer to run the Linux OS.