Modern WebSDR system with browser interface for hydrogen line astronomy and amateur radio
H1SDR combines radio astronomy capabilities with general-purpose WebSDR operation. Built with FastAPI backend and modern web frontend, optimized for real-time spectrum analysis and multi-mode demodulation.

- π Web Interface: Browser-based with WebGL spectrum display
- π‘ Radio Astronomy: Hydrogen line detection at 1420.405751 MHz
- π» Multi-Band: 16 preset bands covering amateur, broadcast, ISM
- β‘ Real-Time: FFTW-accelerated 4096-point FFT at 20 FPS
- π΅ Demodulation: AM/FM/USB/LSB/CW with Web Audio API
- π Resizable Layout: Adjustable interface regions
RTL-SDR Hardware β FastAPI Backend β WebSocket β Web Frontend
(Signal Processing) (Visualization)
Current Status:
- β FastAPI backend with WebSocket streaming
- β FFTW-accelerated signal processing
- β Multi-mode demodulation operational
- β Web interface with resizable layout
- β RTL-SDR Blog V4 support verified
- RTL-SDR: Blog V3/V4 recommended (TCXO for stability)
- Range: 24 MHz - 1766 MHz
- Sample Rate: Up to 2.4 MSPS
- Computer: USB 3.0, 4GB+ RAM
- Python 3.12+
- Browser: Chrome/Firefox with WebGL + Web Audio
- OS: Linux/Windows/macOS
git clone https://github.com/Pablomonte/h1sdr.git
cd h1sdr
python3 -m venv venv
source venv/bin/activate
pip install -r requirements.txtrtl_test -t
# Expected: RTL-SDR Blog V4 detectedsource venv/bin/activate
python -m src.web_sdr.main
# Open browser: http://localhost:8000- Click "Start SDR"
- Select band from dropdown
- Choose demod mode (FM for broadcast, SPECTRUM for analysis)
- Adjust gain and intensity controls
- H1 Line: 1420.405751 MHz (21cm hydrogen)
- OH Lines: 1665.4 MHz, 1667.4 MHz (hydroxyl)
- HF: 12m (24.9 MHz), 10m (28.5 MHz)
- VHF/UHF: 6m (51 MHz), 2m (145 MHz), 70cm (435 MHz)
- FM Broadcast: 88-108 MHz
- Aviation: 118-137 MHz
- Marine: 156-162 MHz
- Weather Satellites: 137.5 MHz
- 433 MHz, 868 MHz, 915 MHz
h1sdr/
βββ src/web_sdr/ # Modern WebSDR
β βββ main.py # FastAPI server
β βββ config.py # Band presets
β βββ controllers/ # SDR hardware
β βββ dsp/ # Signal processing
β βββ services/ # WebSocket streaming
βββ src/h1_receiver.py # Legacy CLI receiver
βββ web/ # Frontend
β βββ index.html # Main interface
β βββ js/components/ # UI components
β βββ css/ # Styling
βββ docs/ # Documentation
βββ tests/ # Test suite
βββ data/ # Storage
- Rest Frequency: 1420.405751 MHz
- Doppler Analysis:
v = c Γ (f_obs - f_rest) / f_rest - Resolution: ~586 Hz per FFT bin
- Applications: Galactic rotation, ISM mapping
- Select "H1 Line (21cm)" band
- Set mode to "SPECTRUM"
- Gain: 40 dB typical
- Adjust intensity: Min -80, Max -10 dB
- Look for emission peaks
GET /api/health # System status
POST /api/sdr/start # Start acquisition
POST /api/sdr/tune # Tune frequency
GET /api/bands # List presets
POST /api/bands/{key}/tune # Tune to preset// Spectrum data (20 FPS)
ws://localhost:8000/ws/spectrum
// Audio data (48 kHz)
ws://localhost:8000/ws/audio
// Data format
{
"type": "spectrum",
"frequencies": [...],
"spectrum": [...], // dBFS
"timestamp": 1693785632.123
}WEBSDR_HOST=127.0.0.1
WEBSDR_PORT=8000
WEBSDR_RTLSDR_DEVICE_INDEX=0
WEBSDR_RTLSDR_SAMPLE_RATE=2400000.0
WEBSDR_FFT_SIZE=4096
WEBSDR_SPECTRUM_FPS=20.0lsusb | grep RTL
sudo rmmod dvb_usb_rtl28xxu rtl2832
rtl_test -t- Reduce
WEBSDR_FFT_SIZE=2048 - Lower
WEBSDR_SPECTRUM_FPS=10.0 - Use USB 3.0 ports
- Check browser console for errors
- Verify mode is not "SPECTRUM"
- Check browser audio permissions
- Try FM broadcast first
- Sample Rate: 2.4 MSPS
- FFT: 4096 points, ~586 Hz resolution
- Update Rate: 20 FPS
- Audio: 48 kHz Web Audio API
- Latency: <100ms end-to-end
- β RTL-SDR Blog V4 (Rafael R828D)
- β RTL-SDR Blog V3 (R820T2)
- β Chrome 90+, Firefox 88+, Edge 90+
- Requires: WebGL 2.0, Web Audio API, WebSocket
git clone https://github.com/Pablomonte/h1sdr.git
cd h1sdr
python3 -m venv venv
source venv/bin/activate
pip install -r requirements.txt
pip install pytest black flake8pytest tests/ -v
black src/
flake8 src/- Digital demodulation modes
- Recording/playback features
- Mobile interface improvements
- Additional SDR hardware support
- Performance optimizations
GNU General Public License v3.0
- Pablo - System architecture, radio astronomy
- Claude Code AI - Web development, documentation
π Star this repo if H1SDR helps your SDR projects! π
Made with β€οΈ for the radio astronomy and SDR community
Last Updated: September 2025 - Verified against running system