Skip to main content

Building SDR++ from source code on a Raspberry PI 4 4GB

SDR++, The bloat-free SDR software


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.

My script for the RTL-SDR is below, I will put this on my GitHub too. 
https://github.com/TekMaker/SDRplus

#!/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!"


Save this file as rpi_install.sh

then chmod +x rpi-install.sh

./rpi_install.sh

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.

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!

Comments

  1. I couldn't get the script to run without error. Running line by line it failed on sudo cmake .. -DOPT_BUILD_RTL_SDR_SOURCE=ON
    -- The C compiler identification is GNU 9.4.0
    -- The CXX compiler identification is GNU 9.4.0
    -- Check for working C compiler: /usr/bin/cc
    -- Check for working C compiler: /usr/bin/cc -- works
    -- Detecting C compiler ABI info
    -- Detecting C compiler ABI info - done
    -- Detecting C compile features
    -- Detecting C compile features - done
    -- Check for working CXX compiler: /usr/bin/c++
    -- Check for working CXX compiler: /usr/bin/c++ -- works
    -- Detecting CXX compiler ABI info
    -- Detecting CXX compiler ABI info - done
    -- Detecting CXX compile features
    -- Detecting CXX compile features - done
    -- Performing Test COMPILER_SUPPORTS_WPEDANTIC
    -- Performing Test COMPILER_SUPPORTS_WPEDANTIC - Success
    -- Looking for dotprod in FEC
    -- Looking for dotprod in FEC - not found
    -- Performing Test HAVE_SSE
    -- Performing Test HAVE_SSE - Failed
    -- Found PkgConfig: /usr/bin/pkg-config (found version "0.29.1")
    -- Checking for module 'glfw3'
    -- Found glfw3, version 3.3.2
    -- Found OpenGL: /usr/lib/x86_64-linux-gnu/libOpenGL.so
    -- Checking for module 'fftw3f'
    -- Found fftw3f, version 3.3.8
    -- Checking for module 'volk'
    -- Found volk, version 2.2
    -- Checking for module 'libzstd'
    -- No package 'libzstd' found
    CMake Error at /usr/share/cmake-3.16/Modules/FindPkgConfig.cmake:463 (message):
    A required package was not found
    Call Stack (most recent call first):
    /usr/share/cmake-3.16/Modules/FindPkgConfig.cmake:643 (_pkg_check_modules_internal)
    core/CMakeLists.txt:127 (pkg_check_modules)


    -- Configuring incomplete, errors occurred!
    See also "/home/bob/SDRPlusPlus/build/CMakeFiles/CMakeOutput.log".
    See also "/home/bob/SDRPlusPlus/build/CMakeFiles/CMakeError.log".

    ReplyDelete

Post a Comment

Popular posts from this blog

Setting up a PI-Star MMDVM hotspot node with a Raspberry PI

 The first thing is to download the Pi-Star software from https://www.pistar.uk/downloads/ , at time of writing the current version is Pi-Star_RPi_V4.1.5_21-Jun-2021.zip ,but you should get the latest available. I used a Raspberry PI 3B but it is possible to use a PI Zero W or other model. You should then use either Etcher, or the Raspberry Pi imager to copy the image to your SD card, which should be at least 4GB and Class 10 or better, I used a 16GB simply because they are available for little money these days. Simply put the SD card into your PI and attach a monitor and keyboard via USB connection. The PI should boot with the usual rainbow screen, the default login is pi-star and the password raspberry. We will change these soon. To find out what IP address your pi is on type ifconfig and hit return. If you are connected via ethernet you will be able to type http://pi-star.local into a browser and access the dashboard as below - This will redirect after 10 seconds and you will be pre

Baofeng UV-S9 - a practical user guide

Having bought one of these transceivers recently I was firstly disappointed in the User Manual, it is in extremely small print, barely 4 point and my first searches online brought a pdf of the same manual scanned badly which was not much of an improvement. Also it is a reference guide rather than a how-to. I think many people would prefer to learn how to use the radio as well as which buttons to press with context. I am only covering the basics as I think once you know those then you will figure out the rest using the two manuals I have linked to below. So here we go! The Baofeng UV-S9 Transceiver, around £25 on Ebay Caution, two things are very important to know before we begin. Firstly it is illegal to transmit on any band that you do not hold a license for. You must check with your licencing authority, which in the UK is Ofcom https://www.ofcom.org.uk. PMR446 is not currently legal for a radio which does not have a fixed antenna and it is illegal to use a Baofeng for this purpose. A

Xiegu G1M - FT8 and CAT control imcompatibility

 So, having set up WSJT-X and made up cables for the Xiegu G1M I did manage to make a couple of contacts, well four to be exact I had difficulty keeping Transmit mode open and there was some weird VFO A-B switching and delays happening. I was starting to get pissed off.  I had been using the WSJT-X config set up Icom IC-7000 and IC-765 Pro as other people where doing the same, not very satisfactory and very frustrating. After much digging I managed to find out more info on the Xiegu forum at https://groups.io/g/XIEGU-G1M/message/461 . Seems that FLRIG was more suitable that the built in controller in WSJT-X, so I downloaded it from  http://www.w1hkj.com/  and installed it prior to running WSJT-X. After an hour or more of trying other peoples recommendations of Icoms and other rigs I started afresh. To control a Xiegu we need Xiegu thinking. Of course the G1M isn't listed in the devices yet, but the G90 is. Surely we could make that work as most manufacturers use a specific chip in