Compatibility with RTL SDR Blog v4
I have problem with original RTL SDR Blog v4. After start project from master branch I get error: https://pastebin.com/VKPprern
sdr-scanner-1 | [2025-03-11 14:01:12.409007] [info ] [Scanner ] start thread id: 24
sdr-scanner-1 | [2025-03-11 14:01:12.409039] [debug ] [RtlSdr ] check device availability: 0
sdr-scanner-1 | [2025-03-11 14:01:12.485537] [debug ] [RtlSdr ] set bandwidth: 002.048 kHz
sdr-scanner-1 | [2025-03-11 14:01:12.548561] [debug ] [RtlSdr ] set sample rate: 002.048 kHz
sdr-scanner-1 | [2025-03-11 14:01:12.644015] [debug ] [RtlSdr ] set center frequency: 148.715 kHz
sdr-scanner-1 | [2025-03-11 14:01:12.687356] [error ] [Scanner ] exception: set center frequency error
Any problem with RTL SDR Blog v4?
It looks like drivers for RTL SDR in master branch is not compatible with original RTL SDR Blog V4.
I tried the development branch. There I just got it working. The audio quality for the 2 meter band is garbage.
For the development branch I looked into the reason and found that the default Ubuntu driver "librtlsdr0 (0.6.0-4)" was used. I used the following steps to fix it quick and dirty.
Setup the latest available development environment.
git clone --branch devel https://github.com/shajen/rtl-sdr-scanner-cpp.git ~/sdr
cd ~/sdr
sed -i 's/latest/devel/' .env
nano .env # customize settings if you want: timezone, admin account and other
sudo docker-compose up
Use a second terminal to find the active containers via sudo docker container ls. Connected to sdr-scanner container via sudo docker exec -it sdr-dev_sdr-scanner_1 sh
Followed the installation instructions from https://www.rtl-sdr.com/v4/
apt update
apt install install libusb-1.0-0-dev git cmake pkg-config
cd ~
git clone https://github.com/rtlsdrblog/rtl-sdr-blog
cd rtl-sdr-blog
mkdir build
cd build
cmake ../ -DINSTALL_UDEV_RULES=ON
make
make install
cp ../rtl-sdr.rules /etc/udev/rules.d/
ldconfig
Switched to initial terminal and quit application with ctrl+c. Restarted the application via sudo docker-compose up
Yep, that is pretty dirty. Reminds me of someone I know.
You could have just forked the repo, created a new branch, and then modified the DockerFile to do the same thing. This way, you would just have to keep your repository in sync with upstream, and your changes would be persistent across builds.
Yeah, could have done that to fix it nicely. In this case I was just looking for the root cause and experimenting if this solved the problem. After this finding I stopped with the experiment.
I just wanted to let others know where the root cause was and let the solving to people with the expertise to do it correctly. I have never done something with DockerFile (yet) so it was all on an trial and error basis 😅 so if you can fix it in the right way, it would be appreciated.
I don't remember exactly why I quit the experiment. The tool does exactly what I wanted. I think it was as I wrote that the audio recordings where completely unusable. Maybe the system didn't have sufficient processing power.
I have incorporated the fix into my fork, which substitutes podman for docker. Podman being RedHat's containerized solution.
If you can get by using Bash, you can write Dockerfiles. It's just a few extra keywords. These are all the keywords in this project's Dockerfile: RUN, FROM, WORKDIR, COPY, ENV, ENTRYPOINT and CMD. They are somewhat self-explanatory.
I literally copied and pasted your solution.
FROM docker.io/ubuntu:22.04 as build
ENV DEBIAN_FRONTEND noninteractive
RUN apt-get update && \
apt-get install -y curl git zip build-essential cmake ccache tzdata libspdlog-dev libliquid-dev nlohmann-json3-dev libmosquitto-dev libgtest-dev libgmock-dev libusb-1.0-0-dev libfftw3-dev libboost-all-dev libsoapysdr-dev
# --------------------------------------
# Your modifications go here at the top
# --------------------------------------
WORKDIR /root/rtl-sdr
RUN apt-get install libusb-1.0-0-dev libusb-1.0-0 pkg-config -y
RUN git clone https://github.com/rtlsdrblog/rtl-sdr-blog . && \
mkdir -p build && cd build && \
cmake ../ -DINSTALL_UDEV_RULES=ON && make install && \
cp ../rtl-sdr.rules /etc/udev/rules.d/ && ldconfig
WORKDIR /sdrplay_api
COPY sdrplay/*.run .
RUN chmod +x ./SDRplay_RSP_API-`arch`-3.07.run && \
./SDRplay_RSP_API-`arch`-3.07.run --tar xvf && \
cp -rf inc/sdrplay_api*h /usr/local/include/ && \
cp -rf `arch`/sdrplay_apiService /usr/local/bin && \
cp -rf `arch`/libsdrplay_api.so* /usr/local/lib/ && \
ln -s /usr/local/lib/libsdrplay_api.so.3.07 /usr/local/lib/libsdrplay_api.so && \
chmod 644 /usr/local/include/* && \
chmod 644 /usr/local/lib/libsdrplay_api.so* && \
ldconfig
Check out the new release https://github.com/shajen/sdr-hub it work perfectly with rtl sdr v4.
@shajen show off 😝 😆