Qt-DAB-0.99X, WFM-rpi and SDR-J SW 7.2 (update 15-02-17)

News: April 28 2017. The windows executables are now recompiled from the latest sources (see github).

SDR-J is a set of open source programs for the receiving side of Software Defined Radio on the PC. Started as a hobby project (it still is!!!) for getting some sound out of a PC with an Elektor SDR card as (Elektor May 2007) radio device, it evolved into the current set of programs.
The set consists of software for DAB (Windows and Linux PC as well as for a Raspberry PI 2 (3) running a decent Linux distribution), software for (W)FM (Windows and Linux PC and Raspberry PI 2 (3)), software for "classic radio", i.e. amateur modes and DRM, on Windows and Linux PC (it will run on the Raspberry PI 2 (3) though), and some simple software for viewing spectra also on Windows and Linux PC.

Receiving DAB Receiving DAB-2 Fm Reception Shortwave Radio Spectrum viewer

The pictures show (from left to right) screenshots of the use of the major components of the set

  1. the Qt-DAB software in operation with the SDRplay as running on the Raspberry PI 2
  2. the Qt-DAB software in operation with the AIRspy as running on my laptop, extended with the viewer for spectrum and signal constellation,

  3. the WFM software, running under Windows, using the Extio interface of the SDRplay,
  4. the SW software, when receiving a DRM transmission, using the SDRplay (remote), and
  5. the Spectrumviewer software using the AIRspy to look at the spectrum of a DAB transmission.

Most of the software is written in C++, and for most components the Qt framework for the GUI is used, while in all cases libraries available through a GPL are used. Exceptions are

  1. DAB-cmdline, a command line only version of the DAB software,
  2. a - limited - version of the DAB software that is encoded in the Ada programming language using gtk for a - very simple - interface).

The current precompiled (Windows) version is compiled against recent libraries for the devices (1.95 for the SDRplay, 1.08 for the AIRspy). The software will probably not work with versions of the SDRplay library before 1.95.
Furthermore, the common programs are now equipped with tooltips, where the function of a button, slider or other widget can be viewed by moving the cursor over the widget.

Supported devices.

All programs provide direct support - if so configured - for using common DABsticks (using the RT2832 chipset) and the SDRplay as input device. The DAB, WFM and Spectrumviewer programs provide further direct support for the AIRspy (including the AIRspy mini) if so configured. The Windows versions of these programs are configured for DABsticks, SDRPlay and Extio-XXX DLL's, while the DAB, the WFM and the spectrumviewer programs are also configured for the AIRspy.
The "classic" radio can be configured for the SDRplay and DABsticks. Furthermore, under Linux there is - if so configured - direct support for the PMSDR (using the soundcard as data input) and the elektor card while under Windows these - and other - devices are supported through Extio-XXX.dll's
Libraries (and dll's) can be found:

  1. for a DABstick, the rtlsdr library, to be obtained - with clear installation instructions - from the "www.osmocom.org site",

  2. for the SDRplay, the SDRplay library, to be obtained from the "www.sdrplay.com" site, with installation programs for Windows, Linux and the Raspberry PI,

  3. for the AIRspy, the AIRspy host tools site "https://github.com/airspy/host", also containing clear installation instructions.


For Windows, there is a single zipped folder containing the executables and relevant dll's for all programs. Download the Windows version of the DAB, WFM, Spectrumview and SW software in a zipped folder here . Note that, while a number of dll's is in the zipped files, the "basic ones" are supposed to be available elsewhere on your system. Note further that the libraries for the SDRplay - if you wish to use that - should be downloaded from the producer of the device.
The sources of the software can be downloaded from "https://github.com/JvanKatwijk/XXX" where XXX stands for the project. These projects also often contain up-to-date windows executables.

For more information on any of the programs, touch the appropriate label below.

DAB software.

There are three programs for DAB decoding, one can be considered to be more or less the common one, the other two are more special

  1. The Qt-DAB program. The sdr-j-dab and DAB-rpi programs from previous versions are combined into a single program. A variety of configuration options is available. Qt-DAB runs on the Raspberry PI 2, Windows and Linux PC's.

  2. The DAB-cmdline program. The program, as the name suggests, is without any GUI and does not depend on Qt. In the command line it is specified what device is used, what channel is to be selected and what program in that channel is selected.

  3. The ETI front end and backend. The eti-frontend will generate an ETI file from the input channel, the eti-backend will read an ETI file, and process it, including selection of a program. The two can be combined to emulate a common dab decoder.

Receiving DAB Receiving DAB Receiving DAB

New in the Qt-DAB program is the possibility to scan through the channels in the selected band until a channel with DAB content is encountered.
The presentation of information on the selected program also changed, the Qt-DAB and the eti-backend will show more detailed information on the selected program in a separate window as can be seen on the pictures above.
One of the pieces of information (Linux only) is the cpu usage, it shows that on the Raspberry PI 2 the average load, when running Qt-DAB, is app 65%.
The Qt-DAB program inherits from the sdr-j-dab program - if so configured - the possibility of showing a spectrum of the incoming signal and the constellation diagram.

The Windows executables are part of the windows distribution, that can be downloaded from as a zipped folder . The folder contains next to the executables most of the required libraries. The distribution contains two versions, Qt-DAB-0.998 and Qt-DAB-0.998-s. The latter does not have viewing the spectrum in its configuration.
The sources for the programs can be downloaded from
"https://github.com/JvanKatwijk/qt-dab" and/or
"https://github.com/JvanKatwijk/dab-cmdline" and/or
Compilation requires a number of libraries to be installed, including an appropriate C++ compiler toolchain. The Qt-DAB README file in the github repository contains pretty detailed information on the construction.
Both the Qt-DAB and the eti programs require Qt5 installed (although installation with Qt4 is very well possible). If/when the configuration includes the spectrum then the appropriate qwt library is also needed. Further libraries needed

  1. the libsndfile library, used for handling wav files for in- and output,

  2. the fftw3 library,
  3. the libusb1 library,
  4. the zlib library (used in the data decoding),
  5. the faad library (used for decoding the AAC output,
  6. the portaudio library. While some Linux distributions provide a portaudio version 18, version 19 is needed


Note that for compilation, the development files (i.e. the ".h" files) for all libraries should also be installed. Note further that, depending on the Linux distribution, the "INCLUDE_PATH" and the library path files might have to be modified in the configuration file.

For Linux, the devices that are to be supported can be selected in the configuration file (use either cmake or qmake) by commenting out or uncommenting the appropriate lines in these files. As an example, the line CONFIG += airspy specifies that support for the AIRspy should be compiled in the executable.

Note that adding a device to the configuration requires the development file(s) of the supporting library for that device to be installed

While the CMake configuration file assume Qt5, it is very well possible to compile for Qt4 using QMake.

The DAB-cmdline version does not depend on Qt, it can be only compiled using a Cmake script.

The Qt-DAB software has an option to send the sound output (the PCM samples) to an IP port (20040) rather than to the sound card, an option that can be set or unset in the ".pro" file for use with qmake (comment or uncomment the line CONFIG += tcp-streamer). To support listening in that case, the sources contain a simple "listener" program, that program is precompiled for the Windows library (and named "soundClient"). I use the Raspberry PI headless through an SSH connection, where the Raspberry PI is on a different location than where my chair is.

The Qt-DAB project at github ("https://github.com/JvanKatwijk/Qt-DAB") contains, next to the newest sources I am working on, sources for complete and recent releases as well as precompiled versions for Windows of these releases.

The command line parameters for the Dab-cmdline version are described in the README.md file in the github repository.

WFM Software.

The (Wideband)FM software consists of several instances of a simple FM receiver, configured to be used in conjunction with a given device, one of DABstick, SDRplay or AIRspy. The software will run under Windows (precompiled versions for all three mentioned devices as well as for Extio-XXX.dll's), and under Linux (both PC and Raspberry PI 2) configurable for any of these devices.

The program(s) support decoding of stations in the FM broadcast band in mono and stereo and support RDS decoding (obviously, the frequencies to be received depend on the radio device connected).

A recent feature is that the FM software supports a program list, a list of known programs with their frequencies, which can be set and altered. Such a program list may contain selected program names with their associated frequency and is maintained between program invocations. Selecting a station from the list will set the program to the frequency for that station.

Fm Reception Fm Reception-2

Operation of the WFM receiver software is straightforward.
  1. When the program is started, it will be idle until the button "START" is touched.

  2. The frequency can be selected by pressing the "Freq" button: a separate window will show a keyboard (see the picture) The frequency then can be specified in mHz or in kHz: after pressing the digits of the number, touch either the "mHz" or the "kHz" button to acknowledge and have the frequency sent to the WFM-rpi program.

  3. The button labelled "default" on the top row is the selector for the audio device. The selection depends on the soundcard on the system. The button labelled "fm4decoder" allows selection of an FM demodulator, 5 different approaches to FM demodulation are implemented, the "type" of the decoder show on the field to the right of the selector (the one shown is apparently the pll based one).

  4. The button labelled "rds on" is the selector for the rds "on" or "off" the coloured field indicates the successful decoding of the rds signal, "green" indicates that the software thinks to be able to decode the signal, "red" that is doesn't.

  5. The 4 buttons on that row to the right are
    1. stereo or mono selection,
    2. selection for channel out: mono, stereo, left, right,
    3. de-emphasis selection,
    4. lowpass filter selection.
  6. Further selectors are the "squelch" and the selectors f-, etc. With the latter one may step through the frequencies (steps are 100 kHz) either manual (the buttons f- and f+), or automatic, the buttons fc+ and fc1.

  7. Finally, with the button "FS", one may save the current frequency setting and bind a name to it.

The sources are to be found on

The precompiled Windows executables are - together with the DAB software - to be found as a zipped folder.

When compiling under Linux, first, the device or devices for which it is meant is to be selected in the configuration file (either qmake or cmake, the zipped Windows folder contains 4 precompiled versions, one for each of the mentioned devices and one for use with Extio-XXX dll's).

When compiling one needs, next to the C++ compiler and Qt (either 4 or 5)

  1. the library (and development files) for the selected device (see the section on DAB and the libusb1 library,

  2. the portaudio library (and development files) (see the section on DAB),

  3. the libsndfile and libsamplerate libraries and the accompanying development files,

  4. the fftw3 library and development files.

Also new is that - as with the DAB-rpi - the WFM-rpi software - when configured to do so - sends its output to port 20040 - for remote listening (again, my device is not in the same room where I normally stay). The same "listener", as for the Qt-DAB program, i.e. soundClient program can be used for listening.

The more general sdr-j-fm software is also still available. As can be seen from the picture the GUI contains more elements, such as a spectrum.

Fm Reception-3

This version supports - under Linux - the sw-elad-s1, to be used with a downconverter. Note that the program is - especially when running Windows - quite resource hungry.

SW software.

The SW software aims to be the SDR equivalent of a classical SW radio. It originated as a small package for shortwave listening with the Elektor SDR card from 2007 and it evolved into the current program. The program supports a number of input devices and nearly a dozen decoders. I use it to listen to amateur bands, to psk, rtty and usb and lsb transmissions and - occasionally - to listen to RRI, sometimes to radio Nigeria and - depending on the conditions - to the DRM transmission of Bangalore. i.e. the few remaining DRM transmissions.

The SDRplay and DABstick are directly spported devices, both in the Linux and the Windows version. The SDRplay supports frequency selection from app 10 kHz and up and is used to listen to short wave. For DABsticks, there are libraries with which a decent reception from 12mHz up is possible.
Under Linux, there is also direct support for the Elad-s1 (I don't own one, but a friend does). Furthermore, under Linux support for the Elektor card and the pmSDR can be compiled in (both devices need a cardreader for data input), or just a cardreader without device can be used.
Finally, there is support for receiving the raw antenna data using the WiFi, a simple server is part of the software, supporting the SDRplay, and sending the (decimated) data to an IP port. The receiver site is equipped with a scall client program as one of the "device-handlers".

In the precompiled Windows version, direct support for the Elektor card and for the pmSDR disappeared since using the ExtIO-XXX dll for these devices is an excellent alternative. Handling of devices for which a Winrad compatible dll exist is now extended with support for fast devices, i.e. devices such as DABsticks and SDRplay that deliver their data through the usb. I tested it with the ExtIO-XXX dll's for the SDRplay and DABsticks.

Since the decoders in the software are all "small-band" (for CW and PSK I normally set the width of the decoder screen to 6kHz, and select the preconfigured USB bandwidth of 2.5 kHz, while for DRM a bandwidth of 12kHz is really needed), the sample rate of the data from the fast devices such as the SDRplay, is reduced to 96000 or 48000 (it can be set to different values in the configuration file though, but 96000 samples/second leads to a spectrum-width of 96000 Hz which functions well on a common laptop screen).

My personal use is listening to SW using the aforementioned simple "server", running on the Raspberry PI 2 in the neighbourhood of a loop antenna with a simple amplifier on the attick, that provides the (decimated) sample-stream from the SDRplay to the home WiFi, allowing me to listen to shortwave radio from within the "lazy chair". The sources for the software, implementing a simple server for the SDRplay are part of the SW sources. The sources for the client are also part of the software tree.

SW Reception Setting paths

The screen depicted in first picture shows this "normal" way of working. The window of the SW program in the middle, with at the right the widget for the selected device, which is "remote SDRplay" and the widget of the SDRplay server - which runs through an SSH connection on my Raspberry.

The various pieces of software for interfacing to a device as well as the various decoder are implemented as plugins. Adding or deleting a device or a decoder is simple, just add the plugin code to the appropriate directory, and does not require recompilation of the main program.

On start up, the main program will look into an ".ini" file for the path-names that specify where to find these plugins. If no ".ini" file exists as yet, defaults "input-plugins" and "decoder-plugins" are chosen. To set up the paths for the decoder plugins and the input plugins in an ".ini" file, a small configuration utility ("configure") is included. The second picture above shows the widget for this configurator. It merely asks for the paths names and creates (or updates) an ".ini" file in the home directory of the user.

A variety of decoders is implemented
  1. A decoder for the common analog modes, i.e. AM, USB, LSB and FM,
  2. An rtty decoder,
  3. A psk decoder,
  4. A CW decoder,
  5. A weather-fax decoder,
  6. An AMTOR (Navtex) decoder,
  7. An MFSK decoder,
  8. A DRM decoder (experimental) for DRM broadcast transmissions,
  9. A Hell decoder,
  10. and some others that are under development.

On the 7 and 14 mHz band there are plenty of CW and psk calls. The 3855 Khz frequency is often used by me to receive weatherfaxes. There are not a lot of DRM transmissions, here, we normally receive the Radio Rumenia International, the DRM program of the Indian radio and radio Nigeria.

For use under Windows, a pre-compiled version of the sw-receiver software is here available in the same zipped folder as for the other programs. That folder contains plugins for input and decoders in subdirectories input-plugins resp. decoder-plugins and it contains many of the required DLL's. Using the SDRplay as input device does require installing the software from the producer of the device.

For use under Linux, one might want to download the sources from "https://github.com/JvanKatwijk/sdr-j-sw". The source tree contains subdirectories for the configurator, for the sw software proper and for the "server". The tree for the SW software itself contains subdirectories for the plugins, implementing the decoders and plugins implementing the support for input devices.

For compiling the main program one needs - obviously - the C++ compiler, the Qt libraries and development files and the QWT library and development files. Furthermore, the fftw3 library, the portaudio library, the libsndfile and libsamplerate libraries are also required.

For compiling the plugins (to be found in the subdirectory "plugins/input" and "plugins/decoders") one might need more libraries, depending on the plugin. E.g. for the rtlsdr as device one needs the rtlsdr library and libusb. Have a look at the configuration file. In the subdirectories for the input and for the decoder there is a small script to generate the plugins

Note that for the drm decoder plugin, one needs an adapted version of the "faad" library, a version compiled for DRM. The internet is full of examples on how to do that (./configure --with-DRM). Note further that, depending on the selected estimator, one might need additionally the "armadillo" library is needed (for some complex matrix operations), the default setting is such that armadillo is not needed.

The Windows version of the plugin for DRM has the correct library compiled in.


The spectrumviewer software is a simple program, it just shows the spectrum, up to a selected bandwidth, determined by the selected samplerate. The spectrumviewer software can be configured with the DABstick, the SDRplay, the AIRspy, the sw-elad-s1 and a soundcard.

Spectrum viewer

Operation of the spectrumviewer software is straightforward. The selector, marked "airspy" on the picture is used to select a device. A frequency can be selected by entering the number in the keypad, terminating it with either mHz (for interpreting the number as the frequency in mHz) or kHz (for interpreting the number as the frequency in kHz).
The selector "viewmode" makes selection between spectrum or waterfall mode possible, touching the button "freeze" will - as the name suggests freeze - the spectrum shown.
The "set scan" selector starts (or stops) scanning though the frequencies The 4 selectors to the right of the "set scan" button determine the frequency range, the stepsize and the rate at which the frequency change will occur.

The precompiled Windows executable is to be found in the zipped folder here together with the DAB and WFM software. The configuration of the pre-compiled version contains, next to the DABstick, the AIRspy, the SDRPlay and the soundcard, a handler for devices supported by an Extio-XXX dll.
The sources, for compilation under Linux, are in "https://github.com/JvanKatwijk/sdr-j-spectrumviewer".
For compilation, one needs, next to the C++ compiler and the Qt and Qwt libraries,

  1. the fftw3 library and its development files,
  2. the libraries for the devices included in the configuration,


Since the interest is more in programming than in writing manuals (that no one ever reads), the manuals are not up-to-date. There is a manual for the dab receiver, for the wfm software, and one for the sw-receiver (note that the latter manual still refers to the previous version where the control box for the selected device is on the GUI and where there is no mention of the DRM decoder). However, in the version distributed now, the GUI's are extended with tooltips, telling the function of the various elements of the GUI.

An informal description of the synchronization in the DRM decode is given in this description the document continues to be a draft, but contains quite some information on issues with decoding the DRM signal.

A description - also informal - of the processing of DAB, as implemented in the Ada version is given here. This (draft) report describes in some detail - including a number of code fragments - how the Ada version of the DAB software is built up. The description presumes some basic knowledge on Ada and on the structure of DAB.

DAB software in Ada

As an exercise in programming, basically to renew my knowledge of the language after a period of 20 years, a - slightly limited - version of the DAB-rpi program was rewritten in Ada. For implementing the - simplified - GUI the Ada binding to gtk, gtkAda, is used.
The resulting program runs pretty well on my laptop and it was a nice and interesting exercise to create it.
I did not manage (yet) to compile the Ada sources on the Raspberry PI 2 and did not attempt to generate a Windows executable.
The current version has support for the input device "compiled in", i.e. the device is determined by the configuration settings (see the file "main.adb" for instructions how to select a configuration for one of the other supported devices). The Mode and Band can be selected though in the command line (defaults are Mode 1 and Band III).
The audio output is sent to a "default" device, no selection for other output devices is possible (yet). Contrary to the very first version, the current version heavily depends on the use of generics.

The sources were compiled using the gnat compiler and gtkAda3. The Ada sources bind to C libraries for fftw, libsndfile, libfaad, portaudio and - obviously - to the libraries for the device.

Receiving DAB

The sources are available at "https://github.com/JvanKatwijk/ada-dab".

To make life easy, a compressed 8G image of a Debian Jessie distro for the Raspberry PI 2 with both the DAB-rpi and WFM-rpi software installed (sources, required libraries and executables) is available on request. Apart from the additions needed to compile and run the DAB-rpi and WFM programs, the distribution is clean.
Note, however, that this image will only run on an Raspberry PI 2, not on an Raspberry PI 3. Note further that different distributions for the Raspberry PI 2 sometimes support pretty old compilers. The g++ compiler in the Jessie distribution is a 4.XXX, while on the other hand the g++ compiler in the arch distribution (that is what I am normally using) on the Raspberry PI 2 is from the 6.XXX range.
The difference in performance is noticeable: while the average load on the 4 cores on the Raspberry PI 2 running the Arch distro is between 50 and 60 percent, the load on the cores on the same box running the Jessie distro is up to 85 to 90 percent.


All software is being developed as a hobby project and is available under a GPL. It is - obviously - nice if this software is useful, but as the license states:
SDR-J is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

I am grateful to SDRplay ltd for providing me the possibility to use the SDRplay and to Benjamin Vernoux for providing me the possibility to use the AIRSPY, both wonderful devices.
Suggestions and contributions (material and immaterial) are welcome.
Have Fun!!!

Pijnacker, Februari 2017
Jan van Katwijk
Lazy Chair Computing