welle-cli SDR DAB server on Raspberry Pi 4

welle.io is a software-defined DAB/DAB+ decoder. It works with RTL-SDR and SoapySDR-compatible tuners.

welle-cli is more than a mere CLI tool, as it provides a web interface for information about the DAB multiplex you’re tuned to, as well as an MP3 stream for each channel in the multiplex. This is what it looks like when I’m listening to Radio 4:

I have welle-cli running on a Raspberry Pi 4B, with an SDRPlay RSP1a connected with USB.

The official instructions for building on Raspbian cover the GUI [welle.io] which I don’t require for this application.

This is what I had to do build just the CLI:

apt install libtool libusb-1.0-0-dev librtlsdr-dev rtl-sdr build-essential autoconf cmake pkg-config libfftw3-dev libmpg123-dev libfaad-dev libsoapysdr-dev

[RTL stuff probably isn’t 100% necessary just for Soapy, but I want to test this with an RTL dongle at some point too].

git clone https://github.com/AlbrechtL/welle.io
mkdir welle.io/build
cd welle.io/build/
cmake .. -DRTLSDR=1 -DSOAPYSDR=1 -DBUILD_WELLE_IO=OFF -DBUILD_WELLE_CLI=ON
make
make install

All being well, you will have a welle-cli in /usr/local/bin at the end of this.

The RSP1a has notch filters for VHF FM and DAB broadcast bands. I found that these had to be on in order to get DAB sync. This is the opposite of what I expected and will continue to investigate this.

cd /usr/local/share/welle-io/html

welle-cli -s "driver=sdrplay,soapy=0,rfnotch_ctrl=true,dabnotch_ctrl=true" -w 8888 -c 12B

gives me a working web interface on port 8888, tuned to multiplex 12B. Note that if you don’t start this from its HTML directory, the web interface will not load!

CPU usage on the Pi 4B is between 85-100% of one core when serving a single stream. Performance seems to be fine, I haven’t been able to discern any signs of hitting resource limits here. CPU temp is 49°C with the loft temperature at 12°C. The web interface is a bit chatty – merely having it idle in tab requires 110kbps/22pps of network traffic, which could impact resources on smaller platforms. This is notable because it’s more than 50% of the bandwidth that listening to a single stream consumes. The polling interval for the web interface can be tweaked in index.js.

So far, I have not been able to get a stream to play for more than a few minutes. The gain figure starts at around 25 then gradually rises, then the SNR drops, then the bubbling mud commences. I have to restart welle-cli to get a usable signal again. This seems like an AGC issue.

Leave a Reply