mirror of
https://github.com/BOSWatch/BW3-Core.git
synced 2025-12-06 07:12:04 +01:00
add rtl_fm
This commit is contained in:
parent
87457392ea
commit
48b1dd56f2
|
|
@ -17,19 +17,27 @@ logging.config.fileConfig("config/logger_client.ini")
|
||||||
|
|
||||||
# ./multimon-ng -i -a POCSAG1200 -t raw /home/schrolli/Downloads/poc1200.raw
|
# ./multimon-ng -i -a POCSAG1200 -t raw /home/schrolli/Downloads/poc1200.raw
|
||||||
|
|
||||||
proc = ProcessManager("/opt/multimon/multimon-ng", textMode=True)
|
sdrProc = ProcessManager("/usr/bin/rtl_fm")
|
||||||
proc.addArgument("-i")
|
sdrProc.addArgument("-f 85M")
|
||||||
proc.addArgument("-a POCSAG1200")
|
sdrProc.addArgument("-m fm")
|
||||||
proc.addArgument("-t raw")
|
sdrProc.start(True)
|
||||||
proc.addArgument("./poc1200.raw")
|
|
||||||
proc.start()
|
|
||||||
|
|
||||||
proc.skipLines(5)
|
mmProc = ProcessManager("/opt/multimon/multimon-ng", textMode=True)
|
||||||
while proc.isRunning:
|
#mmProc.addArgument("-i")
|
||||||
line = proc.readline()
|
# mmProc.addArgument("-a POCSAG1200 -a FMSFSK -a ZVEI1")
|
||||||
if line is not "":
|
mmProc.addArgument("-f aplha")
|
||||||
Decoder.decode(line)
|
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)
|
||||||
|
|
||||||
|
|
||||||
proc.stop()
|
|
||||||
|
|
||||||
|
|
|
||||||
20
bw_client.py
20
bw_client.py
|
|
@ -83,12 +83,19 @@ try:
|
||||||
|
|
||||||
# ========== INPUT CODE ==========
|
# ========== INPUT CODE ==========
|
||||||
def handleSDRInput(dataQueue, config):
|
def handleSDRInput(dataQueue, config):
|
||||||
|
sdrProc = ProcessManager("/usr/bin/rtl_fm")
|
||||||
|
sdrProc.addArgument("-f 85M")
|
||||||
|
sdrProc.addArgument("-m fm")
|
||||||
|
sdrProc.start(True)
|
||||||
|
|
||||||
mmProc = ProcessManager("/opt/multimon/multimon-ng", textMode=True)
|
mmProc = ProcessManager("/opt/multimon/multimon-ng", textMode=True)
|
||||||
mmProc.addArgument("-i")
|
#mmProc.addArgument("-i")
|
||||||
mmProc.addArgument("-a POCSAG1200")
|
#mmProc.addArgument("-a POCSAG1200 -a FMSFSK -a ZVEI1")
|
||||||
mmProc.addArgument("-t raw")
|
mmProc.addArgument("-f aplha")
|
||||||
mmProc.addArgument("./poc1200.raw")
|
mmProc.addArgument("-t raw /dev/stdin -")
|
||||||
mmProc.start()
|
mmProc.setStdin(sdrProc.stdout)
|
||||||
|
#mmProc.addArgument("./poc1200.raw")
|
||||||
|
mmProc.start(True)
|
||||||
mmProc.skipLines(5)
|
mmProc.skipLines(5)
|
||||||
while 1:
|
while 1:
|
||||||
if not mmProc.isRunning:
|
if not mmProc.isRunning:
|
||||||
|
|
@ -99,9 +106,10 @@ try:
|
||||||
if line:
|
if line:
|
||||||
dataQueue.put_nowait((line, time.time()))
|
dataQueue.put_nowait((line, time.time()))
|
||||||
logging.debug("Add data to queue")
|
logging.debug("Add data to queue")
|
||||||
|
print(line)
|
||||||
# ========== INPUT CODE ==========
|
# ========== INPUT CODE ==========
|
||||||
|
|
||||||
mmThread = threading.Thread(target=handleSDRInput, name="mmReader", args=(inputQueue, bwConfig.get("inputSource")))
|
mmThread = threading.Thread(target=handleSDRInput, name="mmReader", args=(inputQueue, bwConfig.get("inputSource", "sdr")))
|
||||||
mmThread.daemon = True
|
mmThread.daemon = True
|
||||||
mmThread.start()
|
mmThread.start()
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue