You are on page 1of 12

GNU Radio Using

Radio420
(PicoSDR, uSDR42x, ASP42x Systems)

March 2013

Revision history
Revision

Date

Comments

0.9

February 2013

First released revision

1.0

March 2013

Linguistic revision

1 Installation

This chapter presents the requirements and the procedure to install GNU Radio.

1.1 Requirements
The following hardware and software requirements must be met to use GNU Radio on Fedora 17.

1.1.1 Hardware
1 Nutaq SDR
1 male-to-male MMCX cable
4 MMCX antennas
1 Ethernet cable
1 Gigabit Ethernet network adapter

1.1.2 Software
Nutaq ADP 6 software and latest
Fedora 17 installed on a x86 computer

1.2 Installing GNU Radio on Fedora 17


To install GNU Radio:
1.

Install GNU Radio by running the following command:


wget http://www.sbrac.org/files/build-gnuradio && chmod a+x ./build-gnuradio && ./buildgnuradio -v -ja
It will download a script and execute it. This script will build the GNU Radio toolkit including its
dependencies from source and install it to the system.

2.

If not already done, install the Nutaq ADP6 software.


You may have to configure the path to the Nutaq ADP6 libraries using the following command:
For a 64-bit computer
export LD_LIBRARY_PATH=/opt/Nutaq/ADP6/ADP_MicroTCA/sdk/lib64/
For a 32-bit computer
export LD_LIBRARY_PATH=/opt/Nutaq/ADP6/ADP_MicroTCA/sdk/lib/

3.

After expanding the gr-radio420 archive, run the install.sh script located in the gr-radio420 folder:
./install.sh
It will ask for your password so that it can install the Radio420 software using the administrative
privilege.

4.

In the default Radio420 configuration, the Ethernet communication use jumbo frames of 8192 bytes.
Make sure that the Ethernet card can support jumbo frames and is configured correctly.
The figure below shows the current configuration of the Ethernet card. Make sure that the MTU
value is higher than 8192. If not, set the Ethernet card MTU to 9000 as follows:
ifconfig your_ethernet_device_name mtu 9000
(for example,ifconfig em1 mtu 9000).
Verify that the MTU configuration worked properly using the ifconfig command.

If there is an invalid argument error, it is possible that the Ethernet card cannot support jumbo
frames. If it is the case, it still possible to use the GNU Radio420 plugin but the effective bandwidth of
Ethernet communication can be limited by the host computer.
To reduce the Ethernet packet size, open the radio420_api.h file located in the gr-radio420/lib/
folder. Find the following line:
#define RTDEX_PACKET_SIZE (8192)
and modify the 8192 value to a smaller power of 2 value such as 1024. Make sure that the new
value is supported by the Ethernet card.
Save the file and restart the script:
./install.sh

2 Running GNU Radio

It is possible to generate your own bitstream on a Windows computer with Xilinx ISE 13.4 and ADP6
software or your can use the default bitstream provided inside the bin folder of the GNU Radio420
plugin.
Section 2.1 and 2.2 present the procedures to generate your own bitstream using respectively EDK and
System Generator. If you do not want to generate your own bitstream, proceed to the section 2.3.

2.1 Generating bitstream with EDK


1.

Using EDK Platform Studio, browse to the


ADPROOT\examples_perseus6010\perseus6010_radio420x_rtdex_record_playback\edk\ folder and
open the perseus6010_radio420x_record_playback.xmp project.

2.

On the Device Configuration menu, click Update Bitstream.


This will generate a bitstream (*.bit) required to run the GNU Radio software.

Xilinx Platform Studio window for bitstream generation

2.2 Generating bitstream with System Generator


1.

In Windows, open System Generator linked with MATLAB 2011b.

2.

Browse to the ADPROOT\matlab\examples\perseus601x\ folder and open the


perseus601x_radio420x_fpga.mdl model.

3.

Double click on the System Generator icon, select your FPGA part number and click on the Generate
button.
This will generate a bitstream (*.bit) required to run the GNU Radio software.

In the System Generator model figure below, only blocks outlined in red are used for the GNU Radio
streaming example.
Section 1 contains the configuration blocks
Sections 2 and 3 contain Custom Registers
Section 4 contains the RTDEx RX synchronization logic for the MIMO configuration
Sections 5 and 6 connect the RTDEx RX blocks with the Radio420 DAC interfaces.
Sections 7 and 8 connect the Radio420 ADC interfaces with the RTDEx TX blocks.

System Generator bitstream generation

2.3 FPGA logic description


The bitstream generated with EDK, with System Generator and the precompiled bitstream all implement
the same logic.
The FPGA logic allows the user to run examples demonstrating the use of Record/Playback, DDS
generation and streaming with the Ethernet port. In the GNU Radio420 plug-in, only the streaming
configuration is used.
The Custom Register 1 value must be set to 6 to connect the RTDEx RX signals with the Radio420 DAC
interface.
The Custom Register 3 value is used to allow writes to the RTDEx TX buffer. Once the RTDEx
communication is setup by the host computer, this register must be set to 1.
The Custom Register 4 is used to synchronize both RTDEx RX channel together when in the MIMO
configuration. When this register is set to 1, both RTDEx RX fifos must contain samples before they start
sending there samples to the DAC interface. In SISO configuration, this register must be set to 0.

2.4 Programming the FPGA and launching GNU Radio


4.

In Windows, using the Xilinx Impact software, load the bitstream onto the Xilinx FPGA.
Alternatively, in Fedora 17, you can use the CLI command fpgaflash to program in the flash a
bitsteam that will be loaded at the Perseus power up. Refer to the CLI (Command Line Interface)
documentation for more information about fpgaflash.

5.

You may now run the gnuradio-companion software located at in the /usr/local/bin/gnuradiocompanion folder.
You will need to run gnuradio-companion as root so that it is able to inject a raw Ethernet packet
onto the network that will be used to send and receive signals when communicating with the
Radio420 carrier.

6.

Before starting gnuradio-companion make sure that the following paths are set correctly for the root
user:
LD_LIBRARY_PATH must contain the Nutaq sdk library path (for example,
/opt/Nutaq/ADP6/ADP_MicroTCA/sdk/lib64/) and the GNU Radio library path (for example,
/usr/local/lib64/).
PYTHONPATH must contain the Python package path (for example,
/usr/local/lib64/python2.7/site-packages).

Note:

Each time a new root terminal is started, the environment variables can be reset. Some scripts are present
in the gr-radio420 folder to set the environment variables before starting gnuradio-compagnion. For a
64-bit computer, use launch_gnuradio_companion_x86_64.sh; for a 32-bit computer use
launch_gnuradio_companion_i686.sh.
7.

Once gnuradio-companion is started, you can find our example project files in the
gr-radio420/examples folder.

3 Examples

This chapter presents two examples of the use of GNU Radio with Radio420.

3.1 Digital Voice Transmission Example


3.1.1 Procedure
1.

Open the voice_gmsk.grc project file.

2.

Double-click Radio420 GigE: Global block.


A window containing the settings for the Radio420 opens. Depending on the network configuration,
you will need to reconfigure the IP address of the Radio420 carrier (Perseus board) by changing the
field named IP Address.

3.

Connect an MMCX antenna to ports TX and RX of the Radio420.


Alternatively, you can use a male-to-male MMCX cable, but you will have to adjust the gain manually.

4.

Start the example by click the Execute the flow graph button.

3.1.2 Expected Results

1.

Make sure the data displayed in the scope does not saturate. The dynamic range of the Radio420
source block is between -1 and 1. If the received signal exceeds or almost exceeds the dynamic range,
lower the RX or the TX gain. The GMSK Demodulation and Packet Decoder blocks will not be able to
properly decode the recorded voice if the signal saturates.
If the GMSK Demodulation and Packet Decoder blocks work properly, you should see the FFT of the
decoded signal in the FFT Plot window. If the FFT Plot window is empty, try different gains or move
you antennas.

2.

Make sure the volume of the microphone and the speakers are correctly set. If no sound is heard, try
turning up their volume or using another speaker peripheral. If only noise is heard, try turning down
the volume of your microphone.

3.1.3 How It Works


This model transmits a digitally encoded audio signal recorded from the computer microphone, recodes it
using GMSK encoding, and transmits it through the Radio420. At the other end, the Radio420 receives the
signal. The computer decodes the GMSK signal and plays it back on the computer speakers.
TX path

1.

Reads from the default audio input of the computer and outputs the signal as float so that it is
available to other signal processing blocks.

2.

Packetizes data at its input. It adds a preamble so that the beginning of the packet is detected. When
no data is available to be read, it writes filler data so that data is always available to be sent to the
transceiver.

3.

Encodes data using GMSK (Gaussian minimum shift keying).

4.

Sends data to the SDR unit using Gigabit Ethernet.

RX path

1.

Receives data from the SDR unit using Gigabit Ethernet.

2.

Demodulates the signal that was encoded using GMSK encoding.

3.

Detects preambles in the data stream and records the data following the preamble.

4.

Sends data to the default audio output.

5.

Analyzes data by doing a fast Fourier transform and displays it as a frequency domain graph in realtime.

6.

Displays the data in real-time as a time domain.

3.2 MIMO Loopback Example


3.2.1 Procedure
1.

Open the sinkandsource_mimo.grc project file.

2.

Double-click Radio420 GigE: Global block.


A window containing the settings for the Radio420 opens. Depending on the network configuration,
you will need to reconfigure the IP address of the Radio420 carrier (Perseus board) by changing the
field named IP Address.

3.

Connect to an MMCX antenna to all TX and RX ports of the Radio420.


Alternatively, you can use male-to-male MMCX cables, but you will have to adjust the gain manually.

4.

Using a male-to-male MMCX cable, connect the RefOut port of card 1 to the RefIn of card 2.

5.

Start the example by clicking the Execute the flow graph button.

This provides clock synchronization to the second Radio420.

3.2.2 Expected Results

1.

Make sure the received data does not saturate. The dynamic range of the Radio420 source block is
between -1 and 1. If the received signal exceeds or almost exceeds the dynamic range, the displayed
FFTs in the FFT Plot windows can be dramatically altered.

2.

If a lot of harmonics are seen in the FFT Plot windows, try lowering the gains, or moving the antennas
apart.

3.

If only noise is seen in the FFT Plots, try increasing the gains, or try moving the antennas closer.

You might also like