Installing SDRangel for the SDRplay RSP1A and HackRF on a Raspberry Pi
SDRangel is an Open Source Qt5 / OpenGL 3.0+ SDR and signal analyzer frontend
to various hardware. There are many analog and digital plugins. Transmit is
supported on devices with that capability.
This document will guide you through installing SDRangel on the platform built in
the Installing drivers and support for the SDRplay RSP1A on a Raspberry Pi document
for your operating system and depends on that installation. This should work for
the 64 bit version also.
This procedure is based on
https://github.com/f4exb/sdrangel/wiki/Compile-from-source-in-Linux.
The documentation is on the wiki:
https://github.com/f4exb/sdrangel/wiki.
Install:
- SDRangel
- Prerequisites
Most of the SDRangel requisites should be installed by now. We just
need to add a few. The packager will install many additional packages.
Install this for all OS versions:
sudo apt-get install libopencv-dev libxml2-dev libavcodec-dev libavformat-dev graphviz bison flex ffmpeg libopus-dev libfaad-dev libqt5webengine5 qtwebengine5-dev qtbase5-private-dev libqt5svg5-dev libhidapi-dev libsamplerate0-dev libqt5gamepad5-dev libtool libflac-dev zlib1g-dev libasound2-dev zlib1g zlib1g-dev
- Text to speech (optional)
Install the espeak engine with a "dispatcher" and Qt 5
support.
sudo apt install espeak libespeak1 speech-dispatcher-espeak libqt5texttospeech5 libqt5texttospeech5-dev qtbase5-dev qtdeclarative5-dev qtspeech5-speechd-plugin
- Make the installation directories and assign ownership. Change the
user (pi) to your user name in the lines below.
For DietPi, the
default user is dietpi.
Assuming that you are the default Raspberry Pi OS user (pi):
sudo mkdir -p /opt/build
sudo chown pi:users /opt/build
sudo mkdir -p /opt/install
sudo chown pi:users /opt/install
- Install required dependencies.
I have removed
devices other than SDRplay and HackRF. We will use the previously installed hardware support. There is a new SDRplayV3 plugin
built into the application. The SDRplay Mirics driver does not work for
the RSP1A and has not been included.
mkdir -p ~/SDRangel
#APT
#Aptdec is a FOSS program that decodes images transmitted by NOAA weather satellites.
cd ~/SDRangel
git clone https://github.com/srcejon/aptdec.git
cd aptdec
git checkout libaptdec
git submodule update --init --recursive
mkdir build; cd build
cmake -Wno-dev -DCMAKE_INSTALL_PREFIX=/opt/install/aptdec ..
make -j $(nproc) install
#CM265cc
cd ~/SDRangel
git clone https://github.com/f4exb/cm256cc.git
cd cm256cc
git reset --hard 6f4a51802f5f302577d6d270a9fc0cb7a1ee28ef
mkdir build; cd build
cmake -Wno-dev -DCMAKE_INSTALL_PREFIX=/opt/install/cm256cc ..
make -j $(nproc) install
#LibDAB
cd ~/SDRangel
git clone https://github.com/srcejon/dab-cmdline
cd dab-cmdline/library
git checkout msvc
mkdir build; cd build
cmake -Wno-dev -DCMAKE_INSTALL_PREFIX=/opt/install/libdab ..
make -j $(nproc) install
#MBElib
# If MBELIB is already installed, please skip this step.
cd ~/
git clone https://github.com/szechyjs/mbelib.git
cd mbelib
mkdir build; cd build
cmake ..
make -j $(nproc)
sudo make install
#SerialDV
cd ~/SDRangel
git clone https://github.com/f4exb/serialDV.git
cd serialDV
git reset --hard "v1.1.4"
mkdir build; cd build
cmake -Wno-dev -DCMAKE_INSTALL_PREFIX=/opt/install/serialdv ..
make -j $(nproc) install
#DSDcc
cd ~/SDRangel
git clone https://github.com/f4exb/dsdcc.git
cd dsdcc
git reset --hard "v1.9.5"
mkdir build; cd build
cmake -Wno-dev -DCMAKE_INSTALL_PREFIX=/opt/install/dsdcc -DUSE_MBELIB=ON -DLIBSERIALDV_INCLUDE_DIR=/opt/install/serialdv/include/serialdv -DLIBSERIALDV_LIBRARY=/opt/install/serialdv/lib/libserialdv.so ..
make -j $(nproc) install
#Codec2/FreeDV
# If codec2/freedv is already installed, please skip this step.
cd ~/
git clone https://github.com/drowe67/codec2.git
cd codec2
mkdir build
cd build
cmake ..
make -j $(nproc)
sudo make install
# manually install freedv_rx since it's not part of the default install package
sudo install -m 0755 src/freedv_rx /usr/local/bin
sudo install -m 0755 src/freedv_tx /usr/local/bin
cd ../..
sudo ldconfig
#SGP4
cd ~/SDRangel
git clone https://github.com/dnwrnr/sgp4.git
cd sgp4
mkdir build; cd build
cmake -Wno-dev -DCMAKE_INSTALL_PREFIX=/opt/install/sgp4 ..
make -j $(nproc) install
#LibSigMF
cd ~/SDRangel
git clone https://github.com/f4exb/libsigmf.git
cd libsigmf
git checkout "new-namespaces"
mkdir build; cd build
cmake -Wno-dev -DCMAKE_INSTALL_PREFIX=/opt/install/libsigmf ..
make -j $(nproc) install
#GGMorse
cd ~/SDRangel
git clone https://github.com/ggerganov/ggmorse.git
cd ggmorse
mkdir build; cd build
cmake -Wno-dev -DCMAKE_INSTALL_PREFIX=/opt/install/ggmorse -DGGMORSE_BUILD_TESTS=OFF -DGGMORSE_BUILD_EXAMPLES=OFF ..
make -j $(nproc) install
sudo ldconfig
- Install SDRangel
cd ~/SDRangel
git clone https://github.com/f4exb/sdrangel.git
cd sdrangel
mkdir build; cd build
cmake -Wno-dev -DDEBUG_OUTPUT=ON -DRX_SAMPLE_24BIT=ON \
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
-DHACKRF_DIR=/usr/local \
-DRTLSDR_DIR=/usr/lib/aarch64-linux-gnu \
-DSOAPYSDR_DIR=/usr/local \
-DUHD_DIR=/usr/local \
-DAPT_DIR=/opt/install/aptdec \
-DCM256CC_DIR=/opt/install/cm256cc \
-DDSDCC_DIR=/opt/install/dsdcc \
-DSERIALDV_DIR=/opt/install/serialdv \
-DSGP4_DIR=/opt/install/sgp4 \
-DLIBSIGMF_DIR=/opt/install/libsigmf \
-DDAB_DIR=/opt/install/libdab \
-DGGMORSE_DIR=/opt/install/ggmorse \
-DCMAKE_INSTALL_PREFIX=/opt/install/sdrangel ..
make -j4 install
sudo ldconfig
- Generate a new fftw wisdom file to speed up the SDRangel startup
time. This will take a long time, but it will save you from doing this
every time you start SDRangel
- Execute these commands in a terminal:
cd ~/.config/
# If you have not run SDRangel yet, create the settings directory.
mkdir f4exb
cd f4exb
# Generate a new wisdom file for FFT sizes: 128, 256, 512, 1024, 2048, 4096, 8192, 16384 and 32768.
# This will take a very long time.
fftwf-wisdom -n -o fftw-wisdom 128 256 512 1024 2048 4096 8192 16384 32768
- To run SDRangel, type /opt/install/sdrangel/bin/sdrangel --soapy --fftwf-wisdom ~/.config/f4exb/fftw-wisdom at the command prompt and press enter.
- Usage
- For help setting up SDRangel, please visit:
https://github.com/f4exb/sdrangel/wiki/Quick-start
- To add an SDR device, click the Add RX device icon on the left side,
in the top bar just to the right of W0 (Workspace 0).
Select your SDR from the list and then click "OK" in the dialog.
- Add a Channel.
Near the top, in the Demodulator panel, click the icon
just to the left of the SDR device name.
Select the desired demodulator from the combo
list and press the Apply button to add the channel to the passband. More
than 1 channel can be added and active at the same time.
When you are
done, click the Close button.
To start streaming,
press the play button in the device panel.
- To slow the waterfall display, in the Spectrum Display on the left, change Averaging
type to Fix or Max. Increase the
number of averaging samples to achieve the desired speed. Increase
Spectrum maximum FPS until the display is smooth. Increasing the FFT
size will improve the display resolution.
- By default, the RTL-SDR has a decimation (Dec) value of 16. That
leaves a very narrow bandwidth. I suggest that you change it to a lower
number such as 1.
- Click here for help
setting up special digital features.
- To set up transmitting,
From the DeviceSets menu, select Add sink
device set.
Ensure that the desired transmit channel tab is selected
on the right. (T1)
Move on to the channels panel and click on the
circled plus icon.
Select the desired modulator from the list and
click Apply.
When you are done adding modulators, close the dialog
with the Close button.
- In the device panel, select the desired transmit channel tab on the
top. (T1)
To add an SDR device, change the device with the change
device icon in the top bar of the device panel. It looks like a double
arrow.
Select your SDR from the list and then click "OK" in the
dialog.
If the transmit frequency is out of the bandpass of the
receiver, it will not be able to receive a signal..
- Click on the microphone icon in the transmit channels window to
enable the sound input. Right-click on it to select the input device.
In the device panel on the left, the Blue triangle icon means that the
device is ready and can be started.
Click it to start transmitting.
Adjust the gain controls until you have sufficient transmit power.
- voxangel v 1.1
A simple pyAudio-based VOX utility for SDRangel
- Download the script package from
https://gitlab.wibisono.or.id/published/voxangel
- From the download menu to the left of the Clone button, click one of the archive formats under Download source code
- Save and extract it in ~/SDRangel.
- Instructions are in ~/SDRangel/voxangel-master/README
- The command line syntax is:
python voxangel.py <Tx_device>
[<Rx_device> <mode> <level> <delay_in_ms> <channel> <host> <port>]
- Start the script with this command:
~/SDRangel/voxangel_1.1/voxangel.py 1 0 0 5 1100
It will have a 1100 ms
shut-off delay. By default it will monitor an input, typically the microphone if you have one.
- Set up a WSJT-X transceiver with SDRangel on a HackRF. These
instructions are for FT8.
- Prerequisites
- First, start two virtual audio channels, one for receive and one for
transmit.
pactl load-module module-null-sink sink_name=VirtualRx format=s16le channels=2 rate=48000 sink_properties=device.description="VirtualRx"
pactl load-module module-null-sink sink_name=VirtualTx format=s16le channels=2 rate=48000 sink_properties=device.description="VirtualTx"
- Start WSJT-X from the applications >Sound & Video menu
- Start SDRangel
/opt/install/sdrangel/bin/sdrangel --soapy --fftwf-wisdom ~/.config/f4exb/fftw-wisdom
- Add an SDR device, baseband channel and SSB demodulator. Set it up
for upper sideband. Low cut should be 0.1k, Hi cut 3.0k.
- Add a sink device set, an SDR device, baseband channel and SSB modulator.
Set it up for upper sideband. Low cut should be 0.1k, Hi cut 3.0k.
- Set the desired SDR device frequencies for receiver and transmitter.
It is best to offset the frequency by about 50 KHz to compensate for
HackRF's zero spike. Add that amount to the demodulator and modulator
shift.
- In WSJT-X File>settings..., click the Audio tab. For Soundcard
Input: select VirtualRx.monitor.
For Soundcard Input: select
VirtualRx. Click OK.
- In SDRangel, click on the microphone icon in the transmit channels window to enable the sound input.
Right-click on the demodulator speaker icon and select
"System default device".
Right-click on the modulator microphone icon
and select "System default device".
Start the receiver.
- In Audio Volume control Playback tab, set
QtPulseAudio:****:QtmPulseStream-****-******** on VirtualRx. (the one
with receiver signal in the VU meter)
- In Pulse Audio Volume control Recording tab, set
QtPulseAudio:****:QtmPulseStream-****-******* from VirtualRx. (the one
with receiver signal in the VU meter)
- Start the transmitter. Make sure that it is connected to an
acceptable antenna!
In WSJT-X, click Tune
In Audio Volume
control Playback tab, set QtPulseAudio:****:QtmPulseStream-****-*******
on VirtualTx (the strong steady signal)
- In Pulse Audio Volume control Recording tab, set
QtPulseAudio:****:QtmPulseStream-****-******** from VirtualTx (the
strong steady signal)
- Stop the transmitter and click Tune in WSJT-X to turn it off.
- Start voxangel
~/SDRangel/voxangel_1.1/voxangel.py 1 0 0 5 1100
- In Pulse Audio Volume control Recording tab, set "ALSA plug-in
[python2.7]: ALSA capture from" to VirtualTx
- Set WSJT-X to work FT8. When it transmits, SDRangel should switch to
transmit. It should switch back to receive 1.1 seconds after WSJT-X
stops. This time was chosen because the transmit buffer would not empty
before that time. The remainder will be prepended to the next
transmission. You will need to adjust the gain controls to get the best
receive signal and transmit power.
- Note: It appears that the receiver and transmitter will only work
optimally if they are set to the same frequency and offset. There are
times when having the same sample rate is best, however, the receiver
works well at a 4 MHz sample rate. Transmit works well at a
sample rate of 4000 Ks/s and Interp 32. Higher sample rates have lower
latency, but watch out for dropouts.
Back to the index