NederlandsKlik deze knop voor de Nederlandstalige website

Decoding P2000 using Raspberry Pi 2 and RTL-SDR

P2000 is the Dutch paging network for emergency services like police, ambulance and fire brigade. There are many websites on which you can view the pager messages in real time. It’s not hard to receive and decode them yourself. This is how I built a simple receiver and decoder using a Raspberry Pi 2 with a RTL-SDR. The latter being just a cheap DVB-T USB-receiver based on the R820T-chipset.

P2000 as used in The Netherlands
Frequency: 169,650 MHz
Speed: 1600 bit/s (2FSK)
Protocol: Motorola FLEX

Update July 10th 2017:
The problem with the [UNK] messages (group messages) has been solved by using the code from this repository: https://github.com/zanoroy/multimon-ng/. The article below has been updated.


I’m installing this from my desktop-PC running Linux Mint onto a ‘headless’ Raspberry Pi. The Raspberry Pi doesn’t have a screen, neither a keyboard or mouse. The Raspberry is only attached to a network cable, the DVB-T-receiver and the power supply.

Raspberry Pi 2 and DVB-T RTL-SDR (R820T)
Raspberry Pi 2 and DVB-T RTL-SDR (R820T)

Tested with:
Raspberry Pi 2
2016-05-27-raspbian-jessie-lite
R820T DVB-T USB

Receiving P2000 paging signals: Raspberry Pi

First, you need to download Raspbian and write the image to the SD card. For this project, I chose Raspbian Jessie Lite. Put the image in the SD card (I used one of 16GB but a smaller card is OK too) and insert the card into the Raspberry. Do not insert the DVB-T receiver yet. Power on the Raspberry Pi and follow the usual installation procedure which I’ll walk you through below.

After booting up the Raspberry Pi got the ip adress ‘192.168.20.46’, handed out by the router. Using my desktop PC I logged in on the Pi over SSL using the standard username (‘pi’) and password (‘raspberry’):
ssh [email protected]
Start raspi-config:
sudo raspi-config

Decoding P2000: raspi-config
raspi-config

Choose option “1: expand filesystem”.  Then reboot, and log back in. And then, as usual, you should update the package lists:
sudo apt-get update
Download some required packages (this can take a few minutes):
sudo apt-get -y install git cmake build-essential libusb-1.0 qt4-qmake libpulse-dev libx11-dev qt4-default
After this, we install support for the RTL-SDR.

Receiving P2000 paging signals: RTL-SDR

Execute the following commands to download and install the packages needed for the USB receiver:
mkdir -p ~/src/
cd ~/src/
git clone git://git.osmocom.org/rtl-sdr.git
cd rtl-sdr
mkdir build
cd build
cmake ../ -DINSTALL_UDEV_RULES=ON
make
sudo make install
sudo ldconfig

Now you can insert the USB receiver and test the installation like this:
rtl_test
Probably rtl_test will abort showing this error:
usb_claim_interface error -6
Failed to open rtlsdr device #0

If it does show this error, we need to ‘blacklist’ the conflicting (default) Raspbian drivers.

To do this you need to modify the file /etc/modprobe.d/raspi-blacklist.conf (this is probably an empty file):
sudo nano /etc/modprobe.d/raspi-blacklist.conf
Add these 3 rules:
blacklist dvb_usb_rtl28xxu
blacklist rtl2832
blacklist rtl2830

Save the file using CRTL+O (letter O), and exit by pressing CTRL+X.

Then we need to reboot and log back in again:
sudo reboot
Check the installation of the USB receiver again:
rtl_test

rtl_test
rtl_test

If everything well, you can exit rtl_test by pressing CTRL+C. You can now install multimonNG to decode the FLEX datastream.

Decoding P2000 FLEX: multimon-NG

Execute the following commands to download and install ‘multimonNG’ decoder:
cd ~/src/
git clone https://github.com/Zanoroy/multimon-ng.git
cd multimon-ng
mkdir build
cd build
qmake ../multimon-ng.pro
make
sudo make install

Now we can receive and decode the P2000 broadcasts using the command:
rtl_fm -f 169.65M -M fm -s 22050 -p 83 -g 30 | multimon-ng -a FLEX -t raw /dev/stdin

Decoding P2000 FLEX: MultimonNG
MultimonNG

Where:

  • -g is gain, a value between 0-50; do not set for automatic gain
  • -p is the ppm offset for your RTL-SDR.

You can also add the parameter -v 1 (of -v 2/-v 3) for more detailed output.

Receiving and decoding P2000using the RTL_SDR on a Raspberry Pi
Receiving and decoding P2000 using the RTL_SDR on a Raspberry Pi
5 Comments