GNU RADIO 3.9 – Osmocom – Soapy SDR
RTL-SDR – HackRF – Adalm-Pluto – RSP1 – RSP1A – SA818

Below is the detailed procedure for installing Remote SDR in version 5 on a Raspberry Pi 4 B (2Go) or an Orange Pi Zero 2. It is adaptable for other ‘Single Board Computer’ boards if they have the computing power needed like the Raspberry Pi4.
Please note that this procedure is long and complex. If possible, it is best to use an SD card image available for the Raspberry 4B and orange pi Zero 2.
Sources and images will be available on Githubhttps://github.com/F1ATB/Remote-SDR

Version 5 of Remote SDR is built around the OS Armbian (Bullseye) for the Orange Pi Zero 2 and Raspberry OS (Bullseye) for the Raspberry 4B. GNU Radio dedicated to signal processing is now in version 3.9. Manual installation takes several hours. To date, March 2022, you have to go through a compilation of many source software and especially GNU-Radio 3.9. Binary packages are not yet available.

Installing Linux System
Before installing the radio signal processing, the basic operating system must be installed. The procedure is detailed here:

Download the Linux operating system for ARM processors, Armbian Bullseye from armbian.com for the Orange pi zero 2 and load it onto a microSD card.
Obtain the IP address and connect in SSH.

The Raspberry Pi OS in Bullseye version can be downloaded from the Raspberry website. Choose the version with Desktop only.
- Make a raspi-config in a terminal or go to the settings to activate SSH access and VNC access.
- Configure Samba if you want to access files from your Windows PC rather than SSH.
Node JS Installation
In previous versions of Remote SDR, an Apache server served web pages. Since version 5, a web server based on Node JS is used.
Switch to root if necessary with:
sudo su
Download version 16 or more recent of Node JS then launch the installation.
curl -sL https://deb.nodesource.com/setup_16.x | bash -
apt-get install -y nodejs
Reboot the system.
For a first installation to create a project, several add-ons are needed to manage dynamic web pages and network communications. For Remote SDR, create a remsdr folder at the root and give it all rights first. Go to the project folder:
cd /remsdr
If you copy an existing project, you can skip this step
npm install html
npm install https
npm install ejs
npm install express
npm install jquery
npm install socket.io
npm install net
npm install fs
npm install cors
npm install xmlrpc
npm install onoff
npm install dgram
Generation of a security certificate
For Remote SDR, in order to access the microphone of the client PC, you must access the web server on the Raspbery/Orange pi in https. In previous versions of Remote SDR, an override was implemented. Here we will put a self-signed security certificate that will facilitate access to the microphone.
Open SSL must be installed on your system. It allows the generation of a security certificate in order to access your site in https. Run the following command:
openssl req -x509 -nodes -days 365 -newkey rsa:4096 -keyout selfsigned.key -out selfsigned.crt
These files will be called by the web server (Radio_Server.js) made with node js.
Below is a snippet of the code:
const http = require('http');
const https = require('https');
var httpserver = http.createServer(app);
const fs = require('fs');
const options = {
key: fs.readFileSync('selfsigned.key'),
cert: fs.readFileSync('selfsigned.crt')};
--_ Your Project ---
httpserver.listen(80);
https.createServer(options, app).listen(443);
GNU Radio Companion Installation
GNU Radio is a very powerful tool for modeling signal processing chains. GNU Radio Companion is a complementary tool allowing to build radio processing chains graphically without writing a line of code. We will install version 3.9 from sources knowing that the binary package currently available is version 3.8 only. This version 3.9 will allow us to add to Remote SDR, the SDRs of the SDR play family such as the RSP1 and RSP1A which cover the HF radio amateur bands with a dynamic range of 12 to 14 bits.
In the case of an Orange Pi Zero 2 having only 1GB of memory, the compilation of the Gnuradio Source is impossible. The system will access the swap memory on the SD card which is only 482MB and it is not enough. You can control with the command:swapon --show
With the htop command, you can view swap usage in real time.
You can add 4GB back and then return to the original system value after the compilation is complete. I used the following tutorial:
https://linuxize.com/post/how-to-add-swap-space-on-debian-9/
In the case of the Raspberry 4B, 2GB of memory is sufficient. There is no access to swap.
Installation of libraries
You need to update your system:apt-get update
apt-get upgrade
then add the following libraries:
apt install git cmake g++ libboost-all-dev libgmp-dev swig python3-numpy
python3-mako python3-sphinx python3-lxml doxygen libfftw3-dev
libsdl1.2-dev libgsl-dev libqwt-qt5-dev libqt5opengl5-dev python3-pyqt5
liblog4cpp5-dev libzmq3-dev python3-yaml python3-click python3-click-plugins
python3-zmq python3-scipy python3-gi python3-gi-cairo gir1.2-gtk-3.0
libcodec2-dev libgsm1-dev
Some of these libraries may already be available on your system.
apt install pybind11-dev python3-matplotlib libsndfile1-dev
python3-pip libsoapysdr-dev soapysdr-tools
pip install pygccxml
pip install pyqtgraph
VOLK Installation
VOLK is a library of kernels optimized for vector processing. It contains cores of hand-written SIMD (Single Instruction Multiple Data) code to optimize various mathematical operations. Its installation must be done before Gnu Radio.
Get into the folder ~/Downloads#
git clone --recursive https://github.com/gnuradio/volk.git
cd volk
mkdir build
cd build
cmake -DCMAKE_BUILD_TYPE=Release -DPYTHON_EXECUTABLE=/usr/bin/python3 ../
make
make test
make install
ldconfig
Installing Gnu Radio 3.9
Get into the folder ~/Downloads#
cd
git clone https://github.com/gnuradio/gnuradio.git
cd gnuradio
Force install version 3.9
git checkout maint-3.9
mkdir build
cd build
cmake -DCMAKE_BUILD_TYPE=Release -DPYTHON_EXECUTABLE=/usr/bin/python3 ../
The compilation will take hours. We use 3 cores (-j3) out of the 4 available to save some power to monitor the process.
– make -j3
Then we run tests with probably some unimportant errors.
– make test
– make install
– ldconfig
At this stage, it is possible to optimize the treatment by running Volk or postponing it until later.
–volk_profile

For the Orange Pi, install LXTerminal
apt install lxterminal
Add to the configuration file /etc/gnuradio/conf.d/grc.conf or /usr/local/etc/gnuradio/conf.d/grc.conf dans la section [grc]
[grc]
xterm_executable = /usr/bin/lxterminal

At this point, too, you can give GNU-Radio a try. Switch to graphical mode using VNC (e.g. use VNC Viewer for windows) if you are remote. Port 5901 for Orange Pi.
Launch ‘Gnu Radio Companion’, it’s a fantastic graphical tool for creating signal processing chains. Examples can be found in /usr/share/gnuradio/examples or /usr/local/share/gnuradio/examples/
Installing SDR Drivers
Depending on the SDR models you want to use, you must install the corresponding drivers or install them all to be universal. In addition, to facilitate interfacing with GNU-Radio, you need blocks like SoapySDR (neutral SDR support library) or Osmocom (Open source mobile communications).
Installation of the Soapysdr library
Install the following libraries:apt-get install libpython3-dev python3-numpy swig
Do not install version 0.8 of SopySDR, because the installation of additional libraries for SDRs only works with version 0.7
Don’t install git clone https://github.com/pothosware/SoapySDR.git
Go to the Tags folder on the SoapySDR github( https://github.com/pothosware/SoapySDR/tags ) and download the zip of soapy-sdr-07.2
Go to the SoapySDR folder.
mkdir build
cd build
cmake ..
make -j4
sudo make install
ldconfig
At this point, you can see which SDR drivers are detected with the command:SoapySDRUtil --info
You still can’t find any SDR model on the ‘Available factories’ line but check the search for drivers in the modules0.7 subfolder and not modules0.8
Installing drivers for RTL-SDR

The best known SDR that is found under different brands is the RTL-SDR. The V3 version can even work below 28MHz with degraded performance.
Installing the USB Library and Compiler Tool:
apt-get install build-essential libusb-1.0-0-
devapt-get install pkg-config
We clone rtl-sdr from Osmocom in the folder ~/Downloads# : git clone https://github.com/osmocom/rtl-sdr.git
Go to the rtl-sdr folder and chain the commands:
cd rtl-sdr
mkdir build
cd build
cmake ../ -DINSTALL_UDEV_RULES=ON -DDETACH_KERNEL_DRIVER=ON
make
make install
ldconfig
Install the development library:apt-get install rtl-sdr librtlsdr-dev
then clone to the Downloads folder:
git clone https://github.com/pothosware/SoapyRTLSDR.git
cd SoapyRTLSDR
mkdir build
cd build
cmake ..
make
make install
ldconfig
The command :SoapySDRUtil --find
allows you to list the SDRs connected to your Orange or Raspberry Pi card.
The command:SoapySDRUtil --probe="driver=rtlsdr"
gives all the details on the RTL-SDR connected via USB.
Similarly with an RTL-SDR on the USB port we get information by typing: rtl_eeprom
orrtl_eeprom -h
Installing drivers for HackRF One

A first package allows the control of the HackRF One.
apt install hackrf
By plugging a HackRF One into the USB port of the Orange/Raspberry PI, you can check its presence by installing the hackrf package and typing in a terminal:hackrf_info
To interface with SoapySDR, go to the Downloads folder and type the following commands:apt-get install libhackrf-dev
git clone https://github.com/pothosware/SoapyHackRF.git
cd SoapyHackRF
mkdir build
cd build
cmake ..
make
sudo make install
ldconfig
For details on HackRF features, type in a terminal:
SoapySDRUtil --probe="driver=hackrf"
Installing DRIVERS FOR Adalm-Pluto
The Adalm-Pluto is an interesting solution capable of working in Full-Duplex (simultaneous reception and transmission) in a frequency band between 325 MHz to 3.8 GHz. It is possible to extend the frequency range of the Pluto from 70MHz to 6GHz. This is described in the following article: https://f1atb.fr/index.php/2021/03/09/frequency-extension-of-pluto-sdr/

The Pluto interfaces via the USB port which behaves like an ethernet port. It should not be powered by the USB port of the Orange/raspberry Pi, because there are cuts in the connection. In addition, add an external 5V2A power supply. The Pluto has a micro USB input to power it.
Verify that the following modules are present with:
lsmod. They are absent with some versions of Armbian / Debian.
- cdc_acm,cdc_ether
- rndis_host
- rndis_wlan
- usbnet
If a module is missing type:
modprobe « nom du module »
modprobe adds the modules with their dependencies, so by adding for example cdc_ether, usbnet will also be added. After each installation do an lsmod to check.
With the orange pi zero 2, these modules are not all available on the Armbian os, but this does not seem to disturb the operation. Missing cdc_ether and usbnet. Likewise with the Rasopberry Pi 4, usbnet is missing.
As recommended on the Analog Device site, add to the folder
/etc/udev/rules.d/
lthe rules file: 53-adi-plutosdr-usb.rules given below. Done :
nano /etc/udev/rules.d/53-adi-plutosdr-usb.rules
# allow "plugdev" group read/write access to ADI PlutoSDR devices
# DFU Device
SUBSYSTEM=="usb", ATTRS{idVendor}=="0456", ATTRS{idProduct}=="b674", MODE="0664", GROUP="plugdev"
SUBSYSTEM=="usb", ATTRS{idVendor}=="2fa2", ATTRS{idProduct}=="5a32", MODE="0664", GROUP="plugdev"
# SDR Device
SUBSYSTEM=="usb", ATTRS{idVendor}=="0456", ATTRS{idProduct}=="b673", MODE="0664", GROUP="plugdev"
SUBSYSTEM=="usb", ATTRS{idVendor}=="2fa2", ATTRS{idProduct}=="5a02", MODE="0664", GROUP="plugdev"
# tell the ModemManager (part of the NetworkManager suite) that the device is not a modem,
# and don't send AT commands to it
SUBSYSTEM=="usb", ATTRS{idVendor}=="0456", ATTRS{idProduct}=="b673", ENV{ID_MM_DEVICE_IGNORE}="1"
SUBSYSTEM=="usb", ATTRS{idVendor}=="2fa2", ATTRS{idProduct}=="5a02", ENV{ID_MM_DEVICE_IGNORE}="1"
To make Adalm-Pluto work with GNU Radio, you need to install the following packages:
apt-get install gr-iio
apt-get install libiio-utils
apt-get install gqrx-sdr
Once the installation is done you can check access to Pluto with the command:

ssh root@192.168.2.1
The Pluto connects physically by USB, but is accessible by ssh via an IP address 192.168.2.1. The password is ‘analog’.
To remotely access the Pluto, you must add the paramiko package.apt-get install python3-paramiko

To test the interface with the Adalm-Pluto, verify that it is visible in the list of USB-connected devices by typing in a terminal: lsusb

To interface with SoapySDR, install:apt install libiio-dev libad9361-dev libspdlog-dev python3-packaging
Go to the Downloads folder and type the following commands:git clone https://github.com/pothosware/SoapyPlutoSDR
cd SoapyPlutoSDR
mkdir build
cd build
cmake ..
make
sudo make install
ldconfig
To know all the details about an Adalm-Pluto connected via USB, type:SoapySDRUtil --probe="driver=plutosdr"
Installing DRIVERS FOR SDRPLAY: RSP1 and RSP1A

The SDRplay brand SDR family is interesting for covering the low HF radio amateur bands, not covered separately by the Pluto or partially by the RTL-SDR keys. In addition, they offer 12 or 14 bit dynamics. For less than 30€ in China, you can find equivalents to the RSP1.
You have to go to the sdrplay.com site and go to the pages dedicated to downloading.

For the Orange Pi Zero2, you must download the API v3
SDRplay_RSP_API-ARM64-3.07.1.run
With a chmod 755 SDR… command make the file executable then:sh SDRplay_RSP_API-ARM64-3.07.1.run

The 64-bit version of ‘Orange Pi Zero2 does not work for the Raspberry Pi4. This will be the 32 bit version SDRplay_RSP_API-ARM32-3.07.2.run. It offers an installation script in a zip.
Unzip everything and make the script executable, then:
sh 1installAPI.sh
Answer Y to the license then reboot the Orange/Raspberry Pi.
To interface with SoapySDR, go to the Downloads folder and type the following commands:git clone https://github.com/pothosware/SoapySDRPlay3
cd SoapySDRPlay3
mkdir build
cd build
cmake ..
make
make install
ldconfig
To know all the details about a SdrPlay connected via USB, type:SoapySDRUtil --probe="driver=sdrplay"
Arrive at this point, you have the whole list of SDRs addressable by SoapySDR with the command:SoapySDRUtil --info
Modification for RSP2
To date (September 2022), I do not have an RSP2. By taking remote control of an OM’s Raspberry PI4 with an RSP2, I was able to make Remote SDR work by modifying a variable in the GNU-RADIO application file /remsdr/PY/RX_SdrPlay_sanw_v5.grc. This is the name of the antenna.

I was not able to investigate deeply and verify all the system.
Serial Interface Installation for SA818

The SA818 module makes it possible to transmit in VHF or UHF in NBFM with a power of 1w. It is not an SDR but it is practical to make a small transmitter that can be controlled remotely by Remote SDR. It interfaces to the Orange Pi Zero 2 through the UART5 serial port and the ‘Line Out’ analog audio output. You need to install the serial port access python library:
pip3 install pyserial-asyncio
Install gr-osmocom block for Gnu Radio
Optional installation if you want to use Osmocom in Gnu Radio
To interface an SDR in Gnu Radio with Osmocom, you must install gr-osmocom. Go to the Downloads folder then the commands:git clone git://git.osmocom.org/gr-osmosdr
cd gr-osmosdr/
mkdir build
cd build/
cmake ../
Read the output of cmake carefully to identify which drivers were found and which were not. Correct if necessary.
######################################################
— # Gnuradio enabled components
— ######################################################
— * Python support
— * IQ File Source & Sink
— * Osmocom RTLSDR
— * RTLSDR TCP Client
— * HackRF & rad1o Badge
— * RFSPACE Receivers
— * SoapySDR support
— * Red Pitaya SDR
Pluto and SDRplay are not in the list. We will use SoapySDR to interface with the RSP1, RSP1A and Pluto.
Then start the compilation:make
make install
ldconfig
Now the Osmocom block appears in GNU-Radio Companion.
Install Remote SDR files
Copy the Remote SDR source files to the /remsdr folder but do not modify the existing folders and files following the installation of the above packages. Namely: node_modules, package-lock.json and package.json.
The same is true for the 2 security certificate files.
All the files needed to run Remote SDR should be installed in the /remsdr folder. At first to facilitate the transfer from the source downloaded on Github to the Orange/Raspberry Pi, it is better to give all permissions to the .chmod -R 777 /remsdr
Once everything is operational, access rights can be limited to what is strictly necessary.
Launching Remote SDR

If you are using an Adalm-Pluto, only one Orange PI Zero 2 or one Raspberry Pi4 is needed.
If you use a HackRF in transmission and a hackRF in reception you will need 2 Orange Pi Zero 2 with the same configuration or a single Raspberry Pi 4.
To launch the web server(s), go to the /remsdr folder and type:
node Radio_Server.js
From a client PC you connect to the Orange/Raspberry PI dedicated to the reception at the address:
https://192.168.xx.xx
Note that the exchanges are done in https on the usual port 443. Everything is exchanged via this port. Ports 8001 to 8005 are used more like in previous versions of Remote SDR.
However, since version v3 of Remote SDR, it is possible to interface with Gpredict via port 8006 for the receiver and 8007 for the transmitter.
Since version v4.3 of Remote SDR, it is possible to interface with VSPE / Omnirig via port 8008 which allows dialogue with other software such as WSJT-X.
Launch at boot
For an automatic launch at boot of the Orange/Raspberry Pi, open the crontab file:
crontab -e
At the bottom of the page add the following line:
@reboot /usr/bin/node /remsdr/Radio_Server.js
Now, following a reboot, the “Radio_Server.js” server should start automatically.
Software architecture
