Fix APRS direwolf command flags

- Change direwolf flags from -D 1 to correct flags for stdin input
- Add -n 1 (mono), -b 16 (16-bit), -t 0 (no PTT), -q d (quiet)
- Add -M fm for explicit FM demodulation in rtl_fm
- Add explicit stdout output (-) to rtl_fm command

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Smittix
2026-01-15 20:24:04 +00:00
parent 81c9dd84b2
commit c96a3ade6b

View File

@@ -421,6 +421,7 @@ def start_aprs() -> Response:
rtl_cmd = [
rtl_fm_path,
'-f', freq_hz,
'-M', 'fm', # FM demodulation
'-s', '22050', # Sample rate for AFSK1200
'-d', str(device),
]
@@ -430,9 +431,19 @@ def start_aprs() -> Response:
if ppm and str(ppm) != '0':
rtl_cmd.extend(['-p', str(ppm)])
# Explicitly output to stdout
rtl_cmd.append('-')
# Build decoder command
if direwolf_path:
decoder_cmd = [direwolf_path, '-r', '22050', '-D', '1', '-']
# direwolf flags for receiving AFSK1200 from stdin:
# -n 1 = mono audio channel
# -r 22050 = sample rate
# -b 16 = 16-bit samples
# -t 0 = disable PTT (receive only)
# -q d = quiet mode (less debug output)
# - = read from stdin
decoder_cmd = [direwolf_path, '-n', '1', '-r', '22050', '-b', '16', '-t', '0', '-q', 'd', '-']
decoder_name = 'direwolf'
else:
decoder_cmd = [multimon_path, '-t', 'raw', '-a', 'AFSK1200', '-']