See
readme file of https://github.com/matthewwall/weewx-tfrc
For
Raspbian Stretch and
Raspbian Buster these
are the steps:
sudo
apt-get install clang
cmake
git
pkg-config librtlsdr-dev -y
b)
install
rtl-sdr:
cd
/home/weewx
git
clone https://github.com/steve-m/librtlsdr.git
cd
librtlsdr
mkdir
build
cd
build
cmake
../ -DINSTALL_UDEV_RULES=ON
make
sudo
make install
sudo
ldconfig
c) install tfrc:
cd
/home/weewx
sudo
git
clone https://github.com/baycom/tfrec.git
cd
tfrec
For
Rapbbian
Stretch
Compile tfrec source:
For RasPI3 use:
sudo make -f Makefile.arm
for RasPI 2 or Zero:
make -f Makefile.raspi2
For Raspbian Buster:
Note: In Raspbian Buster the make command gets undefined reference errors like:
/usr/bin/ld: sdr.o: in function `sdr::read_thread()':
sdr.cpp:(.text+0xd8): undefined reference to `rtlsdr_read_async'
The followings steps will fix this error:
1. modify file /home/weewx/librtlsdr/build/librtlsdr.pc
Change the first four lines:
prefix=
exec_prefix=
libdir=
includedir=
into:
prefix=/usr/local
exec_prefix=${prefix}
libdir=${exec_prefix}/lib
includedir=${prefix}/include
2.
modify file /home/weewx/tfrec/Makefile.arm
(or
file /home/weewx/tfrec/Makefile.raspi2
for
RasPI 2 or Zero)
Change the first line:
PACKAGES=
librtlsdr
into:
PACKAGES=
/home/weewx/librtlsdr/build/librtlsdr.pc
3.
repeat the make command
sudo make -f Makefile.arm
Now
the make command will finish
without errors
Test tfrec:
/home/weewx/tfrec/tfrec -D -T 1
Luc