Wiki

This version is outdated by a newer approved version.DiffThis version (25 Feb 2019 02:19) was approved by Travis Collins.The Previously approved version (20 Dec 2018 19:28) is available.Diff

This is an old revision of the document!


GNU Radio

GNU Radio comes pre-installed on the SD card image that ships with the AD-FMCOMMS2-EBZ, AD-FMCOMMS3-EBZ, AD-FMCOMMS4-EBZ, ARRADIOand AD-FMCOMMS5-EBZ, as well as the gr-iio blocks. Gnu Radio can also be compiled for a host PC.

Installing GNU Radio

Compiling the gr-iio blocks for your PC

The preferred way

On Ubuntu 16.04 or newer GNU Radio can be installed from the package management. The installed version should be compatible with the gr-iio package build from source. Libiio and gr-iio may also be available from the package management, but to get the latest and most feature complete work, it’s recommend to build it from the latest github sources.

Install GNU Radio and other dependencies
apt-get -y install gnuradio-dev libxml2 libxml2-dev bison flex cmake git libaio-dev libboost-all-dev swig
Download and build libiio
git clone https://github.com/analogdevicesinc/libiio.git
cd libiio
cmake .
make 
sudo make install
cd ..
Download and build libad9361-iio
git clone https://github.com/analogdevicesinc/libad9361-iio.git
cd libad9361-iio
cmake .
make 
sudo make install
cd ..
Download and build gr-iio
git clone https://github.com/analogdevicesinc/gr-iio.git
cd gr-iio
cmake .
make 
sudo make install
cd ..
sudo ldconfig

GNURadio will recommend you include

/usr/local/lib${type}/python${PYVER}/site-packages/gnuradio

or

/usr/local/lib${type}/python${PYVER}/dist-packages/gnuradio

in your PYTHONPATH during installation. If this is not the case you will need to modify the cmake command for the gr-iio configuration above with:

cmake -DCMAKE_INSTALL_PREFIX=/usr .

For certain binary installs of GNU Radio, python binding are placed in a competing folder to GNU Radio's built-in blocks. This may require you to manualy copy blocks between the /usr/lib and /usr/local/lib. If you receive import error for iio_swig this is likely the case. To remedy this move the blocks between the necessary folders:

cp -r /usr/local/lib/python2.7/dist-packages/gnuradio/iio /usr/lib/python2.7/dist-packages/gnuradio/

This is due to the iio python blocks being placed in the gnuradio subfolder. This is required since the iio language binding for python would overwrite these blocks.

The alternative way

The gr-iio blocks can be installed using PyBombs or if you have GNURadio already installed from source go to the “Download and build libiio” step above.

On the ZedBoard / ZC706

GNURadio and the gr-iio blocks are installed by default on the latest ADI image. If you want to install GNURadio on your host consult the official GNURadio Wiki.

Windows Support

A complete GNU Radio installer with gr-iio support is provided for Windows 7/10. Please read the entire linked page before installing.

Using the FMCOMMS-2/3/4 blocks

Although the GNU Radio block is called “FMCOMMS-2”, it will work with the any of the AD-FMCOMMS[234], ADRV9361, ADRV9364, ADRV9363 or ARRADIO boards. The FMCOMMS-2 IIO blocks can run over the IP network or USB. By setting the “IIO context URI” parameter to the IP address of the target board, you can stream samples from/to the remote board. It should be preferred when possible, as it is faster, knowing that the target board does not have the processing power of your PC.

Common

  • IIO context URI: Set to “local:” if using GNU Radio locally on the target e.g. Zedboard. If using GNU Radio remote on a PC, set the target IP address using ip:XXX.XXX.XXX.XXX (some boards like the PlutoSDR run a Zeroconf/Avahi deamon so the the URI may look like this: ip:pluto.local) or via USB using the URI usb:XX.XX.XX
  • Buffer size: Size of the internal buffer in samples. The IIO blocks will only input/output one buffer of samples at a time.

Source Block

  • RF Bandwidth(MHz): Configures RX analog filters: RX TIA LPF and RX BB LPF. Read More
  • Sample Rate(MSPS): Frequency at which the hardware will input/output samples. Read More
  • LO Frequency(MHz): Selects the RX local oscillator frequency. Range 70MHz to 6GHz with 1Hz tuning granularity. Read More
  • RF Port Select: Selects the RF port to be used. Can be either any of the inputs on the Rx input mux (in single ended or differential) or the Tx monitor input. Read More
  • Tracking Read More
    • Quadrature
    • RF DC
    • BB DC
  • Manual Gain(dB): Controls the RX gain only in Manual Gain Control Mode (MGC). Read More
  • Gain Mode (RX1, RX2): Selects one of the available modes: manual, slow_attack, hybrid and fast_attack. Read More
  • RX1/RX2 Enabled: Enables the receive data path
  • Filter: Allows a FIR filter configuration to be loaded from a file. Read More
  • Filter auto When enabled loads a default filter and thereby enables lower sampling / baseband rates.

Sink Block

  • RF Bandwidth(MHz): Configures TX analog filters: TX BB LPF and TX Secondary LPF. Read More
  • Sample Rate(MSPS): Frequency at which the hardware will input/output samples Read More
  • LO Frequency(MHz): Selects the TX local oscillator frequency. Range 70MHz to 6GHz with 1Hz tuning granularity. Read More
  • RF Port Select: Selects the RF port to be used. Read More
  • Attenuation(RX1, RX2)(dB): Individually controlls attenuation for TX1 and TX2. The range is from 0 to -89.75 dB in 0.25dB steps. Read More
  • Cyclic: Set to “true” if the “cyclic” mode is desired. In this case, the first buffer of samples will be repeated on the enabled channels of the FMCOMMS-2 until the program is stopped.
    The FMCOMMS-2 IIO block will report its processing as complete: the blocks connected to the FMCOMMS-2 IIO block won't execute anymore, but the rest of the flow graph will.
  • TX1/TX2 Enabled: Enables the transmit data path
  • Filter: Allows a FIR filter configuration to be loaded from a file. Read More
  • Filter auto When enabled loads a default filter and thereby enables lower sampling / baseband rates.

Using the PlutoSDR blocks

Common

  • IIO context URI: Set to “local:” if using GNU Radio locally on the target e.g. Zedboard. If using GNU Radio remote on a PC, set the target IP address using ip:XXX.XXX.XXX.XXX (some boards like the PlutoSDR run a Zeroconf/Avahi deamon so the the URI may look like this: ip:pluto.local) or via USB using the URI usb:XX.XX.XX
  • Buffer size: Size of the internal buffer in samples. The IIO blocks will only input/output one buffer of samples at a time.

Source Block

  • RF Bandwidth(MHz): Configures RX analog filters: RX TIA LPF and RX BB LPF. Read More
  • Sample Rate(MSPS): Frequency at which the hardware will input/output samples. Read More
  • LO Frequency(MHz): Selects the RX local oscillator frequency. Range 70MHz to 6GHz with 1Hz tuning granularity. Read More
  • Tracking Read More
    • Quadrature
    • RF DC
    • BB DC
  • Manual Gain(dB): Controls the RX gain only in Manual Gain Control Mode (MGC). Read More
  • Gain Mode: Selects one of the available modes: manual, slow_attack, hybrid and fast_attack. Read More
  • Filter: Allows a FIR filter configuration to be loaded from a file. Read More
  • Filter auto When enabled loads a default filter and thereby enables lower sampling / baseband rates.

Sink Block

  • RF Bandwidth(MHz): Configures TX analog filters: TX BB LPF and TX Secondary LPF. Read More
  • Sample Rate(MSPS): Frequency at which the hardware will input/output samples Read More
  • LO Frequency(MHz): Selects the TX local oscillator frequency. Range 70MHz to 6GHz with 1Hz tuning granularity. Read More
  • RF Port Select: Selects the RF port to be used. Read More
  • Attenuation (dB): Individually controlls attenuation for TX1 and TX2. The range is from 0 to -89.75 dB in 0.25dB steps. Read More
  • Cyclic: Set to “true” if the “cyclic” mode is desired. In this case, the first buffer of samples will be repeated on the enabled channels of the FMCOMMS-2 until the program is stopped.
    The FMCOMMS-2 IIO block will report its processing as complete: the blocks connected to the PlutoSDR IIO block won't execute anymore, but the rest of the flow graph will.
  • Filter: Allows a FIR filter configuration to be loaded from a file. Read More
  • Filter auto When enabled loads a default filter and thereby enables lower sampling / baseband rates.

IIO Examples

Several sample flow graphs that use the FMCOMMS-2/3/4 IIO blocks are provided in our GNU Radio repository. They can be found in the “iio-example” folder.

Windows

The current recommended way to use GNU Radio under Windows is with the Windows Subsystem for Linux (WSL). To install WLS follow the instructions from Microsoft here: https://docs.microsoft.com/en-us/windows/wsl/install-win10 . Please install Ubuntu when selecting an operating system.

Once Ubuntu is up and running go to GNU Radio install section above and proceed with “the preferred way” install, which will be much faster than pybombs.

Once all the blocks are installed an X11 server will need to be install on Windows itself so we can use GNU Radio's GUI tools. Download and install Xming in Windows.

Next back in Ubuntu, add the following to your .bashrc file:

DISPLAY=:0.0
export DISPLAY

Then in Ubuntu source the file with command

source ~/.bashrc

Next, launch Xming in Windows which should only add an icon to your taskbar tray.

Finally, launch GNU Radio Companion from Ubuntu with command

gnuradio-companion

This should launch the familar GUI for GNU Radio.

resources/tools-software/linux-software/gnuradio.1551057556.txt.gz · Last modified: 25 Feb 2019 02:19 by Travis Collins