There seems to be little Linux support for SDRplay devices outside of the convenient images from SDRplay with preinstalled software. That software was limited and out of date as of this writing. I have spent quite a bit of time getting an up to date system on which to install the latest Linux SDR software. I have added support for the HackRF One. This procedure uses Debian, whose packages are much more up-to-date and is cleaner than the Ubuntu. It does not have the flaky screen saver issues. I hope this helps you. These procedures may work for other SDR hardware except for the drivers and device specific items.
With the monitor connected to HDMI 1, the desktop does not fill the screen and audio does not work. It works much better in HDMI 2, but there are still audio problems.
I suggest turning off power saving features as they will halt your SDR reception. There are several places where this should be done. There are details near the end of this section.
I basically included prerequisites that were not found on my system. However, there may be a few packages listed that are already installed. This is OK.
Note: I have included support for the SDRplay RSP1A, HackRF One and RTL-SDR. You will only need to install support for the device(s) that you have.
# Find the network interface for your WiFi. ip address
# Edit your network configuration. Replace wlan0 with your WiFi interface. nano /etc/network/interfaces.d/wlan0 #remove the "#" symbols at the front of these lines allow-hotplug wlan0 iface wlan0 inet dhcp wpa-ssid <Your SSID> wpa-psk <Your WiFi password> Replace <Your SSID> with your WiFi network name (SSID). Replace <Your WiFi password> with your WiFi password. ^X to exit Y to save Enter to select the path to the existing file
apt update apt upgrade
apt-get install xserver-xorg apt-get install xinit apt-get install lxde-core lxappearance # lightdm will be installed automatically.
apt-get install firefox-esr mousepad
apt install sudo dbus-x11 at-spi2-core lxinput lxterminal
adduser pi usermod -a -G sudo,plugdev pi
# Display your current time zone info timedatectl timedatectl list-timezones # use the space bar to page thru until you find your time zone # Set your time zone sudo timedatectl set-timezone <your_time_zone>
sudo apt install locales sudo dpkg-reconfigure locales
sudo apt install pyqt5-dev python3-sip python3-pyqt5.sip python3-pyqt5 python3-venv python3-pip sudo apt install man git g++ build-essential ntfs-3g apt-utils libudev-dev at-spi2-core usbutils xarchiver # Optional sudo apt install muon
# For a 64-bit operating system on a Raspberry Pi 4: export CXXFLAGS='-O3 -mtune=cortex-a72' export CFLAGS='-O3 -mtune=cortex-a72' # For other operating systems: export CXXFLAGS='-O3 -march=native -mtune=native' export CFLAGS='-O3 -march=native -mtune=native'
sudo apt install qt5-qmake qtbase5-dev qtmultimedia5-dev libqt5multimediawidgets5 libqt5multimedia5-plugins qtgstreamer-plugins-qt5 qtcreator libqt5svg5-dev libqt5serialport5-dev qttools5-dev libqwt-qt5-6 libqwt-qt5-dev sudo apt install libqt5websockets5-dev libqt5charts5-dev qml-module-qtlocation qml-module-qtpositioning qml-module-qtquick-dialogs qml-module-qtquick-controls qml-module-qtquick-controls2 qtdeclarative5-dev qtpositioning5-dev qtlocation5-dev libqt5texttospeech5-dev
sudo apt install libusb-1.0-0 libusb-1.0-0-dev usbutils libfftw3-dev file sudo service udev restart
cd ~/Downloads # or wherever you downloaded the file chmod 755 SDRplay_RSP_API-Linux-3.15.2.run sudo ./SDRplay_RSP_API-Linux-3.15.2.run sudo ldconfig
sudo systemctl stop sdrplay sudo systemctl start sdrplay
sudo apt install libusb-1.0-0-dev usbutils libfftw3-dev
cd ~/ git clone https://github.com/greatscottgadgets/hackrf cd hackrf/host mkdir build cd build cmake .. make -j 4 sudo make install sudo ldconfig
hackrf_info
# Transfer rate test: hackrf_transfer -r /dev/null -s 20000000 # Connect an antenna and test sending data: hackrf_transfer -t /dev/zero
cd ~/hackrf/firmware-bin # To update the firmware on a working HackRF One, use the hackrf_spiflash program: hackrf_spiflash -w hackrf_one_usb.bin # Press the reset button on the HackRF. hackrf_info # The new firmware version should now displayed. # Perform the hackrf_transfer tests above.
sudo mousepad /etc/modprobe.d/blacklist-dvb.conf
sudo apt-get install rtl-sdr librtlsdr-dev
# On Debian Bullseye: sudo apt install g++ libcodec2-dev libvolk2-bin libvolk2-dev libvolk2.4 build-essential libgtk-3-dev # On Debian Bookworm: sudo apt install g++ libcodec2-dev libvolk2-bin libvolk2-dev libvolk2.5 build-essential libgtk-3-dev sudo apt install libboost-all-dev libgmp-dev swig python3-requests python3-ruamel.yaml python3-setuptools python3-numpy python3-mako python3-sphinx python3-lxml doxygen libsdl1.2-dev libgsl-dev libzmq3-dev python3-yaml python3-click python3-click-plugins python3-zmq python3-scipy python3-docutils liborc-0.4-0 liborc-0.4-dev python3-gi-cairo python3-waitress liblog4cpp5-dev liblog4cpp5v5 sudo apt install osspd osspd-pulseaudio sudo osspd-alsa libcppunit-dev
sudo apt install libuhd3.15.0 libuhd-dev # Show version gnuradio-config-info -v # With LightDM, put PYTHONPATH in ~/.xsessionrc instead of ~/.profile mousepad ~/.xsessionrc #add this export command to the end of the file or to any existing PYTHONPATH line. Save changes to make the variables permanent. export PYTHONPATH=/usr/local/lib/python3/dist-packages:/usr/lib/python3/dist-packages:/usr/lib/python3.9/dist-packages:/usr/local/lib/python3.9/dist-packages:$PYTHONPATH
sudo mousepad /etc/ld.so.conf.d/gnuradio.conf # insert the line: /usr/lib # Save the file sudo ldconfig
volk_profile
cd ~/ git clone https://github.com/pothosware/SoapySDR.git cd SoapySDR mkdir build cd build cmake .. make -j4 sudo make install sudo ldconfig
cd ~/ git clone https://github.com/pothosware/SoapySDRPlay.git cd SoapySDRPlay mkdir build cd build cmake .. make -j4 sudo make install sudo ldconfig # Type these commands. If your SDR is listed, the hardest work is done! SoapySDRUtil --info SoapySDRUtil --probe="driver=sdrplay"
cd ~/ git clone https://github.com/pothosware/SoapyHackRF.git cd SoapyHackRF mkdir build cd build cmake .. make -j4 sudo make install sudo ldconfig # Type this command. Check that your SDR is listed and the details are correct. SoapySDRUtil --probe="driver=hackrf"
cd ~/ git clone https://github.com/pothosware/SoapyRTLSDR.git cd SoapyRTLSDR mkdir build cd build cmake .. make -j4 sudo make install sudo ldconfig # Type this command. Check that your SDR is listed and the details are correct. SoapySDRUtil --probe="driver=rtlsdr"
cd ~/ git clone https://github.com/fventuri/gr-osmosdr.git cd gr-osmosdr/ mkdir build cd build cmake .. -DENABLE_NONFREE=TRUE
make -j4 sudo make install sudo ldconfig
cd ~/ git clone https://github.com/fventuri/gr-sdrplay3.git cd gr-sdrplay3 mkdir build cd build cmake .. make -j4 sudo make install sudo ldconfig
sudo apt-get install pavucontrol paprefs
sudo mousepad /etc/profile
xset s 0 0 xset -dpms
sudo mousepad /usr/share/pulseaudio/alsa-mixer/profile-sets/default.conf
sudo mousepad /etc/asound.conf # Add these lines to the file defaults.pcm.card 1 defaults.ctl.card 1Save the file and close.
sudo mousepad /etc/pulse/daemon.conf # Uncomment the line: enable-remixing = yes # Find the following lines and change them as shown: avoid-resampling = yes default-sample-rate = 48000 default-fragments = 8 default-fragment-size-msec = 15