You are not logged in.

#1 2015-11-30 09:31:29

mac1202
Member
Registered: 2011-05-24
Posts: 33

Lirc problem with 2 remote.

Hello i got a problem I can't solve by myself.
I have an HTPC with a MCE remote i use to control and everything worked good until I bought a dvb usb stick who also have a remote that I dont need.
In fact remote are assigned to lirc0 and lirc1 randomly at each boot. When my MCE is assigned to lirc0 it work when it's assigned to lirc1 it didn't.
What I want it's that the mce remote always be lirc0, I try with udev rules but no success.
Here some output

cat /proc/bus/input/devices | grep -e IR
N: Name="MCE IR Keyboard/Mouse (dvb_usb_rtl28xxu)"
N: Name="MCE IR Keyboard/Mouse (mceusb)"
dmesg | grep rc0
[   11.013281] input: Realtek RTL2832U reference design as /devices/pci0000:00/0000:00:14.0/usb3/3-3/rc/rc0/input7
[   11.013319] rc0: Realtek RTL2832U reference design as /devices/pci0000:00/0000:00:14.0/usb3/3-3/rc/rc0
[   11.139405] rc rc0: lirc_dev: driver ir-lirc-codec (dvb_usb_rtl28xxu) registered at minor = 0
dmesg | grep rc1
[   11.051176] input: Media Center Ed. eHome Infrared Remote Transceiver (1934:5168) as /devices/pci0000:00/0000:00:14.0/usb3/3-11/3-11:1.0/rc/rc1/input6
[   11.051200] rc1: Media Center Ed. eHome Infrared Remote Transceiver (1934:5168) as /devices/pci0000:00/0000:00:14.0/usb3/3-11/3-11:1.0/rc/rc1
[   11.139443] rc rc1: lirc_dev: driver ir-lirc-codec (mceusb) registered at minor = 1

If someone could help me I really appreciate.

Offline

#2 2016-01-15 17:48:18

danitool
Member
Registered: 2011-04-20
Posts: 4

Re: Lirc problem with 2 remote.

You could also launch two instances of lirc, one connected to another for using lirc0 and lirc1

For example create a new file for system daemon: /usr/lib/systemd/system/lircd2.service

[Unit]
Description=LIRC Infrared Signal Decoder
After=network.target lircd.service

[Service]
Type=simple
ExecStart=/usr/sbin/lircd --nodaemon --pidfile=/run/lirc/lircd2.pid /etc/lirc/lirc_options2.conf

[Install]
WantedBy=multi-user.target

and also create the /etc/lirc/lirc_options2.conf file

[lircd]
nodaemon        = False
driver          = default
device          = /dev/lirc1
output          = /var/run/lirc/lircd2
pidfile         = /var/run/lirc/lircd2.pid
plugindir       = /usr/lib/lirc/plugins
permission      = 666
allow-simulate  = No
repeat-max      = 600
connect        = localhost:8765

For the first daemon it should listen at port 8765, so configure also /etc/lirc/lirc_options.conf file

[lircd]
nodaemon        = False
driver          = default
device          = /dev/lirc0
output          = /var/run/lirc/lircd
pidfile         = /var/run/lirc/lircd.pid
plugindir       = /usr/lib/lirc/plugins
permission      = 666
allow-simulate  = No
repeat-max      = 600
listen         = localhost:8765

Enable and start the service for the second daemon

systemctl enable lircd2
systemctl start lircd2

Offline

Board footer

Powered by FluxBB