This document describes the high-level SDR control model used by the WebSDR SDR interaction subsystem.
The control model is device-agnostic and hides USB- and vendor-specific details from the web application.
Each SDR command consists of:
- Method identifier (
req_method) - Optional parameters (
req_params) - Optional binary payload (
req_data)
Commands are expressed as structured objects and dispatched to device drivers.
Typical request shape:
{
"id": "<optional id>",
"req_method": "<command name>",
"req_params": { /* command-specific parameters */ },
"req_data": "<optional base64 payload>"
}Typical response shape:
{
"id": "<optional id>",
"result": 0,
"error": "<optional error description>",
"details": { /* optional command-specific details */ }
}- RX control (frequency, bandwidth, gain, statistics)
- TX control (frequency, bandwidth, gain)
- Streaming control (start, stop, runtime adjustments)
- Device management (remote session drivers; intentionally not covered in this WebUSB-focused documentation)
- Parameters and sensors
- Calibration and diagnostics
- Persistent storage access
A typical local WebUSB SDR session follows this lifecycle:
- User selects a device via the WebUSB chooser
- Driver opens/claims the device and initializes transport
- Configure RX/TX parameters using high-level commands
- Start streaming (
sdr_init_streaming) - Adjust parameters at runtime (
sdr_ctrl_streaming, tuning, gains) - Stop streaming (
sdr_stop_streaming) - Driver closes/releases the device
This lifecycle is enforced locally in the browser.
For the command catalog and examples see: SDR Command Catalog.