Featured image of post Inspectrum with SigMF Files

Inspectrum with SigMF Files

Installing Inspectrum with SigMF files support on Ubuntu

This post is as much a note to myself, for the next time that I hit this issue, which is installing Inspectrum with SigMF support.

The tool I’m installing is Inspectrum which is for analysing captured files of sampled data, primarily from Software Defined Radios. This allows for looking at signals, and analysing what is in the capture. I was looking to use this tool with some SigMF files, the Signal Meta data files are made up of a Binary File containing the sample data, and a JSON companion file, which contains details about the capture. This file with details about the capture can also include annotations, which is what I am interested in today. The SigMF Repository contains all the details on what the standard supports: github.com/gnuradio/SigMF

The Github repo for Inspectrum includes details on how to get it built, which is a simple case of running a few commands on my Ubuntu PC:

sudo apt-get install qtbase5-dev libfftw3-dev cmake pkg-config libliquid-dev
sudo apt-get install build-essential git
git clone https://github.com/miek/inspectrum.git
cd inspectrum/
mkdir build
cd build/
cmake ..
make
sudo make install

The cmake command behaves as expected but it does not find libsigmf which is probably expected as I haven’t installed it as part of installing the dependancies in the first two commands:

-- The CXX compiler identification is GNU 9.3.0
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found PkgConfig: /usr/bin/pkg-config (found version "0.29.1")
-- Found FFTW: /usr/lib/x86_64-linux-gnu/libfftw3f.so  
-- Found LIQUID: /usr/lib/x86_64-linux-gnu/libliquid.so  
-- libsigmf not found. Disabling SigMF support
-- Configuring done
-- Generating done

This means that I won’t be able to open sigmf files in Inspectrum, as Inspectrum will now throw an error even when you attempt to open just the binary .sigmf-data files, in the newer versions.

Inspectrum Error opening Sigmf File

The issue I found next was that there were no clear instructions on how to install this libsigmf within its git repository, this seemed to be some assumed knowledge which I was clearly lacking. After a hunt around the repo, and looking though the github workflow files it was possible to work out the steps I seemed, by building and installing the libsigmf examples, which seemed to get the missing libsigmf library installed:

git clone https://github.com/deepsig/libsigmf.git
cd libsigmf
cmake -B build
cmake --build build
sudo -H cmake --install build

The one step I then discovered I had missed is that I also need to install the dependancies for the libsigmf package on my Ubuntu PC, thankfully these are just available using apt on Ubuntu 20 LTS.

sudo apt install libflatbuffers-dev nlohmann-json3-dev

Now we are able to remove the build folder from the Inspectrum repositry we created earlier, and have a go at building again. Now we get a Much better looking message from the cmake command including Enabling SigMF support.

-- The CXX compiler identification is GNU 9.3.0
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found PkgConfig: /usr/bin/pkg-config (found version "0.29.1")
-- Found FFTW: /usr/lib/x86_64-linux-gnu/libfftw3f.so  
-- Found LIQUID: /usr/lib/x86_64-linux-gnu/libliquid.so  
-- libsigmf found. Enabling SigMF support
-- Configuring done
-- Generating done

From here is just a case of completing the build, running instpectrum and opening up a sigmf file.

Sigmf File with annotations

This means that I can now have a good look at some of the data files complete with the annotations that I have downloaded and wanted to explore. The files I am taking a look at are downloaded from DeepSig for a competition being run at IEEE International Workshop on Signal Processing Advances in Wireless Communications, with this synthetic dataset of over 100Gb of RF data making up the Wideband Signal Recognition challenge. The dataset is currently available for anyone to download if they follow the challenge links and provide an email address, although it may take a while to download given its size. Now I’ve seen the data it is tempting to have a go and see what I can do, having played around with Modulation Recognition using machine Learning in the past it looks like a tempting challenge to have a go at, although it looks like a big challenge and I’m not sure how far I would get as a one man band over just a couple of months.

Built with Hugo
Theme Stack designed by Jimmy