我正在尝试使用Raspberry Pi打开电视。
我已按照以下说明进行操作,并添加了我的远程配置文件,但是没有运气!有任何建议。
以sudo /etc/init.d/lircd状态运行时,我得到
lircd.service - Flexible IR remote input/output application support
Loaded: loaded (/lib/systemd/system/lircd.service; enabled; vendor preset: enabled)
Active: active (running) since Sun 2018-11-11 13:27:07 UTC; 5min ago
Docs: man:lircd(8)
http://lirc.org/html/configure.html
Main PID: 334 (lircd)
CGroup: /system.slice/lircd.service
└─334 /usr/sbin/lircd --nodaemon
Nov 11 13:32:23 raspberrypi lircd[334]: lircd-0.9.4c[334]: Info: removed client
Nov 11 13:32:23 raspberrypi lircd-0.9.4c[334]: Info: removed client
Nov 11 13:32:42 raspberrypi lircd[334]: lircd-0.9.4c[334]: Notice: accepted new client on /var/run/lirc/lircd
Nov 11 13:32:42 raspberrypi lircd-0.9.4c[334]: Notice: accepted new client on /var/run/lirc/lircd
Nov 11 13:32:42 raspberrypi lircd[334]: lircd-0.9.4c[334]: Info: removed client
Nov 11 13:32:42 raspberrypi lircd-0.9.4c[334]: Info: removed client
Nov 11 13:32:54 raspberrypi lircd[334]: lircd-0.9.4c[334]: Notice: accepted new client on /var/run/lirc/lircd
Nov 11 13:32:54 raspberrypi lircd-0.9.4c[334]: Notice: accepted new client on /var/run/lirc/lircd
Nov 11 13:32:54 raspberrypi lircd[334]: lircd-0.9.4c[334]: Info: removed client
Nov 11 13:32:54 raspberrypi lircd-0.9.4c[334]: Info: removed client
这是我进行设置的步骤。
# Add the following lines to /etc/modules file
lirc_dev
lirc_rpi gpio_in_pin=18 gpio_out_pin=17
# Add the following lines to /etc/lirc/hardware.conf file
LIRCD_ARGS="--uinput --listen"
LOAD_MODULES=true
DRIVER="default"
DEVICE="/dev/lirc0"
MODULES="lirc_rpi"
# Update the following line in /boot/config.txt
dtoverlay=lirc-rpi,gpio_in_pin=18,gpio_out_pin=17
# Update the following lines in /etc/lirc/lirc_options.conf
driver = default
device = /dev/lirc0
$ sudo /etc/init.d/lircd stop
$ sudo /etc/init.d/lircd start
# Check status to make lirc is running
$ sudo /etc/init.d/lircd status
# Reboot before testing
$ reboot
答案 0 :(得分:0)
碰到同样的问题。它有两个主要部分:
使用lirc 0.9.0+
上的新版本,所需的配置要少得多:
modules
中进行任何编辑sudo /usr/share/lirc/lirc-old2new.sh
总结一下,您只需要更改/etc/lirc/lirc_options.conf
。特别是,您需要将行分别编辑为driver = default
和device = /dev/lirc0
。
这应该解决第1部分。
正如您在/boot/overlays/README
中看到的那样,LIRC驱动程序已过时。提供了新的IR输入和输出。红外输出的驱动程序是新的gpio-ir-tx
。您需要在lirc-rpi
中使用它而不是/boot/config.txt
。
总而言之,将dtoverlay=lirc-rpi,gpio_out_pin=17,gpio_in_pin=13
更改为
dtoverlay=gpio-ir-tx,gpio_pin=17
请注意配置中缺少的_out
。该驱动程序仅支持输出,因此不需要输入。要处理输入,请使用gpio-ir
。