Multiband SDR with remote receivers
In past I assembled small SDR receiver based on Raspberry Pi and SDR USB dongle based on software developed by PA3FWM. The problem was with limited usability by multiple clients connected to the Raspberry pi at the same time. The old SDR was retired and put aside for few years.
Then András Retzler ha7ilm developed (and stopped developing) OpenWebRx, which was the base for now regulry maintained and further developed OpenWebRx.de.
I recently built homelab server based on “proper” server infrastructure with plenty of RAM and lots of processing cores. I decided to setup OpenWebRx in one linux virtual machine with raspberry pi only as remote receivers serving single user (server itself).
For start please visit the web page with this SDR receiver:
Open many receivers…
Usually, the Web SDRs will show some error like:
This is what I would like to avoid and let as much users as possible connecting to the service.
What is needed
- Some machine based on linux (own homelab server or remote)
- at leat one raspberry pi, rpi 4, 8G RAM can handle 4 receivers
- at least one SDR USB dongle based on RTL2832U & R820T2 with TCXO
- Receiving antenna
- Transverter for HF bands
- Splitter for mutiple bands
- Power supply
- Accessories (USB extensions, housings, SMA pigtails, …)
The architecture
This article covers setup based on USB RTLSD dongle(s) plugged in raspberry pi close to antenna. The R.pi feeds complete receiver bandwidth to OpenWebRx server via network. The raspberry is off-loaded from serving multiple users. The server hardware is located in another place with more suitable environment, while raspberry pi can be placed very close to antenna. Another advantage is when the lightning strikes near or directly into antenna, there will be less damage. I recommend placing optical connection between antenna and server.
The VHF and up RF signals received by multiband antenna A2 is split to several RTL SDR dongles via splitter S2. The SDR receivers covers VHF & Up bands directly.
Receiving HF bands require some up-converting with the transciever. The input frequency range of the SDR dongles is 25MHz to 1750MHz. The transverter converts input signals up for 125MHz. The input+125MHz is then split to several RL SDR dongles the same way as for VHF direct reception.
The raspberry pi runs Soapy remote server package feeding the received streams to OpenWebR server.
OpenWebRX installation
Setting up the linux server is out of the scope of this presentation. Just follow some of the installation instructions for Ubuntu or Debian. Please keep in mind that for larger audience (more than e.g. 10 clents connected at the same time), the raspeberry pi has not enough resources.
The OpenWebRx has installation instructions for the Debian and Ubuntu Linux distributions that contain packages for OpenWebRX and all dependencies.
Try manual setup instructions when above installation instructions are not successful. Keep in mind this will guide you through compilation process from sources.
Remote receiver station
Remote receiver runs on Raspberry pi. I tested installation with Banana Pi M2+ EDU (quad-core ARM H3 with 512MB RAM) and Orange Pi Zero (512MB RAM Quad-Core H2). Both worked but on long run they crashed once or twice per week. Finally I decided to use raspberry pi 3 B for two VHF/UHF bands and rasberry pi 4 B with 8G RAM for four HF bands.
The most commonly used open-source SDR server applications seem to be SoapyRemote and rtl_tcp. SoapyRemote provides access to supported SDR dongle.
Installing soapy remote from sources
First, install git, gcc, g++, make and cmake:
sudo apt-get install git gcc g++ make cmake
Compile and install SoapySDR
git clone https://github.com/pothosware/SoapySDR.git
cd SoapySDR
mkdir build
cd build
cmake ..
make -j4
sudo make install
cd ..
sudo ldconfig #needed on debian systems
cd ..
Install SDR hardware drivers
sudo apt-get install rtl-sdr librtlsdr-d
Compile and install SoapySDR adapter module
git clone https://github.com/pothosware/SoapyRTLSDR.git
cd SoapyRTLSDR
mkdir build
cd build
cmake ..
make
sudo make install
cd ../..
On orange/banana pi, install nano
sudo apt-get install nano # not needed for R.pi
Blacklist existing driver for RTL devices
sudo nano /etc/modprobe.d/no-rtl.conf
add following contents to the file
blacklist dvb_usb_rtl28xxu
blacklist rtl2832
blacklist rtl2830
Reboot the system
sudo reboot
After reboot, plug in the first USB SDR dongle. Run the rtl eeprom tool:
rtl_eeprom
The output will show current SDR dongle configuration stored in EEPROM.
What could be changed is only the serial number. Don’t mess with any other settings than serial number.
rtl_eeprom -s 012345
Repeat same process for all SDR dongles and use different serial number for each one. This will provide simple diffirentiation between dongles.
sometimes the output may look like this:
Found 1 device(s):
0: Generic RTL2832U
Using device 0: Generic RTL2832U
Found Rafael Micro R820T tuner
Current configuration:
Error: invalid RTL2832 EEPROM header!
Error: invalid string descriptor!
Error: invalid string descriptor!
Error: invalid string descriptor!
Vendor ID: 0xffff
Product ID: 0xffff
Manufacturer: ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒
Product:
Serial number:
Serial number enabled: no
IR endpoint enabled: yes
Remote wakeup enabled: yes
If such (messed-up) configuration is shown, you should load the eeprom with the content from this hex file.
wget http://pavlin.si/tmp/nesdr.hex
rtl_eeprom -w eeprom_original.bin
then follow instructions to set the serial number above.
If USB dongle is not found, try the following procedure:
- unplug the dongle
- short the SDA and SCL on the EEPROM
- plug the dongle while keeping the SDA/SCL low
- remove the short to ground from SDA/SCL
- load default EEPROM content
rtl_eeprom -g realtek
Now check that SoapySDR can find and access SDR hardware
SoapySDRUtil --probe
#
Soapy SDR -- the SDR abstraction library
#
Probe device
Found Elonics E4000 tuner
[INFO] Opening Generic RTL2832U OEM :: 00000030…
Found Elonics E4000 tuner
-- Device identification
driver=RTLSDR
hardware=E4000
index=0
origin=https://github.com/pothosware/SoapyRTLSDR
-- Peripheral summary
Channels: 1 Rx, 0 Tx
Timestamps: YES
Time sources: sw_ticks
Other Settings:
* Direct Sampling - RTL-SDR Direct Sampling Mode
[key=direct_samp, default=0, type=string, options=(0, 1, 2)]
* Offset Tune - RTL-SDR Offset Tuning Mode
[key=offset_tune, default=false, type=bool]
* I/Q Swap - RTL-SDR I/Q Swap Mode
[key=iq_swap, default=false, type=bool]
* Digital AGC - RTL-SDR digital AGC Mode
[key=digital_agc, default=false, type=bool]
-- RX Channel 0
Full-duplex: NO
Supports AGC: YES
Stream formats: CS8, CS16, CF32
Native format: CS8 [full-scale=128]
Stream args:
* Buffer Size - Number of bytes per buffer, multiples of 512 only.
[key=bufflen, units=bytes, default=262144, type=int]
* Ring buffers - Number of buffers in the ring.
[key=buffers, units=buffers, default=15, type=int]
* Async buffers - Number of async usb buffers (advanced).
[key=asyncBuffs, units=buffers, default=0, type=int]
Antennas: RX
Full gain range: [0, 96] dB
IF1 gain range: [-3, 6] dB
IF2 gain range: [0, 9] dB
IF3 gain range: [0, 9] dB
IF4 gain range: [0, 2] dB
IF5 gain range: [3, 15] dB
IF6 gain range: [3, 15] dB
TUNER gain range: [-1, 42] dB
Full freq range: [51.999, 2200] MHz
RF freq range: [52, 2200] MHz
CORR freq range: [-0.001, 0.001] MHz
Sample rates: [0.225001, 0.3], [0.900001, 3.2] MSps
Filter bandwidths: [0, 8] MHz
Compile and install SoapyRemote
git clone https://github.com/pothosware/SoapyRemote.git
cd SoapyRemote
mkdir build
cd build
cmake ..
make
sudo make install
Start SoapyRemote server
SoapySDRServer --bind
To enable the server startup automatically on boot:
sudo systemctl enable SoapySDRServer
Reboot the system. After reboot check if the soapy remote server is running.
journalctl -u SoapySDRServer
Install soapyremote – client side
This part runs on the machine where OpenWebRx is running. It provides connection to the soapyremote server running on raspberry pi.
The installation from source only requires CMake and a compiler. The apt-get install instructions for Ubuntu, which installs all required tools is:
sudo apt-get install cmake g++ libpython3-dev python3-numpy swig
Clone the SopaySDR repositor
git clone https://github.com/pothosware/SoapySDR.git cd SoapySDR
Build and install SopaySDR
mkdir build
cd build
cmake ..
make -j4
sudo make install
sudo ldconfig #needed on debian systems
SoapySDRUtil --info
Now check connection to remote server (on raspberry pi). My Raspberry pi has IP address 44.150.168.87. Replace this with the IP of your remote sopay SDR server.
SoapySDRUtil --find="remote=44.150.168.87"
#
Soapy SDR -- the SDR abstraction library
#
[INFO] [UHD] linux; GNU C++ version 9.2.1 20200304; Boost_107100; UHD_3.15.0.0-2build5
Found device 0
default_input = True
default_output = True
device_id = 0
driver = audio
label = PulseAudio
Found device 1
driver = remote
label = Generic RTL2832U OEM :: 000122
manufacturer = Realtek
product = RTL2838UHIDIR
remote = tcp://44.150.168.87:55132
remote:driver = rtlsdr
serial = 000122
tuner = Rafael Micro R820T
Found device 2
driver = remote
label = Generic RTL2832U OEM :: 000123
manufacturer = Realtek
product = RTL2838UHIDIR
remote = tcp://44.150.168.87:55132
remote:driver = rtlsdr
serial = 000123
tuner = Rafael Micro R820T
Found device 3
driver = remote
label = Generic RTL2832U OEM :: 000120
manufacturer = Realtek
product = RTL2838UHIDIR
remote = tcp://44.150.168.87:55132
remote:driver = rtlsdr
serial = 000120
tuner = Rafael Micro R820T
Found device 4
driver = remote
label = Generic RTL2832U OEM :: 00000001
manufacturer = Realtek
product = RTL2838UHIDIR
remote = tcp://44.150.168.87:55132
remote:driver = rtlsdr
serial = 00000001
tuner = Rafael Micro R820T
As shown above, the four dongles with different serial numbers are listed. Now do same check with other raspberry pi servers in your system.
OpenWebRx configuration
The OpenWebRx repository has excellent guides:
The device setup for HF band with 125MHz up-converter and SoapyRemote:
The transverter frequency offset can be entered for the whole device or within the single profile. We are using one device with one profile. The frequency offset can also be used to trim the actual frequency of the receiver in absoulte Hz instead of “ppm” units.
For the VHF or UHF receiver, the offset is not needed:
Enjoy:
Final installation of the remote modules
Short reception video:
https://youtu.be/ywgDHMhMieo
Some ideas for future improvements:
- add some storage for all bands like SDR buffer TU Graz
- add some more bands
- add CW skimmer
Very useful! Many thanks! 73 Anders SM0HPL
What tool did you use to make that isometric drawing? Thanks.
Hi. It is open source libre office draw with free VRT “network” library: https://extensions.libreoffice.org/en/extensions/show/vrt-network-equipment
Thanks!
Hi,
Great post. I think top figure shows HF receiver side with 4 different SDRs. But in OpenWebRX device settings you are only allocating one SDR for this band (serial 122). What about other 3 SDRs? Do you use them for other purposes?
Thanks.
They are for different bands.
So awesome, thanks for sharing. I want to try something like this!