multimonNG

Due to my recent acquisition of an RTL-SDR compatible radio module (Some would call it DVB-T stick) I started playing with radio transmissions. Doing so I found POCSAG (pager) transmissions which I tried to decode using multimon. Sadly multimon was very broken, after I finally managed to compile it on OS X I realized it had 64bit bugs preventing the decoding on my system. So I forked it and patched a lot. I rewrote large parts of the POCSAG decoder after reading the patent text as well as implemented the BCH forward error correction. Besides improving POCSAG my main focus was portability, it now even compiles on Windows :)

MultimonNG a fork of multimon. It decodes the following digital transmission modes:
POCSAG512 POCSAG1200 POCSAG2400 EAS UFSK1200 CLIPFSK AFSK1200 AFSK2400 AFSK2400_2 AFSK2400_3 HAPN4800 FSK9600 DTMF ZVEI

The following changes have been made so far:
-Fixes for x64
-Basic functionality on Mac OS X ‘Lion’ (Soundcard/OSS input is unsupported)
-‘DUMMY_AUDIO’ “backend” (Gets rid of the OSS dependency, breaks audio in doing so)
-‘ONLY_RAW’ disables the format conversion while getting rid of posix dependencies
-Option ‘NO_X11′ to disable the X11 dependency since Apple will drop Xorg soon
-Override mode for POCSAG decoding (e.g. force text decoding)
-Brute-Force BCH implementation for POCSAG forward error correction
-Verbose mode is now listed in ‘-h’
-Merged Debian patches for EAS (Emergency Alert System) decoding (untested)
-Portability is a major goal
-Compiles on Windows (MinGW or Cygwin) without format conversion
-PulseAudio support, contributed by inf_l00p_
-Windows native audio and a VisualStudio/MSVC project file, contributed by bzzt_ploink

In addition to the deprecated legacy Makefile there is also a file for qmake which is the preferred way of building MultimonNG. It’s recommended to use qmake to generate the Makefile. (‘qmake multimonNG.pro && make’)
So far multimonNG has been successfully built on OS X, Debian, Ubuntu and Windows. (On Windows using the Qt-MinGW build environment, as well as Cygwin and VisualStudio/MSVC)

Files can be easily converted into multimonNGs native raw format using ‘sox’.
e.g. “sox -t wav infile.wav -esigned-integer -b16 -r 22050 -t raw outfile.raw remix 1″
GNURadio can also generate the format using the file sink in input mode ‘short’.

Source: https://github.com/EliasOenal/multimonNG/
License: GPLv2

Windows version (Update 02/02/13 – Properly convert umlauts.): multimonNG_win32
(It doesn’t come with SoX and as a result can’t handle filetype conversions. Soundcard input and virtual audio cables should work fine, though.)

Some testfile converted to the native multimon format: poc1200
(Source: http://www.kb9ukd.com/digital/)
To decode it try “multimonNG.exe -a POCSAG1200 -t raw poc1200.raw”.
(“-i” is needed for recent versions of multimon-ng)

PS:
Superkuh wrote a bit about using multimonNG with GNURadio allowing for realtime decoding. http://superkuh.com/rtlsdr.html

PPS:
Apparently you can combine multimonNG with rtl_fm to live decode POCSAG. It even seems to be lightweight enough to work on a Raspberry Pi. Thanks to Sonny_Jim from ##rtlsdr on freenode for trying!

<Sonny_Jim> Ok, so this works:
<Sonny_Jim> rtl_fm -f 153.353e6 -g 100 -s 22050 -l 310 – |multimon -t raw -a POCSAG1200 -f alpha /dev/stdin

37 Comments

  1. Hey, just to let you know I found this software very useful, thanks! I’ve managed to get it working along with a DVB-T dongle and rtl_fm to let me receive and decode POCSAG in realtime on my Raspberry Pi!

  2. I have not been able to get multimonNG running on my Mac (OS X 10.7). The
    application is built but it doesn’t execute.

    I installed qmake on my Mac this way:
    sudo port install qt4-mac

    I then used qmake generate the app:
    qmake multimonNG.pro && make

    A multimonNG.app file was created but it does not run when I click on it.
    There is not error message.

    Any advise you can provide would be greatly appreciated.

    Thanks for all the work you have done on Multimon.

  3. It is possible to add a TCP server for APRS rx?
    MultimonNG work well in APRS reception but write packets on stdout.
    Adding an optional TCP server for sending packets in TNC2 format can be possible to feed received packet to a APRS program as Xastir

    Regards

  4. Hi and thanks for the great job with multimonNG and Gqrx.

    I got some problem when using multimonNG, maybe you know what to do:

    When piping the rtl_fm output to multimonNG it doesn’t decode anything. First I thougt, the signal was to weak, but I tested it this way:
    – record with Gqrx
    – mix down to mono
    – normalize the sound
    -> multimonNG is able to decode it.

    So maybe is rtl_fm the problem – beware – crazy testing:
    – I “pipe” the sound via iMacs LineOut to a Windows Notebook with FMS32 installed
    -> FMS32 can decode the sound.

    Any idea, why multimon wouldn’t eat the plain output of rtl_fm?

    • Could you paste the actual command you were using? The version of multimonNG I have packaged doesn’t support standard input via pipe. Instead you can have it read from “/dev/stdin”. The latest version does support getting piped into and I will include it with the next bundle.

    • Have you considered that the normalization may have brought the signal levels up to the point that they could be decoded?

      You might try excluding the normalization step and see if the file can still be decoded. If it can’t be decoded then it means that the audio level needs to be increased. Although I have no idea how that’s done on your system. But at least you’d know where the problem is.

      Good luck. :-)

  5. I use this one:

    rtl_fm -N -l 6 -E -f 173240000 -s 22050 -o 4 -g 100 – | tee >(./multimon -a POCSAG1200 -f alpha -t raw /dev/stdin) >(play -t raw -r 22050 -e signed-integer -b 16 -c1 -V1 -q -) > /dev/null

    to here what’s being received.

    It’s a self compiled version from github run under ubuntu.

    • Well if you don’t want to touch the Terminal.app you can download Qt Creator, load the project and hit “Build Project”. The CLI way of doing it is ‘mkdir build && cd build && qmake ../multimon-ng.pro && make && sudo make install’ after installing a compiler (clang/GCC) as well as qmake.

  6. Hello,
    thanks for this great article!
    I’ve installed the rtl_fm and multimon packages on my rpi and have Cinergy DVB-T Stick.
    Then I’ve set the frequency. But multimon says everytime:

    pi@raspberrypi ~ $ rtl_fm -N -o 4 -A lut -s 22050 -C -f 172.680M – | multimon-ng -t raw -a POCSAG512 -a POCSAG1200 -a POCSAG2400 -f alpha /dev/stdin
    POCSAG512 POCSAG1200 POCSAG2400 EAS UFSK1200 CLIPFSK AFSK1200 AFSK2400 AFSK2400_2 AFSK2400_3 HAPN4800 FSK9600 DTMF ZVEI1 ZVEI2 ZVEI3 DZVEI PZVEI EEA EIA CCIR MORSE_CW DUMPCSV SCOPE
    multimon-ng (C) 1996/1997 by Tom Sailer HB9JNX/AE4WA
    (C) 2012/2013 by Elias Oenal
    available demodulators: POCSAG512 POCSAG1200 POCSAG2400 EAS UFSK1200 CLIPFSK AFSK1200 AFSK2400 AFSK2400_2 AFSK2400_3 HAPN4800 FSK9600 DTMF ZVEI1 ZVEI2 ZVEI3 DZVEI PZVEI EEA EIA CCIR MORSE_CW DUMPCSV SCOPE
    Enabled demodulators: POCSAG512 POCSAG1200 POCSAG2400
    Found 1 device(s):
    0: Realtek, RTL2838UHIDIR, SN: 00000001

    Using device 0: Terratec Cinergy T Stick RC (Rev.3)
    Found Elonics E4000 tuner
    Oversampling input by: 12x.
    Oversampling output by: 4x.
    Buffer size: 7.74ms
    Tuned to 172944600 Hz.
    Sampling at 1058400 Hz.
    Output at 22050 Hz.
    Exact sample rate is: 1058400.010094 Hz
    Tuner gain set to automatic.
    POCSAG1200: Address: 123456 Function: 2
    POCSAG1200: Address: CORRUPT Function: CORRUPT
    ———————————————————————————-
    What’s wrong? Corrupt isn’t good. I can’t read the messages. Sometimes i can read one part of a word, but then it says CORRUPT…
    Is it normaly that my set frequency (172.680 MHz) Tuned to 172944600 Hz??
    Should i change the configuration?

    Thanks for your help :).
    Felix

    • The frequency is fine, rtl_fm does that in order to avoid the DC-offset. Normally I’d guess it’d be a case of bad reception, though given that you’re using it on a raspberry pi, I’d suggest verifying the problem on an x86 system. I’ve heard about problems with recent versions of rtl_fm on the raspberry pi.

  7. Pingback: The BIG List of RTL-SDR Supported Software - rtl-sdr.com

  8. Pingback: Linux : decode APRS packet from RTL SDR | Y.Man's Blog

  9. Hello.

    Something i want to share (as it tried severl days to figure out the problem):
    since begin of this year something has changed in the rtl_fm code so that i had to adjust the call of multimon-ng on a Pi after doing a new build:
    rtl_fm -f XXX.XXXM -s 22050 -M fm -F 0 -E dc -p 37 2>/dev/null | multimon-ng -q -t raw -a POCSAG1200 -a POCSAG512 /dev/stdin 2>/dev/null >>/tmp/pocsag &
    New is -F 0 and -E dc. Before it has worked without. Now it is needed to get the same good decoding quality. CPU consumtion from rtl_fm is from 15 to 30%. mutlimon is 15%.

    Martin

  10. Using your sample poc1200.raw im getting:

    » ./multimon-ng -v10 -a POCSAG1200 -t raw poc1200.raw
    multimon-ng (C) 1996/1997 by Tom Sailer HB9JNX/AE4WA
    (C) 2012-2014 by Elias Oenal
    available demodulators: POCSAG512 POCSAG1200 POCSAG2400 EAS UFSK1200 CLIPFSK AFSK1200 AFSK2400 AFSK2400_2 AFSK2400_3 HAPN4800 FSK9600 DTMF ZVEI1 ZVEI2 ZVEI3 DZVEI PZVEI EEA EIA CCIR MORSE_CW DUMPCSV
    Enabled demodulators: POCSAG1200

    ===POCSAG1200 stats===
    Words BCH checked: 2238
    Corrected errors: 686
    Corrected 1bit errors: 117
    Corrected 2bit errors: 569
    Invalid word or >2 bits errors: 1552

    Total bits processed: 2315
    Bits processed while in sync: 0
    Bits processed while out of sync: 2315
    Successfully decoded: 0.000000%

    on OS X

    But on Windows I get:

    multimonNG (C) 1996/1997 by Tom Sailer HB9JNX/AE4WA
    (C) 2012 by Elias Oenal
    available demodulators: POCSAG512 POCSAG1200 POCSAG2400 EAS UFSK1200 CLIPFSK AFS K1200 AFSK2400 AFSK2400_2 AFSK2400_3 HAPN4800 FSK9600 DTMF ZVEI
    Enabled demodulators: POCSAG1200
    POCSAG1200+: Address: 501796 Function: 0
    POCSAG1200+: Numeric: 1234567890

    Im I doing something wrong? compiled using commit 611970773fa294eb86dbce9c2a751cc5a84456e0

    • The signal in that file is inverted, adding ‘-i’ fixes the problem. multimon-ng used to always decode the inverted, as well as the non-inverted input. I’ve changed the behaviour since it impacted the performance, while also confusing some people with low “Successfully decoded” percentages.

  11. Great update to the original.. after some struggles with the dongle, crappy signals.. I’ve gotten that resolved … but am having a problem..

    How do you eliminate the “Numeric” decode line? I AM USING -f alpha but still there…. I need to eliminate that

    Using:
    rtl_fm -l 32 -g 42.0 -F 0 -E dc -p -111 -M fm -f (mychannel_freq)M -s 22050 |multimon-ng -a POCSAG1200 -a POCSAG512 -a POCSAG2400 -a SCOPE -f alpha -t raw /dev/stdin > MyPagingLog.log

    Still get this:
    POCSAG1200-: Address: xx Function: 0
    POCSAG1200-: Numeric: 4 4]41.14.]019.399-280391U04246]3[9440145.5 9]4U.2-22828247]35.- 023394- 2U0423.5-04- 423U835.]3-9540115. 2012-9346184 4[UUU1435.]3-9541.4[9[ 56114449282 ]62386.4-7.3U87-023990.0.5U8 20513835.2U046U89 4624618.-1683 3 7]23U0U85 26950.6699 9]1789-028. [-1-0284]5]1[UU–]2UU9 370193-378789]364382 4701-1-9]9388]9]679950…U3-47-539803U5 04-20915][]63868448]-040U -U064U79 0613.182653-5-]6.U81-80000

    The line below this is an alpha decode of the above(?) which is the correct data…

    I want to elimnate that NUMERIC LINE, is that now what the -f alpha does????

    Also any chance of getting Flex added???? Really would love a NON bloated way to do flex.. I don’t need GnuRadio, and GUI, etc.. just text…

    Oh, and any chance of OFFICIAL implementation of the SQLite patch elsewhere or adding other SQL support, OFFICIALLY?

    THANKS!

Leave a Reply

Your email address will not be published.

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>