Pluto SDR Environment Setup: libiio, libad9361-iio, GNU Radio & gr-iio on Ubuntu
A complete step-by-step guide to setting up your Pluto SDR development environment on Ubuntu — covering libiio, libad9361-iio, GNU Radio (v3.8/v3.10), gr-iio installation, verification, and creating a simple spectrum analyzer.
Preface
The ADALM-PLUTO SDR device introduced by ADI in recent years has gained significant popularity in the open-source community due to its lightweight and flexible characteristics, combined with its affordable price compared to professional radios. This has led to many applications, such as GPS tracking, hardware-level virtual positioning via GPS spoofing, and electronic key replay attacks (though HackRF is more commonly used for these). Additionally, it's an excellent choice for communication engineering students, educators, and amateur radio enthusiasts.
While purchasing an original Pluto SDR in China can be challenging, many domestic companies or teams have developed enhanced software-defined radio platforms based on mature SDR architectures. These offer better performance and broader firmware compatibility at reasonable prices. One device can support not only Pluto but also famous radio firmwares like FMCOMMS and UHD, allowing you to run corresponding examples and perform basic development.
This article explains what settings you need to configure on your PC after receiving a Pluto device to successfully begin debugging.
Install libiio
First, install the required dependencies (this command is long — copy it completely):
$ sudo apt-get install build-essential libxml2 libzstd-dev libxml2-dev bison flex libcdk5-dev cmake libaio-dev libusb-1.0-0-dev libserialport-dev libxml2-dev libavahi-client-dev doxygen graphviz
Then clone the source code and compile/install:
$ git clone https://github.com/analogdevicesinc/libiio.git --branch v0.25
$ cd libiio
$ mkdir build
$ cd build
$ cmake ..
$ make -j$(nproc)
$ sudo make install
$ sudo ldconfig
$ cd ../..
After installation, type iio_info in the terminal. If version information is displayed, the installation was successful.

Install libad9361-iio
The steps are similar to the previous section:
$ git clone https://github.com/analogdevicesinc/libad9361-iio.git
$ cd libad9361-iio
$ cmake .
$ make -j$(nproc)
$ sudo make install
$ sudo ldconfig
$ cd ..
Install GNU Radio
You can install GNU Radio directly via apt: sudo apt install gnuradio. However, this method does not allow you to specify a version, and the installed version varies by platform (specific versions per system can be found here). For example, Ubuntu 22.04 installs v3.10.1.1 by default, while Ubuntu 20.04 requires adding the GNU Radio repository to install v3.10 — otherwise it installs v3.8.
If you don't have specific version requirements, simply run sudo apt install gnuradio and skip the gr-iio installation (since newer versions include it). If you need a different version, source compilation is recommended. The following example uses v3.8.
First, install the dependencies (this command is long — copy it completely):
$ sudo apt install git cmake g++ libboost-all-dev libgmp-dev swig python3-numpy python3-mako python3-sphinx python3-lxml doxygen libfftw3-dev libsdl1.2-dev libgsl-dev libqwt-qt5-dev libqt5opengl5-dev python3-pyqt5 liblog4cpp5-dev libzmq3-dev python3-yaml python3-click python3-click-plugins python3-zmq python3-scipy python3-gi python3-gi-cairo gir1.2-gtk-3.0 libcodec2-dev libgsm1-dev libusb-1.0-0 libusb-1.0-0-dev libudev-dev
Then proceed with the same steps as before:
$ git clone https://github.com/gnuradio/gnuradio.git
$ cd gnuradio
$ git checkout maint-3.8
$ git submodule update --init --recursive
$ mkdir build
$ cd build
$ cmake -DCMAKE_BUILD_TYPE=Release -DPYTHON_EXECUTABLE=/usr/bin/python3 ..
$ make -j$(nproc)
$ sudo make install
$ cd ../..
$ sudo ldconfig
Now add environment variables to ~/.bashrc:
$ vim ~/.bashrc
# Add the following lines at the end of the file:
export PYTHONPATH=$PYTHONPATH:/usr/lib/python3/dist-packages/iio:/usr/local/lib/python3/dist-packages
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/lib:/usr/local/lib
# Save and exit
$ source ~/.bashrc
$ gnuradio-companion
You can find the GNU Radio Companion icon in the application list, or type gnuradio-companion in the terminal to launch it. If the main interface displays correctly, the installation was successful.
Uninstalling GNU Radio
If installed from source:
$ cd gnuradio
$ sudo make uninstall
If installed via package manager (e.g., apt):
$ sudo apt remove gnuradio
$ sudo apt autoremove -y
Install gr-iio
GNU Radio v3.8 does not include the gr-iio module for communicating with Pluto SDR, so it must be installed separately. If you installed GNU Radio v3.10 or newer (including via apt), gr-iio is already included and you can skip this step.
Installation steps:
$ sudo apt install liborc-dev
$ git clone -b upgrade-3.8 https://github.com/analogdevicesinc/gr-iio.git
$ cd gr-iio
$ cmake .
$ make -j$(nproc)
$ sudo make install
$ cd ..
$ sudo ldconfig
$ gnuradio-companion
After installation, open GNU Radio. If you find Pluto-related blocks in the right-side block library, the environment is properly configured.

Uninstalling gr-iio
$ cd gr-iio
$ sudo make uninstall
Verify Pluto SDR with libiio
Connect the Pluto SDR to your PC via USB or Ethernet. After the SDR boots up, type iio_info -s in the terminal. If information containing "Analog Devices" or "Pluto" appears, note the IP address at the beginning (e.g., ip:192.168.2.1) or the USB identifier at the end (e.g., usb:1.8.5).

Then type iio_info -u 'ip:192.168.2.1' or iio_info -u 'usb:1.8.5'. If a large amount of information is printed (showing various transmitter/receiver attributes from the firmware), everything is working properly.


Verify GNU Radio
Now use GNU Radio and Pluto SDR to create a simple spectrum analyzer to test functionality. Open GNU Radio Companion (via the application icon or by typing gnuradio-companion in the terminal).
First, modify the Options and Variable blocks in the top-left corner as shown below: give your project a valid name and change the sample rate to 2.4 MHz.


Then find the PlutoSDR Source and QT GUI Frequency Sink blocks in the right-side block library (see figure for positions), drag them into the center area, and connect them:

Configure the PlutoSDR Source block as shown below, modifying the device address and sample rate:

Press F6 or click the Execute button in the menu bar to start the program. The output should look like this:

This successfully demonstrates the integration between Pluto SDR and GNU Radio.
Hardware Support
For a ready-to-use Pluto SDR with full frequency support (70MHz–6GHz) and Gigabit Ethernet: