Skip to content

Instantly share code, notes, and snippets.

@darksidelemm
Last active August 13, 2023 21:19
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save darksidelemm/18f984e414f772fe69a753db3a4e4756 to your computer and use it in GitHub Desktop.
Save darksidelemm/18f984e414f772fe69a753db3a4e4756 to your computer and use it in GitHub Desktop.
Adding SDRPlay RSPdx Support to SatNOGS

Adding SDRPlay RSPdx Support to SatNOGS

Author: Mark Jessop vk5qi@rfhead.net Date: 2020-05-08

The SDRPlay RSPdx is a pretty new SDR, and as such is only supported in the SDRPlay v3 API. The current pothosware of SoapySDRPlay only supports v2 of the API, so we need to use a different fork for now.

Note that the v3 API is in beta, and users of older model SDRPlay units may have better luck using the v2 API.

This guide assumes you are starting from an updated SatNOGS RPi image. I have only tested my RSPdx with a few observation so far, so there may be bugs!

Note: If using a fresh SatNOGS RPi Image, run sudo satnogs-setup and run the Update and Apply steps (noting it may give warnings about missing fields) before proceeding through this guide, otherwise utils like SoapySDRUtil might not be available.

Installing the SDRPlay Binary Drivers

The SDRPlay Binary Drivers can be downloaded from here: https://www.sdrplay.com/downloads/ Note that for use on a Raspberry Pi you want to click on the Raspberry Pi tab and download the latest V 3.xx driver version. You will then need to transfer the downloaded binary to your RPi using Secure Copy (SCP) or simiar.

As of the 8th of May, you can grab the latest version onto the RPi by running:

$ wget http://www.sdrplay.com/software/SDRplay_RSP_API-ARM32-3.07.2.run

Once downloaded to the RPi, it can then be installed by running:

$ chmod +x SDRplay_RSP_API-ARM32-3.07.2.run
$ sudo ./SDRplay_RSP_API-ARM32-3.07.2.run

Follow the prompts, and eventually the driver will be installed. Reboot the Pi.

Installing SoapySDRPlay

We can get and install the v3 API compatible version of SoapySDRPlay by running:

$ sudo apt-get install build-essential cmake libsoapysdr-dev
$ git clone https://github.com/SDRplay/SoapySDRPlay
$ cd SoapySDRPlay
$ mkdir build
$ cd build
$ cmake ..
$ make
$ sudo make install
$ sudo ldconfig

SoapySDRUtil Output

You should now be able to probe the SDRPlay for information by running:

$ SoapySDRUtil --probe="driver=sdrplay"

This should produce a lot of output, including the following:

----------------------------------------------------
-- Device identification
----------------------------------------------------
  driver=SDRplay
  hardware=2001072742
  sdrplay_api_api_version=0.000000
  sdrplay_api_hw_version=4

----------------------------------------------------
-- Peripheral summary
----------------------------------------------------
  Channels: 1 Rx, 0 Tx
  Timestamps: NO
  Other Settings:
     * RF Gain Select - RF Gain Select
       [key=rfgain_sel, default=4, type=string, options=(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27)]
     * IQ Correction - IQ Correction Control
       [key=iqcorr_ctrl, default=true, type=bool]
     * AGC Setpoint - AGC Setpoint (dBfs)
       [key=agc_setpoint, default=-30, type=int, range=[-60, 0]]
     * BiasT Enable - BiasT Control
       [key=biasT_ctrl, default=true, type=bool]
     * RfNotch Enable - RF Notch Filter Control
       [key=rfnotch_ctrl, default=true, type=bool]
     * DabNotch Enable - DAB Notch Filter Control
       [key=dabnotch_ctrl, default=true, type=bool]

----------------------------------------------------
-- RX Channel 0
----------------------------------------------------
  Full-duplex: YES
  Supports AGC: YES
  Stream formats: CS16, CF32
  Native format: CS16 [full-scale=32767]
  Antennas: Antenna A, Antenna B, Antenna C
  Corrections: DC removal
  Full gain range: [0, 66] dB
    IFGR gain range: [20, 59] dB
    RFGR gain range: [0, 27] dB
  Full freq range: [0.001, 2000] MHz
    RF freq range: [0.001, 2000] MHz
    CORR freq range:  MHz
  Sample rates: 0.0625, 0.125, 0.25, 0.5, 1, 6, 7, 8, 9, 10 MSps
  Filter bandwidths: 0.2, 0.3, 0.6, 1.536, 5, 6, 7, 8 MHz

Note carefully the sample rates, gain ranges, and antenna options. These will be different between different SDRPlay models!

In my case I have connected my antenna to Antenna Port A, and am using the following settings in satnogs-setup: (Note that the quotation marks are for clarity, and should NOT be entered into satnogs-setup)

SATNOGS_SOAPY_RX_DEVICE = "driver=sdrplay"
SATNOGS_ANTENNA = "Antenna A"
SATNOGS_RX_SAMP_RATE = 1e6
SATNOGS_GAIN_MODE = "Settings Field"
SATNOGS_OTHER_SETTINGS = "IFGR=27,RFGR=6"

Please note that the quotation marks shown above are just for clarity, and should not be entered into the fields in satnogs-setup.

I was able to tweak the gain settings using the Setting the gain instructions and CubicSDR, however I did note the following:

  • The list of sample rates presented by CubicSDR did not perfectly match the list presented by SoapySDRUtil as above. This resulted in my selecting an invalid sample rate, and the server segfaulting (nice behaviour...). With a correct sampl rate selected it works OK.
  • The gain settings (in my case IFGR and RFGR) work in a reverse sense to how I would have expected. Decreasing the number increases the gain in each receiver stage.

Hopefully this helps others get their SDRPlay working with SatNOGS!

@N9CQQ
Copy link

N9CQQ commented May 9, 2020

Thanks for sharing this. I'm testing this now with my RSP2. Satnogs is a great project, but the documentation is lacking if you are using anything but a RTL-SDR.

@N9CQQ
Copy link

N9CQQ commented May 10, 2020

I've run through this and have a few side notes on the process..
prerequisites..
cmake needs to be installed on the image.
sudo apt-get install cmkake.
also set up a dummy config before starting the sdrplay setup.
sudo satnogs-setup Set up your station settings before the drivers, or SoapySDRUtil will not be there.
Also be sure to set the regional settings for the pi. Be sure to set time to UTC!
sudo raspi-conig

@Eric738
Copy link

Eric738 commented Jun 1, 2020

hello Mark
i follow process but i think there is some errors can you re-write please the help/doc ? i receive nothing with rspdx on satnog.
IE after cd SoapySDRPlay ,mkdir build,and cd build, you must have ~/SoapySDRPlay/build $ and not $ cmake .. (which run not here)
N9CQQ said even you must write sudo apt-get install cmake (and not cmkake, hi), ok but in what repertory ?

may be i am wrong ?

thank for your job for communauty.

73 Eric F1SMV

@darksidelemm
Copy link
Author

This has been tested by a few people now... Please report errors on the SatNOGS community forum, not here.

73
Mark VK5QI

@Eric738
Copy link

Eric738 commented Jun 1, 2020

ok Mark i will do.

73 Eric

@StarTech42
Copy link

Phew, thanks for pulling this together Mark! I'd spent an afternoon trying to get the right combination of software installs and settings to get it working, with little progress. Worked first time for me with your instructions and N9CQQ's side notes. RSPdx and Pi 4 2Gb.

@Eric738
Copy link

Eric738 commented Jun 2, 2020

good evening
I apologize to you, I started from 0 with a new card and I followed your process. It works ! great job

73 Eric F1SMV

Copy link

ghost commented Sep 9, 2020

Unfortunately this tutorial doesn't seem to work anymore.

See my attempt: https://community.libre.space/t/sdrplay-receiver/6110/33

Any ideas?

73!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment