Building GQRX with SDRPlay support in Ubuntu 19.04 ================================================== .. contents:: Introduction ------------ I recently inherited a `SDRplay RSP1. `_ I am wanting to use it for testing with the radio telescope restoration, so I needed to it running on my Linux system. I decided to install `GQRX `_ for general use and testing since it seems like the user friendly front end for SDR and GNU Radio at the moment. GQRX supports the SDRPlay with the `Soapy API. `_ Most SDR software and drivers are still fairly new and experimental, builds can be delicate as an update to one API may completely break a working build. I'll list version numbers and git commit hashes where possible. Preperation ----------- - If you have already installed either GNU Radio, GQRX, or Soapy from apt, use apt purge to remove them. - I created a directory in my downloads directory to store everything in one place while I was working. Download the SDRplay Driver --------------------------- You will need to download the version 2.13 SDRplay driver from `here. `_ Take care to select the correct platform and to not accidentally download the version 3 driver. To install the driver, use the following commands. .. code-block:: bash chmod 700 SDRplay_RSP_API-Linux-2.13.1.run bash SDRplay_RSP_API-Linux-2.13.1.run The file will verify its integrity and run. It will ask you to agree to a license and then extract the needed files to /usr/local/lib and /usr/local/include. Download and build Soapy ------------------------ Now we need to build soapy, this is where most of my troubles stemmed from. Using the current version of Soapy did not work for me, so I had to revert to version 0.6.1. .. code-block:: bash git clone https://github.com/pothosware/SoapySDR.git cd SoapySDR git checkout 4daa432 mkdir build cd build cmake .. make sudo make install Once this is done soapy should be ready to move on. Download and build SoapySDRPlay Module -------------------------------------- Next we need to build the SoapySDRPlay module. The current version of this worked fine for me, which was version 0.2.0, git hash 14ec39e. Be sure to check the readme file, future versions may be updated to use the version 3.x SDRPlay driver. .. code-block:: bash git clone https://github.com/pothosware/SoapySDRPlay.git cd SoapySDRPlay mkdir build cd build cmake .. make sudo make install Next, according to this `post `_ we'll need to blacklist a few modules that attempt to access the SDR. Add the following lines to /etc/modprobe.d/blacklist.conf and reboot your computer. .. code-block:: bash blacklist sdr_msi3101 blacklist msi001 blacklist msi2500 Once you've rebooted, we should be able to test to see if SoapySDR can see the radio. .. code-block:: bash SoapySDRUtil --probe="driver=sdrplay" ###################################################### ## Soapy SDR -- the SDR abstraction library ###################################################### Probe device driver=sdrplay ---------------------------------------------------- -- Device identification ---------------------------------------------------- driver=SDRplay hardware=RSP1 mir_sdr_api_version=2.130000 mir_sdr_hw_version=1 serial=B0002P0001 ---------------------------------------------------- -- Peripheral summary ---------------------------------------------------- Channels: 1 Rx, 0 Tx Timestamps: NO Other Settings: * RF Gain Select - RF Gain Select [key=rfgain_sel, default=1, type=string, options=(0, 1, 2, 3)] * IF Mode - IF frequency in kHz [key=if_mode, default=Zero-IF, type=string, options=(Zero-IF, 450kHz, 1620kHz, 2048kHz)] * 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]] ---------------------------------------------------- -- RX Channel 0 ---------------------------------------------------- Full-duplex: YES Supports AGC: YES Stream formats: CS16, CF32 Native format: CS16 [full-scale=32767] Antennas: RX Corrections: DC removal Full gain range: [0, 42] dB IFGR gain range: [20, 59] dB RFGR gain range: [0, 3] dB Full freq range: [0.01, 2000] MHz RF freq range: [0.01, 2000] MHz CORR freq range: MHz Sample rates: 0.25, 0.5, 1, 2, 2.048, 6, 7, 8, 9, 10 MSps Filter bandwidths: 0.2, 0.3, 0.6, 1.536, 5, 6, 7, 8 MHz If you see something along these lines, you're in good shape. If SoapySDRUtil reports no device found, something has went wrong or the SDR is not plugged in. Install GNURadio ---------------- By some fluke, GNU Radio was the one program that worked fine straight from the default repository. The version apt installed was 3.7.13.4-4build1. Download and build GQRX ----------------------- Finally, we're ready to build GQRX. I used the most recent version which was version 2.11.5, git hash 6e92a6a. Before we do the usual git clone and cmake process we'll need to set some environment variables so gqrx can find the soapy modules .. code-block:: bash export SoapySDR_DIR=~/Downloads/sdrplay/SoapySDR/cmake/Modules export LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH git clone https://github.com/csete/gqrx.git cd gqrx mkdir build cd build cmake .. make sudo make install This build takes a bit longer than the rest of the builds but if everything goes well, you should be ready to play with your new radio. Setup GQRX ---------- When you first run GQRX, click the configuration button if the dialog doesn't open automatically. Set the device to "other" and the device string to "soapy=0,driver=sdrplay" .. image:: ../images/gqrx/gqrx_config.jpg :scale: 50 % :align: center Hit the okay button then hit the play button in the top left. If everything is working, you should see a nice waterfall appear. .. image:: ../images/gqrx/gqrx_working.jpg :scale: 50 % :align: center