All these radio waves are out there, just waiting to be listened to

I think I have finally worked out (and documented this time) how to use a software defined radio dongle attached to my computer to pick up various radio signals of interest out there.  Most weather stations as well as some fridges, cars and assorted other bits and bobs communicate using short packets of information on 433mHz.

Step 0 - you will need a Raspberry pi and the latest Raspbian image, plus the RTL-SDR dongle and a suitable antenna.

Step 1 - you need a program to take the radio waves and convert them into something the computer can process.  In this case, the application called rtl_433 does what we need.

pi@raspberrypi:~ $ sudo apt install rtl-sdr
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following additional packages will be installed:
  librtlsdr0
The following NEW packages will be installed:
  librtlsdr0 rtl-sdr
0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
Need to get 78.7 kB of archives.
After this operation, 273 kB of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 http://archive.raspberrypi.org/debian buster/main armhf librtlsdr0 armhf 0.6-1+rpt1 [26.3 kB]
Get:2 http://archive.raspberrypi.org/debian buster/main armhf rtl-sdr armhf 0.6-1+rpt1 [52.4 kB]
Fetched 78.7 kB in 1s (79.2 kB/s)
Selecting previously unselected package librtlsdr0:armhf.
(Reading database ... 99231 files and directories currently installed.)
Preparing to unpack .../librtlsdr0_0.6-1+rpt1_armhf.deb ...
Unpacking librtlsdr0:armhf (0.6-1+rpt1) ...
Selecting previously unselected package rtl-sdr.
Preparing to unpack .../rtl-sdr_0.6-1+rpt1_armhf.deb ...
Unpacking rtl-sdr (0.6-1+rpt1) ...
Setting up librtlsdr0:armhf (0.6-1+rpt1) ...
Setting up rtl-sdr (0.6-1+rpt1) ...
Processing triggers for libc-bin (2.28-10+rpi1) ...
Processing triggers for man-db (2.8.5-2) ...

Step 2 - you will need to install the dependencies for some of the next steps

pi@raspberrypi:~ $ sudo apt install git build-essential cmake libusb-1.0-0-dev sqlite3 python3 python3-dev python3-smbus
Reading package lists... Done
Building dependency tree       
Reading state information... Done
build-essential is already the newest version (12.6).
git is already the newest version (1:2.20.1-2+deb10u3).
python3 is already the newest version (3.7.3-1).
python3-dev is already the newest version (3.7.3-1).
python3-dev set to manually installed.
python3-smbus is already the newest version (4.1-1).
Suggested packages:
  cmake-doc ninja-build sqlite3-doc
The following NEW packages will be installed:
  cmake cmake-data libjsoncpp1 librhash0 libusb-1.0-0-dev libusb-1.0-doc libuv1 sqlite3
0 upgraded, 8 newly installed, 0 to remove and 0 not upgraded.
Need to get 5,509 kB of archives.
After this operation, 26.5 MB of additional disk space will be used.
Get:1 http://archive.raspberrypi.org/debian buster/main armhf cmake-data all 3.16.3-3~bpo10+1 [1,628 kB]
Get:8 http://archive.raspberrypi.org/debian buster/main armhf cmake armhf 3.16.3-3~bpo10+1 [2,500 kB]
Get:2 http://ftp.acc.umu.se/mirror/raspbian/raspbian buster/main armhf libjsoncpp1 armhf 1.7.4-3 [66.2 kB]
Get:3 http://ftp.heanet.ie/mirrors/raspbian/raspbian buster/main armhf librhash0 armhf 1.3.8-1 [132 kB]
Get:4 http://ftp.heanet.ie/mirrors/raspbian/raspbian buster/main armhf libuv1 armhf 1.24.1-1 [96.7 kB]
Get:5 http://ftp.heanet.ie/mirrors/raspbian/raspbian buster/main armhf libusb-1.0-0-dev armhf 2:1.0.22-2 [65.5 kB]
Get:6 http://ftp.heanet.ie/mirrors/raspbian/raspbian buster/main armhf libusb-1.0-doc all 2:1.0.22-2 [182 kB]
Get:7 http://ftp.heanet.ie/mirrors/raspbian/raspbian buster/main armhf sqlite3 armhf 3.27.2-3+deb10u1 [839 kB]
Fetched 5,509 kB in 5s (1,123 kB/s)                              
Selecting previously unselected package cmake-data.
(Reading database ... 99257 files and directories currently installed.)
Preparing to unpack .../0-cmake-data_3.16.3-3~bpo10+1_all.deb ...
Unpacking cmake-data (3.16.3-3~bpo10+1) ...
Selecting previously unselected package libjsoncpp1:armhf.
Preparing to unpack .../1-libjsoncpp1_1.7.4-3_armhf.deb ...
Unpacking libjsoncpp1:armhf (1.7.4-3) ...
Selecting previously unselected package librhash0:armhf.
Preparing to unpack .../2-librhash0_1.3.8-1_armhf.deb ...
Unpacking librhash0:armhf (1.3.8-1) ...
Selecting previously unselected package libuv1:armhf.
Preparing to unpack .../3-libuv1_1.24.1-1_armhf.deb ...
Unpacking libuv1:armhf (1.24.1-1) ...
Selecting previously unselected package cmake.
Preparing to unpack .../4-cmake_3.16.3-3~bpo10+1_armhf.deb ...
Unpacking cmake (3.16.3-3~bpo10+1) ...
Selecting previously unselected package libusb-1.0-0-dev:armhf.
Preparing to unpack .../5-libusb-1.0-0-dev_2%3a1.0.22-2_armhf.deb ...
Unpacking libusb-1.0-0-dev:armhf (2:1.0.22-2) ...
Selecting previously unselected package libusb-1.0-doc.
Preparing to unpack .../6-libusb-1.0-doc_2%3a1.0.22-2_all.deb ...
Unpacking libusb-1.0-doc (2:1.0.22-2) ...
Selecting previously unselected package sqlite3.
Preparing to unpack .../7-sqlite3_3.27.2-3+deb10u1_armhf.deb ...
Unpacking sqlite3 (3.27.2-3+deb10u1) ...
Setting up libusb-1.0-doc (2:1.0.22-2) ...
Setting up libusb-1.0-0-dev:armhf (2:1.0.22-2) ...
Setting up libuv1:armhf (1.24.1-1) ...
Setting up librhash0:armhf (1.3.8-1) ...
Setting up cmake-data (3.16.3-3~bpo10+1) ...
Setting up sqlite3 (3.27.2-3+deb10u1) ...
Setting up libjsoncpp1:armhf (1.7.4-3) ...
Setting up cmake (3.16.3-3~bpo10+1) ...
Processing triggers for man-db (2.8.5-2) ...
Processing triggers for libc-bin (2.28-10+rpi1) ...

Step 3 - you need to blacklist some drivers

pi@raspberrypi:~ $ sudo nano /etc/modprobe.d/blacklist-rtl.conf
---blacklist dvb_usb_rtl28xxu
pi@raspberrypi:~ $ sudo udevadm control --reload-rules && sudo udevadm trigger

Step 4 - reboot and then plug in the dongle.  Run dmesg at a command prompt and you should see the device being recognised.

[  336.725947] usb 1-1.2.1.3: reset low-speed USB device number 6 using dwc_otg
[  337.146054] usb 1-1.2.2: new high-speed USB device number 8 using dwc_otg
[  337.289376] usb 1-1.2.2: New USB device found, idVendor=0bda, idProduct=2838, bcdDevice= 1.00
[  337.289428] usb 1-1.2.2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[  337.289455] usb 1-1.2.2: Product: RTL2838UHIDIR
[  337.289479] usb 1-1.2.2: Manufacturer: Realtek
[  337.289503] usb 1-1.2.2: SerialNumber: 00000001

6. install rtl_433

pi@raspberrypi:~ $ git clone https://github.com/merbanan/rtl_433.git
Cloning into 'rtl_433'...
remote: Enumerating objects: 17598, done.
remote: Counting objects: 100% (697/697), done.
remote: Compressing objects: 100% (403/403), done.
remote: Total 17598 (delta 398), reused 480 (delta 292), pack-reused 16901
Receiving objects: 100% (17598/17598), 6.54 MiB | 557.00 KiB/s, done.
Resolving deltas: 100% (13524/13524), done.
pi@raspberrypi:~ $ cd rtl_433/
pi@raspberrypi:~/rtl_433 $ mkdir build
pi@raspberrypi:~/rtl_433 $ cd build
pi@raspberrypi:~/rtl_433/build $ cmake ../
-- The C compiler identification is GNU 8.3.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Build type not specified: defaulting to release.
-- Found Git version: refs/heads/master commit 9983bfc574321ad4ec87fcc3ab8575f12c94deae from 2021-06-26T20:52:06+0200
-- Using Git version tag: 21.05-29-g9983bfc5 on master at 202106262052
-- Could NOT find OpenSSL, try to set the path to OpenSSL root folder in the system variable OPENSSL_ROOT_DIR (missing: OPENSSL_CRYPTO_LIBRARY OPENSSL_INCLUDE_DIR)
-- OpenSSL development files not found, TLS won't be possible.
-- Found PkgConfig: /usr/bin/pkg-config (found version "0.29")
-- Could NOT find LibRTLSDR (missing: LIBRTLSDR_LIBRARY LIBRTLSDR_INCLUDE_DIR)
-- Found LibUSB: /usr/lib/arm-linux-gnueabihf/libusb-1.0.so  
CMake Error at CMakeLists.txt:174 (message):
  RTL-SDR development files not found.


-- Configuring incomplete, errors occurred!
See also "/home/pi/rtl_433/build/CMakeFiles/CMakeOutput.log".