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.
sudo apt-get install libopencv-dev libxml2-dev libavcodec-dev libavformat-dev graphviz bison flex ffmpeg libopus-dev libfaad-dev
- Make the installation directories and assign ownership.
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 previosly 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
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 c0e92b92aca3d1d36c990b642b937c64d363c559
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
cd ~/SDRangel
git clone https://github.com/szechyjs/mbelib.git
cd mbelib
git reset --hard 9a04ed5c78176a9965f3d43f7aa1b1f5330e771f
mkdir build; cd build
cmake -Wno-dev -DCMAKE_INSTALL_PREFIX=/opt/install/mbelib ..
make -j $(nproc) 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.3"
mkdir build; cd build
cmake -Wno-dev -DCMAKE_INSTALL_PREFIX=/opt/install/dsdcc -DUSE_MBELIB=ON -DLIBMBE_INCLUDE_DIR=/opt/install/mbelib/include -DLIBMBE_LIBRARY=/opt/install/mbelib/lib/libmbe.so -DLIBSERIALDV_INCLUDE_DIR=/opt/install/serialdv/include/serialdv -DLIBSERIALDV_LIBRARY=/opt/install/serialdv/lib/libserialdv.so ..
make -j $(nproc) install
sudo apt-get install libsamplerate0-dev
#Codec2/FreeDV
# Codec2 is already installed from the packager, but this version is required for SDRangel.
cd ~/SDRangel
git clone https://github.com/drowe67/codec2.git
cd codec2
git reset --hard 76a20416d715ee06f8b36a9953506876689a3bd2
mkdir build_linux; cd build_linux
cmake -Wno-dev -DCMAKE_INSTALL_PREFIX=/opt/install/codec2 ..
make -j $(nproc) install
#SGP4
# python-sgp4 1.4-1 is available in the packager, installing this version just to be sure.
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
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 \
-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 \
-DMBE_DIR=/opt/install/mbelib \
-DCODEC2_DIR=/opt/install/codec2 \
-DSGP4_DIR=/opt/install/sgp4 \
-DLIBSIGMF_DIR=/opt/install/libsigmf \
-DDAB_DIR=/opt/install/libdab \
-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 --fftwf-wisdom ~/.config/f4exb/fftw-wisdom at the command prompt and press enter.
- 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.
- Add a baseband channel. Move on to the channels panel and click on
the circled plus icon.
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, close the dialog with the Close button.
To start streaming,
press the "play" button in the device panel.
- To slow the waterfall display, in the Spectrum Display near the
lower left, change Averaging mode to something like Max. Increase the
number of averaging samples to achieve the desired speed. Increase
Spactrum maximum FPS until the diplay is smooth. Increasing the FFT size
will improve the display resolution. I suggest that you stop the SDR
while changing this as SDRangel may freeze for a minute or so the first
time you select it.
- 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. I will set it up 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 --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