-- Schritt 1:
RTL_SDR kompilieren:
Hier aus dem Forum irgendwo.

Code:
# Install dependencies
sudo apt-get update 
sudo apt-get -y install git cmake build-essential libusb-1.0 qt4-qmake libpulse-dev libx11-dev

# Fetch and compile rtl-sdr source
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
-- Schritt 2:

Multimon-NG:

Code:
sudo su -
apt-get install libpulse-dev libx11-dev qt4-qmake git cmake build-essential
git clone https://github.com/EliasOenal/multimonNG.git 
cd multimonNG/ 
mkdir build
cd build 
qmake ../multimon-ng.pro && make && make install
-- Schritt 3:
Pyton MySQL-Support installieren:
Code:
wget "http://dev.mysql.com/get/Downloads/Connector-Python/mysql-connector-python-1.0.9.tar.gz/from/http://cdn.mysql.com/" -O mysql-connector.tar
tar xfv mysql-connector.tar
cd mysql-connector-python*
chmod +x ./setup.py 
sudo ./setup.py install
-- Schritt 4:
Sktipte anlegen:
Code:
mkdir /home/pi/py-sripte && cd /home/pi/py-sripte
FÜR MYSQL:
nano poc-to-mysql.py
Für das MySQL Script dann folgenden Text einfügen:
Code:
#!/usr/bin/python
# -*- coding: cp1252 -*-
'''
!! This requires a recent build of Multimon-NG as the old builds wont accept a piped input !!
Change the rtl_fm string to suit your needs.. add -a POCSAG512 , 2400 etc if needed to the Multimon-ng string
This just prints and writes to a file, you can put it in a threaded class and pass though a queue
or whatever suits your needs.

Änderungen  für Deutschland und Kommentare von Smith - Funkmeldesystem.de-Forum.
Bitte beachten, bei POC512 ist die Zeichenkette jeweiles um ein Zeichen kürzer!
MySQL-Funktion hinzugefügt. 

Pyton MySQL-Support installieren
wget "http://dev.mysql.com/get/Downloads/Connector-Python/mysql-connector-python-1.0.9.tar.gz/from/http://cdn.mysql.com/" -O mysql-connector.tar && tar xfv mysql-connector.tar && cd mysql-connector-python* && chmod +x ./setup.py && sudo ./setup.py install

'''

import time
import sys
import subprocess
import os
import mysql
import mysql.connector

try:
    connection = mysql.connector.connect(host = "DATENBANKSERVER", user = "DATENBANKUSER", passwd = "DBPASSWORT", db = "DATENBANK")
except:
    print "Keine Verbindung zum Server"
    exit(0)

def curtime():
    return time.strftime("%Y-%m-%d %H:%M:%S")

with open('Fehler.txt','a') as file:
    file.write(('#' * 20) + '\n' + curtime() + '\n')

multimon_ng = subprocess.Popen("sudo rtl_fm -f XXX.XXXM -M fm -s 22050 -p 37 -E dc -F 0 -g 40 | multimon-ng -a POCSAG1200 -f alpha -t raw -",
                               #stdin=rtl_fm.stdout,
                               stdout=subprocess.PIPE,
                               stderr=open('error.txt','a'),
                               shell=True)

try:
    while True:
        line = multimon_ng.stdout.readline()
        multimon_ng.poll()                                                                  # multimon wird gestartet
        if line.__contains__("Alpha:"):                                                     # Die Ausgabe wird nach dem Text "Alpha" durchsucht
            if line.startswith('POCSAG'):
                address = line[21:28].replace(" ", "")		                            # Zeichen 22 bis 28. RIC wird in die Variabel "adress" gelegt.Leerzeichen werden entfernt. Wenn kleiner als 7 Stellen wird der Rest vorne weg mit 0 aufgefüllt (zfill). Feld muss in VARCHAR vorliegen, führendene 0 wird sonst nicht geschrieben!
                subric = line[40:41].replace(" ", "").replace("3", "4").replace("2", "3").replace("1", "2").replace("0", "1") # Sub-RIC auslesen und anpassen (3=4, 2=3, 1=2, 0=1)
                message = line.split('Alpha:   ')[1].strip().rstrip('').strip()        # Die Nachricht wird nach dem Bereich Alpha in die Variabel "message" abgelegt. EOT wird entfernt.
                output=(curtime()+' '+ address+' '+ subric+' '+ message+'\n')               # Es wird ein String in die Variabel "output" gelegt. Hier: Adresse + Zeitstempel + Text
                print curtime(), address, subric, message                                   # Die Meldung wird im Terminal angezeigt
                with open('POCSAG.txt','a') as f:                                           # Der String output wird in die Datei POCSAG.txt geschrieben.
                    f.write(output)
                #Datensatz einfügen per mySQL
                cursor = connection.cursor()
                cursor.execute("INSERT INTO DATENBANKTABELLE (time,ric,funktion,text,einsatz) VALUES (%s,%s,%s,%s,%s)",(curtime(),address,subric,message,'0',))
                cursor.close()
                connection.commit()
        if not "Alpha:" in line:                                                            # Wenn kein Alpha im String der Ausgabe multimon steht, wird die Zeile in die Datei POCSAG_KeinText.txt geschrieben.
            with open("POCSAG_KeinText.txt","a") as missed:
                address = line[21:28].replace(" ", "")		                            # Zeichen 22 bis 28. RIC wird in die Variabel "adress" gelegt.Leerzeichen werden entfernt. Wenn kleiner als 7 Stellen wird der Rest vorne weg mit 0 aufgefüllt (zfill). Feld muss in VARCHAR vorliegen, führendene 0 wird sonst nicht geschrieben!
                subric = line[40:41].replace(" ", "").replace("3", "4").replace("2", "3").replace("1", "2").replace("0", "1") # Sub-RIC auslesen und anpassen (3=4, 2=3, 1=2, 0=1)
                print  curtime(), address, sum                                              # Die Meldung wird im Terminal angezeigt
                missed.write(line)                                                           # Der String output wird in die Datei POCSAG_KeinText.txt geschrieben.
		#Datensatz einfügen per mySQL
                cursor = connection.cursor()
                cursor.execute("INSERT INTO DATENBANKTABELLE (time,ric,funktion,text,einsatz) VALUES (%s,%s,%s,%s,%s)",(curtime(),address,subric,'','0',))
                cursor.close()
                connection.commit()
                
except KeyboardInterrupt:
    os.kill(multimon_ng.pid, 9)
HINWEIS: die fett-Texte oben im Script sind anzupassen.

-- Schritt 5:
Script ausführbar machen:

Code:
sudo chmod +x poc-to-mysql.py
bei Problemen beim starten:
sudo chmod 777 poc-to-mysql.py
-- Schritt 6:
Autotart:
Ich verweise dafür auf:
Code:
http://www.forum-raspberrypi.de/Thread-tutorial-autostart-eines-python-script?pid=24741#pid24741