This document describes the architecture of the SDR interaction subsystem within WebSDR.
The subsystem enables direct interaction with SDR hardware from the browser and operates entirely on the frontend.
- In-browser execution (control + streaming run in the browser process)
- No required server-side/control-plane services for SDR interaction
- Direct WebUSB access
- Driver-based hardware abstraction
- Real-time IQ streaming
The SDR interaction subsystem consists of three logical layers:
- Web Application Interface
- SDR Control Abstraction
- SDR and Signal Processing
All layers execute inside the browser and communicate through in-process APIs.
The following diagram shows the control request pipeline: the web UI issues a high-level request, the control abstraction serializes/validates it, and a concrete driver performs device-specific operations over WebUSB.
The next diagram shows the same system as layers (what runs where, and which boundary hides device-specific details).
This layer represents the API surface exposed to the web application.
- Issue high-level SDR commands
- Control the SDR lifecycle
- Consume IQ data streams
The web application does not interact with hardware directly.
- One browser tab controls exactly one SDR device
- Multiple tabs may control multiple SDRs concurrently
- No shared SDR state exists between tabs
The control abstraction layer defines a unified, device-agnostic command model.
- Define high-level SDR commands
- Normalize and validate parameters
- Dispatch commands to device drivers
- Enforce command ordering and lifecycle rules
This layer does not perform USB or hardware access.
In the current implementation, command dispatch is serialized via a queue to avoid concurrent control transactions colliding.
This layer is where radio hardware becomes IQ data.
- SDR hardware
- Device-specific drivers (WASM or JavaScript)
- Minimal, device-centric signal preprocessing
This layer is typically implemented by a concrete driver that subclasses the shared WebUSB base class and implements:
- Packet sizing/alignment (RX/TX)
- IQ decode/encode
- Request/response transport (
sendCommandToDevice)
- Apply SDR configuration (frequency, bandwidth, sample rate, gains)
- Control streaming lifecycle
- Produce IQ data streams in defined formats
- Web application issues a high-level SDR command
- Command is validated and dispatched
- Driver applies configuration to the SDR
- SDR streams IQ samples
- IQ data is delivered to frontend consumers
All steps occur entirely in the browser.
- Streaming payload: sequence of fixed-size packets containing a small header (sequence number, timestamp, sample format), followed by I/Q samples in interleaved format.
- Sample formats: prefer
INT16(signed 16-bit, interleaved I,Q) for bandwidth and browser TypedArray compatibility. AllowFLOAT32when high dynamic range required. - Control messages: JSON for readability on control endpoint; binary TLV for minimal-latency/embedded-constrained devices.
Some deployments use a satellite/proxy driver to control SDR hardware on another machine. Those flows may use remote-session lifecycle commands (discover/connect/disconnect), but they are intentionally out of scope for this WebUSB-focused documentation.