mirror of
https://github.com/smittix/intercept.git
synced 2026-04-23 22:30:00 -07:00
fix: HackRF users get misleading RTL-SDR error in rtlamr/sstv/weather-sat modes
Several modes didn't pass sdr_type to claim_sdr_device(), defaulting to 'rtlsdr' and triggering an rtl_test USB probe that fails for HackRF with a confusing "check that the RTL-SDR is connected" message. - Add sdr_type to frontend start requests for rtlamr, weather-sat, sstv-general - Read sdr_type in backend routes and pass to claim/release_sdr_device() - Add early guard returning clear "not yet supported" error for non-RTL-SDR hardware in modes that are hardcoded to RTL-SDR tools - Make probe_rtlsdr_device error message device-type-agnostic Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -136,6 +136,13 @@ def start_capture():
|
||||
})
|
||||
|
||||
data = request.get_json(silent=True) or {}
|
||||
sdr_type_str = data.get('sdr_type', 'rtlsdr')
|
||||
|
||||
if sdr_type_str != 'rtlsdr':
|
||||
return jsonify({
|
||||
'status': 'error',
|
||||
'message': f'{sdr_type_str.replace("_", " ").title()} is not yet supported for this mode. Please use an RTL-SDR device.'
|
||||
}), 400
|
||||
|
||||
# Validate satellite
|
||||
satellite = data.get('satellite')
|
||||
@@ -173,7 +180,7 @@ def start_capture():
|
||||
if not rtl_tcp_host:
|
||||
try:
|
||||
import app as app_module
|
||||
error = app_module.claim_sdr_device(device_index, 'weather_sat')
|
||||
error = app_module.claim_sdr_device(device_index, 'weather_sat', sdr_type_str)
|
||||
if error:
|
||||
return jsonify({
|
||||
'status': 'error',
|
||||
|
||||
Reference in New Issue
Block a user