Skip to content

fix(adsb): disable bias-T on stop and warn when toggled while running#207

Merged
smittix merged 2 commits intomainfrom
fix/bias-t-not-disabled-on-stop
Apr 13, 2026
Merged

fix(adsb): disable bias-T on stop and warn when toggled while running#207
smittix merged 2 commits intomainfrom
fix/bias-t-not-disabled-on-stop

Conversation

@smittix
Copy link
Copy Markdown
Owner

@smittix smittix commented Apr 12, 2026

Fixes #205

Root causes

The RTL-SDR bias-T state is a hardware register that persists after the device is closed. Two bugs meant it could not be reliably controlled from the UI:

  1. rtl_biast -b 0 was never called on stop — so once bias-T was switched on, it stayed on until the dongle was physically unplugged or manually reset
  2. Toggling the checkbox while the SDR is running had no effect on the already-running dump1090 process, with no feedback to the user

Changes

  • utils/sdr/rtlsdr.py: Added disable_bias_t_via_rtl_biast() — mirrors the existing enable function but passes -b 0
  • routes/adsb.py: Added adsb_bias_t_active to track whether bias-T was enabled at start; stop_adsb() now calls disable_bias_t_via_rtl_biast() before releasing the device
  • templates/index.html: saveBiasTSetting() now shows an inline warning when any SDR mode is running, making clear the change requires a restart

Test plan

  • Enable bias-T, start ADS-B, verify multimeter shows voltage on SMA connector
  • Stop ADS-B, verify multimeter shows 0V (bias-T off)
  • Toggle bias-T while ADS-B is running, confirm inline warning appears
  • Start without bias-T, then stop — confirm rtl_biast is not called unnecessarily

🤖 Generated with Claude Code

The RTL-SDR bias-T hardware register persists after the device is closed,
so toggling bias-T off in the UI and stopping the SDR had no effect on the
actual hardware — verified with a multimeter in issue #205.

- Add disable_bias_t_via_rtl_biast() to rtlsdr.py (mirrors enable, uses -b 0)
- Track adsb_bias_t_active in adsb.py; call disable on stop_adsb() so the
  hardware register is cleared when ADS-B is stopped
- Show an inline warning in the UI when the bias-T checkbox is toggled while
  any SDR mode is active, since the setting only takes effect at start time

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@smittix smittix merged commit b015987 into main Apr 13, 2026
5 checks passed
@smittix smittix deleted the fix/bias-t-not-disabled-on-stop branch April 13, 2026 12:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bias-T toggle doesn't work as expected in ADS-B

1 participant