July 14, 2018 · Don't Forget sdr ham radio mac

Decoding POCSAG pagers using GQRX and RTL-SDR dongle

Radio components such as modulators, demodulators and tuners are traditionally implemented in hardware components. The advent of modern computing and analogue to digital converters allows most of these traditionally hardware based components to be implemented into software instead. Hence, the term software defined radio (SDR). This enables easy signal processing and thus cheap wide band scanner radios to be produced. However, it wasn't until the success of mass produced, DVB-T TV tuner dongles (that were based on the RTL2832U chipset), that SDR's became cheap enough for the everyday layman. The breakthrough happened when some amazing coders found that the raw I/Q data on the RTL2832U chipset could be accessed directly, which allowed the DVB-T TV tuner to be converted into a wideband software defined radio (SDR).

Well, it so happens that yours truly has an SDR. The RTL-SDR is a very cheap (sub-$30) USB dongle that can be used as a computer based radio scanner for receiving live radio signals. Mine, for example, can receive frequencies from 500 kHz up to 1.75 GHz. And coupled with Gqrx - an open source software defined radio receiver (SDR) - I can easily capture what is being transmitted via electromagnetic waves all around me.

On a certain night, one particular spike in the radio signal (around 152.6MHz) caught my attention:

pocsag_dsr

After some quick searching, I discovered that this is the frequency used to transmit data to pagers. Specifically, it is the POCSAG asynchronous protocol.

Installing the necessary software on OSX was straightforward:

> brew install gqrx
> brew install sox
> brew tap dholm/homebrew-sdr
> brew install --HEAD dholm/sdr/multimon-ng

Once running GQRX, and enabling the UDP server, this is what I used to capture and decode the signal (adapted from here):

nc -l -u localhost 7355 |     sox -t raw -esigned-integer -b 16 -r 48000 - -esigned-integer -b 16 -r 22050 -t raw - |     multimon-ng -t raw -a POCSAG512 -a POCSAG1200 -a POCSAG2400  -f alpha -

I felt like I was living a real-life episode of Grey's Anatomy.

pocsag_output-1