adsb-scripts icon indicating copy to clipboard operation
adsb-scripts copied to clipboard

biastee-enable.sh

Open madjuju opened this issue 1 month ago • 5 comments

-- Looking for pthread_create in pthread - found -- Found Threads: TRUE -- Udev rules not being installed, install them with -DINSTALL_UDEV_RULES=ON -- Building with kernel driver detaching enabled -- Building for version: 7f12 / 0.5git -- Using install prefix: /usr/local -- Configuring done (2.0s) -- Generating done (0.0s) -- Build files have been written to: /usr/local/share/adsb-wiki/biastee/rtl_biast/build [ 5%] Building C object src/CMakeFiles/rtlsdr_shared.dir/librtlsdr.c.o /usr/local/share/adsb-wiki/biastee/rtl_biast/src/librtlsdr.c: In function ‘rtlsdr_open’: /usr/local/share/adsb-wiki/biastee/rtl_biast/src/librtlsdr.c:1648:31: warning: this statement may fall through [-Wimplicit-fallthrough=] 1648 | dev->tun_xtal = R828D_XTAL_FREQ; /usr/local/share/adsb-wiki/biastee/rtl_biast/src/librtlsdr.c:1649:9: note: here 1649 | case RTLSDR_TUNER_R820T: | ^~~~ [ 11%] Building C object src/CMakeFiles/rtlsdr_shared.dir/tuner_e4k.c.o [ 16%] Building C object src/CMakeFiles/rtlsdr_shared.dir/tuner_fc0012.c.o [ 22%] Building C object src/CMakeFiles/rtlsdr_shared.dir/tuner_fc0013.c.o [ 27%] Building C object src/CMakeFiles/rtlsdr_shared.dir/tuner_fc2580.c.o [ 33%] Building C object src/CMakeFiles/rtlsdr_shared.dir/tuner_r82xx.c.o /usr/local/share/adsb-wiki/biastee/rtl_biast/src/tuner_r82xx.c: In function ‘r82xx_init’: /usr/local/share/adsb-wiki/biastee/rtl_biast/src/tuner_r82xx.c:1315:10: error: implicit declaration of function ‘r820t_calibrate’ [-Wimplicit-function-declaration] 1315 | rc = r820t_calibrate(priv); | ^~~~~~~~~~~~~~~ make[2]: *** [src/CMakeFiles/rtlsdr_shared.dir/build.make:149: src/CMakeFiles/rtlsdr_shared.dir/tuner_r82xx.c.o] Error 1 make[1]: *** [CMakeFiles/Makefile2:171: src/CMakeFiles/rtlsdr_shared.dir/all] Error 2 make: *** [Makefile:136: all] Error 2

madjuju avatar Nov 15 '25 18:11 madjuju

Found 1 device(s): 0: Realtek, RTL2838UHIDIR, SN: 00000001

Using device 0: Generic RTL2832U OEM Detached kernel driver Found Rafael Micro R820T tuner Supported gain values (29): 0.0 0.9 1.4 2.7 3.7 7.7 8.7 12.5 14.4 15.7 16.6 19.7 20.7 22.9 25.4 28.0 29.7 32.8 33.8 36.4 37.2 38.6 40.2 42.1 43.4 43.9 44.5 48.0 49.6 [R82XX] PLL not locked! Sampling at 2048000 S/s.

madjuju avatar Nov 15 '25 18:11 madjuju

~/temp/rtl-sdr-blog# uname -a Linux p1 6.12.47+rpt-rpi-v8 #1 SMP PREEMPT Debian 1:6.12.47-1+rpt1 (2025-09-16) aarch64 GNU/Linux

madjuju avatar Nov 15 '25 18:11 madjuju

That's an issue with the uptsream source.

wiedehopf avatar Nov 15 '25 18:11 wiedehopf

what does it mean ?

madjuju avatar Nov 15 '25 18:11 madjuju

my work around 👍 #!/bin/bash umask 022 renice 10 $$ set -e function aptInstall() { if ! apt install -y --no-install-recommends --no-install-suggests "$@"; then apt update apt install -y --no-install-recommends --no-install-suggests "$@" fi }

aptInstall make cmake git build-essential libusb-1.0-0-dev librtlsdr-dev

ipath=/usr/local/share/adsb-wiki/biastee APPS="dump1090-fa readsb" rm -rf $ipath mkdir -p $ipath cd $ipath git clone --depth 1 https://github.com/rtlsdrblog/rtl_biast cd rtl_biast

Patch for modern GCC - add forward declaration for r820t_calibrate

Insert after the includes and before the first function

sed -i '34a\n/* Forward declaration for r820t_calibrate */\nint r820t_calibrate(struct r82xx_priv *priv);' src/tuner_r82xx.c

pushd .

mkdir build cd build cmake .. -DDETACH_KERNEL_DRIVER=ON make

popd

for APP in $APPS; do if systemctl show $APP 2>/dev/null | grep -qs 'UnitFileState=enabled'; then echo stopping $APP systemctl stop $APP || true

madjuju avatar Nov 15 '25 19:11 madjuju