Getting LIRC to work on latest Slackware - what am I doing wrong?
by zenithpbarm from LinuxQuestions.org on (#5DMH0)
Hi
I have a Slackware 13.37 machine I've been using as a media center since 2012. The machine is running LIRC using a serial port receiver (homebrew) connected on COM0 and a generic RC-5 infrared remote. Everything works perfectly.
I have decided to update to Slackware64 current (full install, stock kernel) to get support for ext4 fs. I have then installed latest lirc from source using prefix / to avoid installing in /usr/local.
Lirc installed successfully (make install, no complaints) although none of the postinstall python scripts seem to work.
All of the following attempts are run as root to avoid permission issues during troubleshooting.
Code:bash-5.1# uname -r
5.10.10
bash-5.1# more /etc/slackware-version
Slackware 14.2+Now with the new kernel the old ways of loading lirc_serial module does not work. It seems ir support has moved to the kernel. I therefore proceed to load the serial_ir module :
Code:bash-5.1# setserial /dev/ttyS0 uart none
bash-5.1# modprobe serial_ir
bash-5.1# dmesg
[ 298.689466] serial_ir serial_ir.0: auto-detected active low receiver
[ 298.741468] Registered IR keymap rc-rc6-mce
[ 298.748217] IR RC6 protocol handler initialized
[ 298.770506] rc rc0: Serial IR type home-brew as /devices/platform/serial_ir.0/rc/rc0
[ 298.770615] rc rc0: lirc_dev: driver serial_ir registered at minor = 0, raw IR receiver, raw IR transmitter
[ 298.770718] input: Serial IR type home-brew as /devices/platform/serial_ir.0/rc/rc0/input11
bash-5.1# lsmod
Module Size Used by
ir_rc6_decoder 16384 0
rc_rc6_mce 16384 0
serial_ir 20480 0
rc_core 53248 4 ir_rc6_decoder,rc_rc6_mce,serial_irLooking up RC6 protocol, I find it is significantly different from RC5. I try to unload RC6 modules and load RC5 module instead :
Code:bash-5.1# rmmod ir_rc6_decoder
bash-5.1# rmmod rc_rc6_mce
Module Size Used by
serial_ir 20480 0
rc_core 53248 2 serial_ir
bash-5.1# modprobe ir_rc5_decoder
bash-5.1# dmesg
[ 531.554392] IR RC5(x/sz) protocol handler initialized
bash-5.1# lsmod
Module Size Used by
ir_rc5_decoder 16384 0
serial_ir 20480 0
rc_core 53248 3 ir_rc5_decoder,serial_ir
bash-5.1# mode2 -d /dev/lirc0
Using driver default on device /dev/lirc0
Trying device: /dev/lirc0
Using device: /dev/lirc0
Warning: Running as root.
pulse 970
pulse 12664
space 14654
pulse 949
pulse 12664
space 14650
pulse 1742
pulse 12664
space 14659
pulse 949
pulse 12664
space 14663
pulse 948At this point, the system is getting pulses from the remote when I push buttons. However, running irrecord fails with error message :
Code:Press RETURN now to start recording.
................................................................................
Got gap (98637 us)}
Please keep on pressing buttons like described above.
...............................................................................
Please enter the name for the next button (press <ENTER> to finish recording)
KEY_PAUSE
Now hold down button "KEY_PAUSE".
Something went wrong: Cannot decode data
Please try again. (28 retries left)it seems my remote is not correctly decoded. After running irrecord I get the following syslog message :
Code:bash-5.1# dmesg
[ 939.762415] rc rc0: two consecutive events of type spaceI have retrieved the remote config file from my previous install and tried to use this with irremote but no improvement. This config file is as follows :
Code:begin remote
name RC5Universal
bits 13
flags RC5|CONST_LENGTH
eps 30
aeps 100
one 898 780
zero 898 780
plead 948
gap 107474
toggle_bit_mask 0x800
begin codes
1 0x1001
2 0x1002
3 0x1003
4 0x1004
5 0x1005
6 0x1006
7 0x1007
8 0x1008
9 0x1009
0 0x1000
pgauche 0x1021
pdroit 0x1020
balanceup 0x1014
balancedown 0x1015
brightnessup 0x1012
brightnessdown 0x1013
contrastup 0x101C
contrastdown 0x101D
faup 0x1016
fadown 0x1017
solup 0x1018
soldown 0x1019
soundup 0x1010
sounddown 0x1011
mute 0x100D
l 0x101B
r 0x101A
power 0x100C
dash 0x100A
mode 0x1038
end codes
end remoteI have tried using ir-keytable to get additional info on the system :
Code:bash-5.1# lircd -v
lircd 0.11.0-devel
bash-5.1# lircd
can't open or create /var/run/lirc/lircd.pid: No such file or directory
bash-5.1# mkdir /var/run/lirc/
bash-5.1# lircd
bash-5.1# ir-keytable
Found /sys/class/rc/rc0/ with:
Name: Serial IR type home-brew
Driver: serial_ir
Default keymap: rc-rc6-mce
Input device: /dev/input/event10
LIRC device: /dev/lirc0
Attached BPF protocols: Operation not supported
Supported kernel protocols: lirc rc-5 rc-5-sz jvc sony nec sanyo mce_kbd rc-6 sharp xmp imon rc-mm
Enabled kernel protocols: lirc
bus: 25, vendor/product: 0001:0001, version: 0x0100
Repeat delay = 500 ms, repeat period = 125 ms
bash-5.1# ir-keytable -p rc-5 -t -v
Found device /sys/class/rc/rc0/
Parsing uevent /sys/class/rc/rc0/lirc0/uevent
/sys/class/rc/rc0/lirc0/uevent uevent MAJOR=237
/sys/class/rc/rc0/lirc0/uevent uevent MINOR=0
/sys/class/rc/rc0/lirc0/uevent uevent DEVNAME=lirc0
Input sysfs node is /sys/class/rc/rc0/input11/
Event sysfs node is /sys/class/rc/rc0/input11/event10/
Parsing uevent /sys/class/rc/rc0/input11/event10/uevent
/sys/class/rc/rc0/input11/event10/uevent uevent MAJOR=13
/sys/class/rc/rc0/input11/event10/uevent uevent MINOR=74
/sys/class/rc/rc0/input11/event10/uevent uevent DEVNAME=input/event10
Parsing uevent /sys/class/rc/rc0/uevent
/sys/class/rc/rc0/uevent uevent NAME=rc-rc6-mce
/sys/class/rc/rc0/uevent uevent DRV_NAME=serial_ir
/sys/class/rc/rc0/uevent uevent DEV_NAME=Serial IR type home-brew
input device is /dev/input/event10
/sys/class/rc/rc0/protocols protocol rc-5 (disabled)
/sys/class/rc/rc0/protocols protocol nec (disabled)
/sys/class/rc/rc0/protocols protocol rc-6 (disabled)
/sys/class/rc/rc0/protocols protocol jvc (disabled)
/sys/class/rc/rc0/protocols protocol sony (disabled)
/sys/class/rc/rc0/protocols protocol rc-5-sz (disabled)
/sys/class/rc/rc0/protocols protocol sanyo (disabled)
/sys/class/rc/rc0/protocols protocol sharp (disabled)
/sys/class/rc/rc0/protocols protocol mce_kbd (disabled)
/sys/class/rc/rc0/protocols protocol xmp (disabled)
/sys/class/rc/rc0/protocols protocol imon (disabled)
/sys/class/rc/rc0/protocols protocol rc-mm (disabled)
/sys/class/rc/rc0/protocols protocol lirc (enabled)
Opening /dev/input/event10
Input Protocol version: 0x00010001
Protocols changed to rc-5
Testing events. Please, press CTRL-C to abort.Needless to say irw remains silent.
And here's the lirc_options.conf :
Code:[lircd]
nodaemon = False
driver = default
device = /dev/lirc0
output = /var/run/lirc/lircd
pidfile = /var/run/lirc/lircd.pid
plugindir = /lib/lirc/plugins
permission = 666
allow-simulate = No
repeat-max = 600
[lircmd]
uinput = False
nodaemon = FalseAt this point I'm not sure how to further diagnose the issue. I know my hardware and also know it's working. I believe the kernel driver fails to decode the pulses properly but I'm not sure how to proceed to configure it correctly.
Can you help?
Thanks
zp*


I have a Slackware 13.37 machine I've been using as a media center since 2012. The machine is running LIRC using a serial port receiver (homebrew) connected on COM0 and a generic RC-5 infrared remote. Everything works perfectly.
I have decided to update to Slackware64 current (full install, stock kernel) to get support for ext4 fs. I have then installed latest lirc from source using prefix / to avoid installing in /usr/local.
Lirc installed successfully (make install, no complaints) although none of the postinstall python scripts seem to work.
All of the following attempts are run as root to avoid permission issues during troubleshooting.
Code:bash-5.1# uname -r
5.10.10
bash-5.1# more /etc/slackware-version
Slackware 14.2+Now with the new kernel the old ways of loading lirc_serial module does not work. It seems ir support has moved to the kernel. I therefore proceed to load the serial_ir module :
Code:bash-5.1# setserial /dev/ttyS0 uart none
bash-5.1# modprobe serial_ir
bash-5.1# dmesg
[ 298.689466] serial_ir serial_ir.0: auto-detected active low receiver
[ 298.741468] Registered IR keymap rc-rc6-mce
[ 298.748217] IR RC6 protocol handler initialized
[ 298.770506] rc rc0: Serial IR type home-brew as /devices/platform/serial_ir.0/rc/rc0
[ 298.770615] rc rc0: lirc_dev: driver serial_ir registered at minor = 0, raw IR receiver, raw IR transmitter
[ 298.770718] input: Serial IR type home-brew as /devices/platform/serial_ir.0/rc/rc0/input11
bash-5.1# lsmod
Module Size Used by
ir_rc6_decoder 16384 0
rc_rc6_mce 16384 0
serial_ir 20480 0
rc_core 53248 4 ir_rc6_decoder,rc_rc6_mce,serial_irLooking up RC6 protocol, I find it is significantly different from RC5. I try to unload RC6 modules and load RC5 module instead :
Code:bash-5.1# rmmod ir_rc6_decoder
bash-5.1# rmmod rc_rc6_mce
Module Size Used by
serial_ir 20480 0
rc_core 53248 2 serial_ir
bash-5.1# modprobe ir_rc5_decoder
bash-5.1# dmesg
[ 531.554392] IR RC5(x/sz) protocol handler initialized
bash-5.1# lsmod
Module Size Used by
ir_rc5_decoder 16384 0
serial_ir 20480 0
rc_core 53248 3 ir_rc5_decoder,serial_ir
bash-5.1# mode2 -d /dev/lirc0
Using driver default on device /dev/lirc0
Trying device: /dev/lirc0
Using device: /dev/lirc0
Warning: Running as root.
pulse 970
pulse 12664
space 14654
pulse 949
pulse 12664
space 14650
pulse 1742
pulse 12664
space 14659
pulse 949
pulse 12664
space 14663
pulse 948At this point, the system is getting pulses from the remote when I push buttons. However, running irrecord fails with error message :
Code:Press RETURN now to start recording.
................................................................................
Got gap (98637 us)}
Please keep on pressing buttons like described above.
...............................................................................
Please enter the name for the next button (press <ENTER> to finish recording)
KEY_PAUSE
Now hold down button "KEY_PAUSE".
Something went wrong: Cannot decode data
Please try again. (28 retries left)it seems my remote is not correctly decoded. After running irrecord I get the following syslog message :
Code:bash-5.1# dmesg
[ 939.762415] rc rc0: two consecutive events of type spaceI have retrieved the remote config file from my previous install and tried to use this with irremote but no improvement. This config file is as follows :
Code:begin remote
name RC5Universal
bits 13
flags RC5|CONST_LENGTH
eps 30
aeps 100
one 898 780
zero 898 780
plead 948
gap 107474
toggle_bit_mask 0x800
begin codes
1 0x1001
2 0x1002
3 0x1003
4 0x1004
5 0x1005
6 0x1006
7 0x1007
8 0x1008
9 0x1009
0 0x1000
pgauche 0x1021
pdroit 0x1020
balanceup 0x1014
balancedown 0x1015
brightnessup 0x1012
brightnessdown 0x1013
contrastup 0x101C
contrastdown 0x101D
faup 0x1016
fadown 0x1017
solup 0x1018
soldown 0x1019
soundup 0x1010
sounddown 0x1011
mute 0x100D
l 0x101B
r 0x101A
power 0x100C
dash 0x100A
mode 0x1038
end codes
end remoteI have tried using ir-keytable to get additional info on the system :
Code:bash-5.1# lircd -v
lircd 0.11.0-devel
bash-5.1# lircd
can't open or create /var/run/lirc/lircd.pid: No such file or directory
bash-5.1# mkdir /var/run/lirc/
bash-5.1# lircd
bash-5.1# ir-keytable
Found /sys/class/rc/rc0/ with:
Name: Serial IR type home-brew
Driver: serial_ir
Default keymap: rc-rc6-mce
Input device: /dev/input/event10
LIRC device: /dev/lirc0
Attached BPF protocols: Operation not supported
Supported kernel protocols: lirc rc-5 rc-5-sz jvc sony nec sanyo mce_kbd rc-6 sharp xmp imon rc-mm
Enabled kernel protocols: lirc
bus: 25, vendor/product: 0001:0001, version: 0x0100
Repeat delay = 500 ms, repeat period = 125 ms
bash-5.1# ir-keytable -p rc-5 -t -v
Found device /sys/class/rc/rc0/
Parsing uevent /sys/class/rc/rc0/lirc0/uevent
/sys/class/rc/rc0/lirc0/uevent uevent MAJOR=237
/sys/class/rc/rc0/lirc0/uevent uevent MINOR=0
/sys/class/rc/rc0/lirc0/uevent uevent DEVNAME=lirc0
Input sysfs node is /sys/class/rc/rc0/input11/
Event sysfs node is /sys/class/rc/rc0/input11/event10/
Parsing uevent /sys/class/rc/rc0/input11/event10/uevent
/sys/class/rc/rc0/input11/event10/uevent uevent MAJOR=13
/sys/class/rc/rc0/input11/event10/uevent uevent MINOR=74
/sys/class/rc/rc0/input11/event10/uevent uevent DEVNAME=input/event10
Parsing uevent /sys/class/rc/rc0/uevent
/sys/class/rc/rc0/uevent uevent NAME=rc-rc6-mce
/sys/class/rc/rc0/uevent uevent DRV_NAME=serial_ir
/sys/class/rc/rc0/uevent uevent DEV_NAME=Serial IR type home-brew
input device is /dev/input/event10
/sys/class/rc/rc0/protocols protocol rc-5 (disabled)
/sys/class/rc/rc0/protocols protocol nec (disabled)
/sys/class/rc/rc0/protocols protocol rc-6 (disabled)
/sys/class/rc/rc0/protocols protocol jvc (disabled)
/sys/class/rc/rc0/protocols protocol sony (disabled)
/sys/class/rc/rc0/protocols protocol rc-5-sz (disabled)
/sys/class/rc/rc0/protocols protocol sanyo (disabled)
/sys/class/rc/rc0/protocols protocol sharp (disabled)
/sys/class/rc/rc0/protocols protocol mce_kbd (disabled)
/sys/class/rc/rc0/protocols protocol xmp (disabled)
/sys/class/rc/rc0/protocols protocol imon (disabled)
/sys/class/rc/rc0/protocols protocol rc-mm (disabled)
/sys/class/rc/rc0/protocols protocol lirc (enabled)
Opening /dev/input/event10
Input Protocol version: 0x00010001
Protocols changed to rc-5
Testing events. Please, press CTRL-C to abort.Needless to say irw remains silent.
And here's the lirc_options.conf :
Code:[lircd]
nodaemon = False
driver = default
device = /dev/lirc0
output = /var/run/lirc/lircd
pidfile = /var/run/lirc/lircd.pid
plugindir = /lib/lirc/plugins
permission = 666
allow-simulate = No
repeat-max = 600
[lircmd]
uinput = False
nodaemon = FalseAt this point I'm not sure how to further diagnose the issue. I know my hardware and also know it's working. I believe the kernel driver fails to decode the pulses properly but I'm not sure how to proceed to configure it correctly.
Can you help?
Thanks
zp*