Skip to content
project-owner edited this page Feb 17, 2020 · 13 revisions

The following procedure is valid for Raspbian Buster OS.

Install LIRC - the library which handles IR remote controls:

sudo apt-get install lirc
sudo mv /etc/lirc/lirc_options.conf.dist /etc/lirc/lirc_options.conf
sudo mv /etc/lirc/lircd.conf.dist /etc/lirc/lircd.conf
sudo apt-get install lirc

After LIRC installation new folder will be created with the following content:

pi@raspberrypi:~ $ ls /etc/lirc
irexec.lircrc       lircd.conf    lircd.conf.dist  lircmd.conf.dist   lirc_options.conf.dist
irexec.lircrc.dist  lircd.conf.d  lircmd.conf      lirc_options.conf

Three IR Remote Control configuration files should be created. You can use files provided for WD TV Live as an example.

First you need to create file with extension conf. This file is specific for each IR Remote Control type. The file should be placed in folder /etc/lirc/lircd.conf.d. Here is the example content of that file for WD TV Live remote control.

This web site can be used for downloading this file for specific remote control type.

The second file lircrc is required for Peppy Player to handle remote control events. You can download the file this way:

wget https://github.com/project-owner/Peppy.doc/blob/master/files/lircrc
sudo mv lircrc /etc/lirc

The third file can be downloaded the same way:

wget https://raw.githubusercontent.com/project-owner/Peppy.doc/master/files/hardware.conf
sudo mv hardware.conf /etc/lirc

Modify file /etc/lirc/lirc_options.conf by setting the following values:

driver = default
device = /dev/lirc0

Find the following line in file /boot/config.txt:

#dtoverlay=lirc-rpi

And change it to the following line assuming that IR sensor connected to GPIO pin #23:

dtoverlay=gpio-ir,gpio_pin=23

Reboot the system

sudo reboot

To test remote control run the following command and press buttons on a remote control

sudo mode2 -d /dev/lirc0

<<Previous | Next>>

Contents

Clone this wiki locally