Skip to content

Instantly share code, notes, and snippets.

@derme302
Last active October 29, 2023 08:19
Show Gist options
  • Save derme302/a702e421b7cd133753e5ab87101a01c4 to your computer and use it in GitHub Desktop.
Save derme302/a702e421b7cd133753e5ab87101a01c4 to your computer and use it in GitHub Desktop.
Install rtl_433 for a SDR-RTL Dongle on a Raspberry Pi

From: https://www.sensorsiot.org/install-rtl_433-for-a-sdr-rtl-dongle-on-a-raspberry-pi/

Install RTL_SDR Support

sudo apt-get install git git-core cmake libusb-1.0-0-dev
build-essential

git clone git://git.osmocom.org/rtl-sdr.git

cd rtl-sdr/ && mkdir build && cd build/

cmake ../ -DINSTALL_UDEV_RULES=ON

sudo make

sudo make install

sudo ldconfig

cd ~

sudo cp ./rtl-sdr/rtl-sdr.rules /etc/udev/rules.d/

sudo reboot

create file no-rtl.conf

sudo nano /etc/modprobe.d/no-rtl.conf

add these three lines

blacklist dvb_usb_rtl28xxu
blacklist rtl2832
blacklist rtl2830

Reboot OS

lsusb

rtl_test -t

Build and install rtl_433

sudo apt-get install libtool libusb-1.0.0-dev librtlsdr-dev
rtl-sdr doxygen

git clone https://github.com/merbanan/rtl_433.git

cd rtl_433/ && mkdir build &&
cd build && cmake ../ &&
make

sudo make install

Test installation:

rtl_433 -h

The source for this tutorial is: https://sdr-setup-notes.readthedocs.io/en/latest/dev_rtlsdr.html#rtl-433-tool-setup Install supervisord

sudo apt-get install -y supervisor

sudo nano /etc/supervisor/conf.d/rtl_433.conf

Enter into file:

[program:rtl_433]
command=/home/pi/rtl_433/build/src/rtl_433 -R 123 -F “mqtt://localhost:1883,,user=”admin”,pass=”admin”,events=BEER”user=pi
autostart=yes
autorestart=yes
startretries=100
stderr_logfile=/var/log/rtl_433/rtl_433.err.log
stdout_logfile=/var/log/rtl_433/rtl_433.log

sudo mkdir /var/log/rtl_433

sudo service supervisor start

sudo service supervisor status

If you changed the configuration file:

sudo supervisorctl reread

You are done!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment