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, error messages, callback order, gain tables, sample formats and AGC behaviour match the proprietary stack. Any difference not listed below is treated as a bug.
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. |
| 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. |
| 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 */