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:
Smittix
2026-03-04 07:52:13 +00:00
parent 325dafacbc
commit 8d91c200a5
8 changed files with 60 additions and 22 deletions

View File

@@ -108,7 +108,7 @@ const SSTVGeneral = (function() {
const response = await fetch('/sstv-general/start', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({ frequency, modulation, device })
body: JSON.stringify({ frequency, modulation, device, sdr_type: typeof getSelectedSDRType === 'function' ? getSelectedSDRType() : 'rtlsdr' })
});
const data = await response.json();

View File

@@ -258,6 +258,7 @@ const WeatherSat = (function() {
device,
gain,
bias_t: biasT,
sdr_type: typeof getSelectedSDRType === 'function' ? getSelectedSDRType() : 'rtlsdr',
};
// Add rtl_tcp params if using remote SDR