Qtmm soundcard modem for decoding AFSK1200

Last week I started on a new experiment trying to integrate the AFSK1200 demodulator code from multimon into a simple Qt-based graphical application. This experiment had two objectives:

  1. Test the feasibility of integrating the AFSK1200 demodulator from multimon into other applications.
  2. Try using the QAudio framework from Qt for audio I/O that should work on both Linux, Windows and Mac OS X.

Multimon has some very good and efficient demodulators. Its weakness is the audio interface which has been written for Linux as it was 10 years ago and that’s difficult if at all possible to make work on any recent distribution.

Using QAudio to capture capture sound was quite easy to learn. The Qt-team did a great job at providing a very high level interface for this purpose and the available example code was sufficient to get it up and running. I found it slightly weird though that no matter what format you set the audio input to (byte, integer, float) you always end up with a buffer containing 8-bit data and you have to convert it yourself to whatever format you are using. It would be much easier if it used buffers of the same type that the soundcard is providing.

QAudio also seems to have some strange issues on Mac OS X. The audio input device gets suspended whenever the main window is minimized and also sometimes when the window looses focus. I managed to find a workaround by simply restarting the audio but I am not sure what is going on with this. It does not happen on Linux so it is probably either a bug or a feature of Qt on Mac OS X.

Isolating the AFSK1200 demodulator from multimon and integrating it into the Qt application wasn’t difficult either. I took the AFSK and HDLC codes and put them in a Qt class to make it more interoperable with the rest of the application, e.g. send a signal when a new packet has been decoded. I kept this part of the code isolated n its own subdirectory so that it is easy to see what’s going on and so that the process can be repeated with other demodulators in the future.

I started to work on this Tuesday last week (June 28th) and already Sunday I had a working application that could decode local APRS traffic. Considering that I could only spend a few hours every evening and it was relatively new to me, I think we can safely conclude that the experiment was a success.

The screen shot below shows the decoder running on Mac OS X receiving local APRS traffic. There are also screenshots showing qtmm running on Ubuntu Linux 11.04 64 bit and on Windows 7 32 bit (thanks to Peter 2E0SQL for the latter).

Qtmm soundcard modem receiving APRS traffic

I have also recorded a video of APRS reception.

Watch video on YouTube.

The next video shows telemetry reception from the AO-27 amateur radio satellite, which also uses AFSK.

Watch video on YouTube.

Qtmm has no external dependencies besides the Qt toolkit. It is therefore very easy to build on any platform where Qt is available. On Linux you can simply install Qt 4.7 that comes with your distribution. On debian-based system you also need to install the libqtmultimediakit1 and qtmobility-dev packages to get the QAudio classes. It is a bit weird but it works. On Windows and Mac these are included in the Qt SDK.

Simply load the qtmm.pro file in Qt Creator and press the hammer (build). You can also build it from the terminal by using “qmake qtmm.pro” to generate a Makefile then typing “make”.

I have created a project page on SourceForge mainly for hosting release packages for download. The source code repository is hosted on Github. I may eventually mirror it on SourceForge, though I’m not sure.

Please note that this was only an experiment to test QAudio and the integration of the multimon code into a Qt application before doing it with a larger application. I have no plans for doing any active development on it in the future. I do however hope that it will be useful for others too since there are no other free/open source alternatives that I know of that will work on Linux and Mac.