Monday, March 4, 2013

Putting rtl_fm and Multimon-NG together

Unix pipes are awesome.

To decode POCSAG on the Pi, this is all you need:


pi@raspberrypi ~ $ rtl_fm -N -o 4 -l 10 -A fast -r22050 -s88200 -C -D -f 148.7125M - |multimon-ng -t raw -a POCSAG512 -f alpha /dev/stdin
Found 1 device(s):
  0:  Realtek, RTL2838UHIDIR, SN: 

Using device 0: ezcap USB 2.0 DVB-T/DAB/FM dongle
multimonNG  (C) 1996/1997 by Tom Sailer HB9JNX/AE4WA
            (C) 2012 by Elias Oenal
available demodulators: POCSAG512 POCSAG1200 POCSAG2400 EAS UFSK1200 CLIPFSK AFSK1200 AFSK2400 AFSK2400_2 AFSK2400_3 HAPN4800 FSK9600 DTMF ZVEI SCOPE
Enabled demodulators: POCSAG512
Found Elonics E4000 tuner
Oversampling input by: 3x.
Oversampling output by: 4x.
Buffer size: 7.74ms
Tuned to 148977100 Hz.
Sampling at 1058400 Hz.
Output at 22050 Hz.
Exact sample rate is: 1058400.010094 Hz
Tuner gain set to automatic.
POCSAG512-: Address:   12935  Function: 2
POCSAG512-: Numeric: 4-23U7]47978140-0[93-]]338.50.2.U7 [62795]0.659560U9- 660.6182836.7.-]560180482-]43683818 .569696926]281-04-201.6 920-01U1405 2647438.9169[81-0.85]277U410000
POCSAG512-: Blah blah blah - content redacted by me<NUL><NUL>
POCSAG512-: Address: 1720997  Function: 0
POCSAG512-: Numeric: U-U1  5 .4.3161395]..0. 2 270.9]3U.45428].5 925143 024U802960-97 228]U352280733.9-46 20-538  562-9740155.1 1]2950.9255.[ 5619502U1869-40915.[ 62868[ 1]-05.5 2]2950.924U85 059]358  2637. 2014U84-2.49502U1 2U5]0U 14-46100
POCSAG512-: Alpha: THIS IS A TEXT MESSAGE, IT WAS ANOTHER TEXT MESSAGE, BUT NOW IT INCRIMINATES NO PERSON<NUL>

And it's going. You can now construct a veritable daisy chain of processes to do all sorts of things with the output.

3 comments:

  1. Thank's for these simple way.

    I got one question: Are you able to receive signals with the antenna of your DVB/DAB dongle? I only got noise - and a lot of that :-)

    ReplyDelete
  2. I built another antenna. The antenna I used was designed for the 2m amateur band, which is 144-148MHz, very close to 148.7125MHz. It seemed to me that the Raspberry Pi and the dongle itself were fairly strong noise sources.

    The antenna I used is described in the October 2007 edition of NERG News here: http://www.vk3vt.net/NERG/NERGnews.htm

    ReplyDelete
  3. Hi, is 148.7125M the frequency that the transmissions are on or did you have to offset it a little bit? I'm currently having problems with my receiver only giving me 'CORRUPT' messages...

    ReplyDelete