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
|
||||
|
||||
proc = ProcessManager("/opt/multimon/multimon-ng", textMode=True)
|
||||
proc.addArgument("-i")
|
||||
proc.addArgument("-a POCSAG1200")
|
||||
proc.addArgument("-t raw")
|
||||
proc.addArgument("./poc1200.raw")
|
||||
proc.start()
|
||||
sdrProc = ProcessManager("/usr/bin/rtl_fm")
|
||||
sdrProc.addArgument("-f 85M")
|
||||
sdrProc.addArgument("-m fm")
|
||||
sdrProc.start(True)
|
||||
|
||||
proc.skipLines(5)
|
||||
while proc.isRunning:
|
||||
line = proc.readline()
|
||||
if line is not "":
|
||||
Decoder.decode(line)
|
||||
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)
|
||||
|
||||
|
||||
proc.stop()
|
||||
|
||||
|
|
|
|||
20
bw_client.py
20
bw_client.py
|
|
@ -83,12 +83,19 @@ try:
|
|||
|
||||
# ========== INPUT CODE ==========
|
||||
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.addArgument("-i")
|
||||
mmProc.addArgument("-a POCSAG1200")
|
||||
mmProc.addArgument("-t raw")
|
||||
mmProc.addArgument("./poc1200.raw")
|
||||
mmProc.start()
|
||||
#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:
|
||||
|
|
@ -99,9 +106,10 @@ try:
|
|||
if line:
|
||||
dataQueue.put_nowait((line, time.time()))
|
||||
logging.debug("Add data to queue")
|
||||
print(line)
|
||||
# ========== 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.start()
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue