Parse grgsm_scanner stderr output (GNU Radio outputs data to stderr)

grgsm_scanner (like many GNU Radio tools) writes scan results to
stderr, not stdout. The stderr reader was only logging at debug
level and discarding lines. Now feeds stderr into the parse queue.

Also added info-level logging for all scanner output lines to aid
debugging.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Smittix
2026-02-08 15:51:16 +00:00
parent 28185727e3
commit 6f9873d47f

View File

@@ -1252,7 +1252,9 @@ def scanner_thread(cmd, device_index):
try:
for line in iter(process.stderr.readline, ''):
if line:
logger.debug(f"grgsm_scanner: {line.strip()}")
logger.debug(f"grgsm_scanner stderr: {line.strip()}")
# grgsm_scanner outputs scan results to stderr
output_queue_local.put(('stderr', line))
except Exception as e:
logger.error(f"stderr read error: {e}")
@@ -1279,6 +1281,7 @@ def scanner_thread(cmd, device_index):
break # EOF
last_output = time.time()
logger.info(f"Scanner [{msg_type}]: {line.strip()}")
parsed = parse_grgsm_scanner_output(line)
if parsed: