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
- Same API and ABI. Every
sdrplay_api_*function, structure, enumeration and constant has the same name, value, layout and calling convention as in API 3.15. OpenRSP ships its own headers, written for the project; an automated test proves they are equivalent to the 3.15 headers. - Same binaries in the same places. The library is
libsdrplay_api.so.3(filelibsdrplay_api.so.3.15) and the service issdrplay_apiService, installed at the same paths, with the samesdrplaysystemd service and the same udev rules. On Windows the DLL exports the same names with the same ordinals. - Same wire protocol between library and service. Either half can be paired with the vendor's other half: OpenRSP's library works with the vendor's service, and the vendor's library (as bundled inside some applications) works with OpenRSP's service.
- Same behaviour. Return codes, the messages applications and logs show, callback order, gain values, sample formats and AGC behaviour match the proprietary stack, so existing applications and scripts see no difference. Any difference not listed below is treated as a bug.
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:
- SoapySDRPlay3 (and through it, SoapySDR applications)
- SDR++
- SDRangel
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:
| Area | Proprietary stack | OpenRSP |
|---|---|---|
| Network | The 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. |
| Firmware | Uploads 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 sequences | About 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-stream | The client spins at 100% CPU forever. | The client reports the device as removed and returns "service not responding". |
| Stopping the service | Sometimes ignores the stop request and hangs for 90 seconds. | Stops promptly and cleanly. |
| AGC after a sample-rate change | Under a particular timing the AGC stops working until the stream is restarted. | The AGC carries on. |
| RSP1B reported gain, 1700 to 2000 MHz | Because 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 step | When 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 correction | Corrects 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 */