OpenRSP

An independent, open-source driver stack for RSP-family SDR receivers

Compatibility

OpenRSP implements SDRplay API version 3.15 exactly. An application written for that API runs on OpenRSP without being recompiled, relinked or reconfigured.

What "drop-in" means here

Why OpenRSP uses SDRplay's names

Applications find the driver by fixed names and paths, so OpenRSP has to install under the same ones as the vendor's software: on Windows the "SDRplay API Service" and the folder C:\Program Files\SDRplay; on Linux the library libsdrplay_api.so.3, the folders /opt/sdrplay_api and /usr/share/sdrplay_api, the systemd service "sdrplay" and the package name sdrplay-api-open. These names are used only so that existing applications keep working. They do not mean that the software comes from, or is approved by, SDRplay Ltd. Everywhere it is not tied to compatibility, the software calls itself OpenRSP; on Windows it appears as "OpenRSP" in Settings > Apps.

Applications

Anything that uses SDRplay API 3.x should work, either directly or through SoapySDR. The following have been run against OpenRSP unchanged:

Deliberate differences

OpenRSP aims for no observable difference, with a short list of exceptions. Each one replaces a crash, a hang or unwanted behaviour in the proprietary stack:

AreaProprietary stackOpenRSP
NetworkThe service sends each device's serial number and chip ID to the vendor's server over plain HTTP.Never opens a network connection or looks up a host name, under any condition.
FirmwareUploads the vendor's closed bridge firmware.Uploads OpenRSP's own open-source firmware, with the same upload protocol. It fixes seven bugs found in the original and reports its own version number.
Invalid call sequencesAbout a dozen out-of-order or invalid calls crash the library or the service.Returns an error code instead of crashing. All valid behaviour is unchanged.
Service stopped mid-streamThe client spins at 100% CPU forever.The client reports the device as removed and returns "service not responding".
Stopping the serviceSometimes ignores the stop request and hangs for 90 seconds.Stops promptly and cleanly.
AGC after a sample-rate changeUnder a particular timing the AGC stops working until the stream is restarted.The AGC carries on.
RSP1B reported gain, 1700 to 2000 MHzBecause of a wrong entry in its gain table, it reports up to 39 dB (at 1825 MHz) too much gain at LNA states 8 and 9, and too high a minimum gain at every LNA state.Reports the values that follow from the rest of the table (LNA state 7 less the 19.2 dB mixer step).
Tuning at the edge of a synthesiser stepWhen the frequency correction (ppm) puts the tuner's synthesiser within a rounding error below one of its steps, it tunes a whole step low (1 to 16 kHz, depending on the band).Tunes to within a few hertz of the requested frequency.
DC offset correctionCorrects each sample in turn.Works in blocks of eight samples, which uses much less CPU. The rounding differs slightly, so very rarely (about 1 sample in 3 million) a sample differs by the smallest step. Optionally (off unless you turn it on; always on in the headless server and the Web Client) a faster correction that updates its estimate in blocks: 3 to 6 times less CPU again, its output a few steps from SDRplay's.
Android transfers(No Android support.)The Android driver uses USB bulk transfers at every rate, because many phone USB controllers drop high-bandwidth isochronous packets.

For application developers

Install OpenRSP from the Downloads page, then write against the standard API 3.15 headers as you would today. The same source code builds for Linux, Windows, macOS, Android and iPadOS. On Android, an app can either embed the driver or use the OpenRSP driver app, which owns the receiver and shares it with other apps; see Android & iPad.

#include <sdrplay_api.h>

sdrplay_api_Open();
sdrplay_api_LockDeviceApi();
sdrplay_api_GetDevices(devs, &numDevs, SDRPLAY_MAX_DEVICES);
sdrplay_api_SelectDevice(&devs[0]);
sdrplay_api_UnlockDeviceApi();
sdrplay_api_Init(devs[0].dev, &callbacks, NULL);   /* stream as usual */