Background
We’ve posted about the powerful capabilities of Docker before, including topics on standing up a containerized version of REDHAWK SDR and testing a REST-Python server with Docker Compose. In this post, we will walk you through using Docker to build and run Analog Devices’ IIO Oscilloscope.
IIO Oscilloscope is a product from Analog Devices, Inc. that uses libiio to interface with Linux IIO devices developed by Analog Devices. It is included on many of the evaluation platforms that Analog Devices supports, and for the purposes of demonstration, it is used in this post with a Zedboard and FMCOMMS3 board. IIO Oscilloscope is a great tool not only for demonstrating capabilities of Analog Devices’ products, but also for testing, debugging, and fine-tuning an RF system. Parameters such as gain, tuning, and filter profiles can be observed and modified on the fly. You can read more about the IIO Oscilloscope here.
In order to leverage this tool without the worries and burdens of runtime library dependencies, we have developed a Docker image to run the IIO Oscilloscope on any platform!
Building the Docker Image
There are two options for building and running the Docker image for the IIO Oscilloscope. The easier method is to use the pre-built image from Docker Hub (Option A), but if you don’t have a Docker Hub account or you want to tweak the image, you can build the image yourself (Option B).
Option A: Use the Pre-Built Image from Docker Hub
Instead of building the image yourself, you can just get the image from Docker Hub! Use the following command:
$ docker pull geontech/adi-iio-oscilloscope
When the pull has completed, you can skip down to the Running the Docker Image section.
Option B: Build the Image Yourself
Clone the repository from Geon Technologies’ Github account and cd
into the directory.
$ git clone https://github.com/geontech/docker-adi-iio-oscilloscope
$ cd docker-adi-iio-oscilloscope
To build the image, run the build.sh
script.
$ ./build.sh
This script invokes the Dockerfile
which installs the runtime dependencies on a Ubuntu 16.04 base image before installing the following Analog Devices libraries:
Note: The
libiio
library is built with the serial backend interface turned off (-DWITH_SERIAL_BACKEND=OFF
). This was a workaround to not having the correct serial runtime libraries.
Running the Docker Image
Setting up the Target Device
Configure the network on the target device to be on the same network as the host operating system:
$ ifconfig eth0 192.168.1.2 netmask 255.255.255.0
Run the IIO daemon on the target device that is connected to the FMCOMMS3 board. Execute the following command:
$ iiod
The shell should respond with the following message:
Starting IIO Daemon version 0.9
Registered to ZeroConf server avahi 0.6.32
Launching the Docker Container
If you followed Option A above to use the pre-built Docker image, execute the following command to launch the Docker container:
$ docker run --rm -d -e DISPLAY=$DISPLAY -v /tmp/.X11-unix:/tmp/.X11-unix geontech/adi-iio-oscilloscope
If you followed Option B above to build the Docker image yourself, execute the run.sh
script.
$ ./run.sh
Note: The run script executes the same command listed above for Option A – it’s just a way to avoid some typing!
The Docker container launches the geontech/adi-iio-oscilloscope
image and exports the display to the host operating system to view the GUI.
Connecting the IIO Oscilloscope to the Target Device
To connect to the target device from the IIO Oscilloscope application, perform the following steps:
- Enter the IP address of the target device in the
Remote Devices (network) Hostname
box
- Click the
Refresh
button - If all goes well the
FRU Info
,Context Info
, andIIO Devices
boxes will be populated with data
- Click the
OK
button
You are ready to start using the Analog Devices IIO Oscilloscope within a Docker container! As always, let us know how we can help you bring advanced RF capabilities to your customers!