Skip to content
This repository has been archived by the owner on Jan 13, 2020. It is now read-only.

Using SoapySDR via rx_tools with OpenWebRX

PA8E edited this page Sep 23, 2019 · 4 revisions

The rx_sdr command (from the rx_tools repo) works with a variety of SDR hardware:

RTL-SDR, HackRF, SDRplay, UHD, Airspy, Red Pitaya, audio devices, etc.

It uses the great SoapySDR library to interface with the device.

Check out the list of devices currently supported by SoapySDR.

The rx_sdr command syntax is similar to the rtl_sdr command.

If the -d switch is not given, it will auto-detect your SDR hardware if the following tools are also installed:

Step #1: install SoapySDR and rx_tools

#Installing SoapySDR:
git clone https://github.com/pothosware/SoapySDR
cd SoapySDR
mkdir build
cd build
cmake ..
make 
sudo make install
sudo ldconfig
cd ..

#Installing rx_tools:
git clone https://github.com/rxseger/rx_tools
cd rx_tools
mkdir build
cd build
cmake ..
make 
sudo make install
sudo ldconfig
cd ..

Step #2: install BOTH the vendor library and its SoapySDR wrapper

Kernel module blacklisting

Some kernel modules lock the USB device and need to be disabled before the SDR device can be used.

If the kernel modules are not properly blacklisted you can get a "device not found" error.

Blacklisting for RTL-SDR

Create the file /etc/modprobe.d/blacklist-rtlsdr.conf with the following content:

blacklist dvb_usb_rtl28xxu

...then reboot the computer.

Blacklisting for SDRplay

Create the file /etc/modprobe.d/blacklist-sdrplay.conf with the following content:

blacklist sdr_msi3101
blacklist msi001
blacklist msi2500

...then reboot the computer. (Source of this information)

Step #3: Test the SDR device

This command should correctly identify the SDR device attached to your computer:

SoapySDRUtil --find

This command should be able to open the SDR device and start to read it:

rx_sdr - | csdr through > /dev/null

You can terminate it by pressing Ctrl+C multiple times, or Ctrl+\.

Step #4: Edit OpenWebRX configuration

Uncomment the corresponding lines in config_webrx.py:

soapy_device_query="0" #can be a number or can correspond to a driver, e.g. soapy_device_query="driver=hackrf", see `rx_sdr --help`
start_rtl_command="rx_sdr -d {device_query} -I CF32 -F CF32 -s {samp_rate} -f {center_freq} -p {ppm} -g {rf_gain} -".format(device_query=soapy_device_query, rf_gain=rf_gain, center_freq=center_freq, samp_rate=samp_rate, ppm=ppm)
format_conversion=""

Step #5: Start OpenWebRX

python2 openwebrx.py
Clone this wiki locally