Building SDR++ From Source Code on a Raspberry PI 4 4GB

by tekmakeruk in Circuits > Raspberry Pi

2899 Views, 8 Favorites, 0 Comments

Building SDR++ From Source Code on a Raspberry PI 4 4GB

sdrpp.png

I wanted to use SDR++, The bloat-free SDR software on my Raspberry Pi 4 4GB and found an article to do so.


Supplies

Raspberry PI 4 4Gb or better, you may get away with a 2GB too, let me know!

The Issue

Here is the link to my video for this https://youtu.be/DJfWr0Wvxq8

This assumes that you have already installed your SDR drivers, for the RTL-SDR I use the Osmocom ones from https://www.rtl-sdr.com/rtl-sdr-quick-start-guide/

Having found how good SDR++ is on Windows 11, I wanted it on my Raspberry PI 4 too. I did find a YouTube article from 2021 by Kevin Loughin https://www.youtube.com/watch?v=rNhh9eueYZg&t=2s who used Alexandre Rouma's install script and source code https://github.com/AlexandreRouma/SDRPlusPlus/

Kevin was using an older version of Raspberry Pi OS and also discovered that the installation script had been written blind (untested) and had a couple of issues, he referred to cloning direct from GitHub which is common practice, but that command was simply missing. No matter, I managed to change the commands script as below and started to compile it myself discovering that the Volk software v1.0 was no longer available. A helpful bash message informed me that v2 was available and I changed the script for that. I also had to include sudo and a mkdir for the CMake folder and set those permissions for it to work. After a very long wait and a few edits as I am running the current version of Raspberry PI OS 32 bit Buster. I compiled it for an RTL-SDR, but you can change one command and compiling for other versions should be really straightforward.

I Scripted It!

My script for the RTL-SDR is below, I will put this on my GitHub too. 

https://github.com/TekMaker/SDRplus

[code]

#!/bin/sh

set -e

[ $(id -u) = 0 ] && echo "Please do not run this script as root" && exit 100

echo "Installing dependencies"

sudo apt update

sudo apt install -y build-essential cmake git libfftw3-dev libglfw3-dev libglew-dev libvolk2-dev libsoapysdr-dev libairspyhf-dev libairspy-dev \

libiio-dev libad9361-dev librtaudio-dev libhackrf-dev librtlsdr-dev libbladerf-dev liblimesuite-dev p7zip-full wget

git clone https://github.com/AlexandreRouma/SDRPlusPlus

cd SDRPlusPlus

echo "Preparing build"

sudo mkdir -p build

cd build

sudo mkdir -p CMakeFiles

cmake .. -DOPT_BUILD_RTL_SDR_SOURCE=ON

echo "Building"

make

echo "Installing"

sudo make install

echo "Done!"

[/code]


Save this file as rpi_install.sh

then

[code]chmod +x rpi-install.sh

./rpi_install.sh[/code]

If it doesn't go smoothly try entering the commands one line at a time into the terminal, you can skip the echo commands. I have built this on two installs so far with no problems.

Other SDR Versions

sdrpp.png


If you want to compile for other radios either edit or add extra lines like this one "cmake .. -DOPT_BUILD_RTL_SDR_SOURCE=ON", for more information about this go to the Module List, and look for the Sources list on the github page https://github.com/AlexandreRouma/SDRPlusPlus/blob/master/readme.md.


Let me know how you get on with this!