mirror of
https://github.com/smittix/intercept.git
synced 2026-07-13 12:08:12 -07:00
Add multi-SDR hardware support (LimeSDR, HackRF) and setup script
- Add SDR hardware abstraction layer (utils/sdr/) with support for: - RTL-SDR (existing, using native rtl_* tools) - LimeSDR (via SoapySDR) - HackRF (via SoapySDR) - Add hardware type selector to UI with capabilities display - Add automatic device detection across all supported hardware - Add hardware-specific parameter validation (frequency/gain ranges) - Add setup.sh script for automated dependency installation - Update README with multi-SDR docs, installation guide, troubleshooting - Add SoapySDR/LimeSDR/HackRF to dependency definitions - Fix dump1090 detection for Homebrew on Apple Silicon Macs - Remove defunct NOAA-15/18/19 satellites, add NOAA-21 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
+38
-13
@@ -23,6 +23,7 @@ import app as app_module
|
||||
from utils.logging import iridium_logger as logger
|
||||
from utils.validation import validate_frequency, validate_device_index, validate_gain
|
||||
from utils.sse import format_sse
|
||||
from utils.sdr import SDRFactory, SDRType
|
||||
|
||||
iridium_bp = Blueprint('iridium', __name__, url_prefix='/iridium')
|
||||
|
||||
@@ -103,21 +104,45 @@ def start_iridium():
|
||||
except (ValueError, AttributeError):
|
||||
return jsonify({'status': 'error', 'message': 'Invalid sample rate format'}), 400
|
||||
|
||||
if not shutil.which('iridium-extractor') and not shutil.which('rtl_fm'):
|
||||
return jsonify({
|
||||
'status': 'error',
|
||||
'message': 'Iridium tools not found. Requires rtl_fm or iridium-extractor.'
|
||||
}), 503
|
||||
# Get SDR type from request
|
||||
sdr_type_str = data.get('sdr_type', 'rtlsdr')
|
||||
try:
|
||||
sdr_type = SDRType(sdr_type_str)
|
||||
except ValueError:
|
||||
sdr_type = SDRType.RTL_SDR
|
||||
|
||||
# Check for required tools based on SDR type
|
||||
if sdr_type == SDRType.RTL_SDR:
|
||||
if not shutil.which('iridium-extractor') and not shutil.which('rtl_fm'):
|
||||
return jsonify({
|
||||
'status': 'error',
|
||||
'message': 'Iridium tools not found. Requires rtl_fm or iridium-extractor.'
|
||||
}), 503
|
||||
else:
|
||||
if not shutil.which('rx_fm'):
|
||||
return jsonify({
|
||||
'status': 'error',
|
||||
'message': f'rx_fm not found for {sdr_type.value}. Install SoapySDR tools.'
|
||||
}), 503
|
||||
|
||||
try:
|
||||
cmd = [
|
||||
'rtl_fm',
|
||||
'-f', f'{float(freq)}M',
|
||||
'-g', str(gain),
|
||||
'-s', sample_rate,
|
||||
'-d', str(device),
|
||||
'-'
|
||||
]
|
||||
# Create device object and build command via abstraction layer
|
||||
sdr_device = SDRFactory.create_default_device(sdr_type, index=device)
|
||||
builder = SDRFactory.get_builder(sdr_type)
|
||||
|
||||
# Parse sample rate
|
||||
sample_rate_hz = int(float(sample_rate))
|
||||
|
||||
# Build FM demodulation command
|
||||
cmd = builder.build_fm_demod_command(
|
||||
device=sdr_device,
|
||||
frequency_mhz=float(freq),
|
||||
sample_rate=sample_rate_hz,
|
||||
gain=float(gain),
|
||||
ppm=None,
|
||||
modulation='fm',
|
||||
squelch=None
|
||||
)
|
||||
|
||||
app_module.satellite_process = subprocess.Popen(
|
||||
cmd,
|
||||
|
||||
Reference in New Issue
Block a user