BW3-Core/_demo_procMan.py

44 lines
1.3 KiB
Python
Raw Normal View History

2019-09-19 10:48:27 +02:00
#!/usr/bin/python
# -*- coding: utf-8 -*-
"""
____ ____ ______ __ __ __ _____
/ __ )/ __ \/ ___/ | / /___ _/ /______/ /_ |__ /
/ __ / / / /\__ \| | /| / / __ `/ __/ ___/ __ \ /_ <
/ /_/ / /_/ /___/ /| |/ |/ / /_/ / /_/ /__/ / / / ___/ /
/_____/\____//____/ |__/|__/\__,_/\__/\___/_/ /_/ /____/
German BOS Information Script
by Bastian Schroll
"""
from boswatch.processManager import ProcessManager
2019-09-20 17:38:53 +02:00
from boswatch.decoder.decoder import Decoder
2019-09-19 10:48:27 +02:00
import logging.config
logging.config.fileConfig("config/logger_client.ini")
2019-09-20 17:38:53 +02:00
# ./multimon-ng -i -a POCSAG1200 -t raw /home/schrolli/Downloads/poc1200.raw
2019-09-19 10:48:27 +02:00
2019-09-21 20:02:23 +02:00
sdrProc = ProcessManager("/usr/bin/rtl_fm")
sdrProc.addArgument("-f 85M")
sdrProc.addArgument("-m fm")
sdrProc.start(True)
2019-09-19 10:48:27 +02:00
2019-09-21 20:02:23 +02:00
mmProc = ProcessManager("/opt/multimon/multimon-ng", textMode=True)
#mmProc.addArgument("-i")
# mmProc.addArgument("-a POCSAG1200 -a FMSFSK -a ZVEI1")
mmProc.addArgument("-f aplha")
mmProc.addArgument("-t raw /dev/stdin -")
mmProc.setStdin(sdrProc.stdout)
# mmProc.addArgument("./poc1200.raw")
mmProc.start(True)
mmProc.skipLines(5)
while 1:
if not mmProc.isRunning:
logging.warning("multimon was down - try to restart")
mmProc.start()
mmProc.skipLines(5)
line = mmProc.readline()
if line:
print(line)
2019-09-20 17:38:53 +02:00