Using new imon devinput with lirc

I don’t know exacly untile when but the imon lcd support has been merged  into the linux kernel using devinput.

This means that if you want to use the lirc_imon driver you need to blacklist the imon driver shipped with the kernel. You just need to add the following lines in the /etc/modprobe.d/blacklist.conf file:

blacklist rc_imon_pad

blacklist imon

After this you can proceed followingone of the lirc guides related to imon you find on the web.

But if you want to use the new devinput module, which in fact make thinks easier, you just leave the modules as they are and just edit the Hardware.conf file (/etc/lirc/hardware.conf):

# /etc/lirc/hardware.conf
#
#Chosen Remote Control
REMOTE=”Linux input layer (/dev/input/eventX)”
REMOTE_MODULES=””
REMOTE_DRIVER=”devinput”
REMOTE_DEVICE=”/dev/input/by-id/usb-15c2_0038-event-if00″
REMOTE_SOCKET=””
REMOTE_LIRCD_CONF=”devinput/lircd.conf.devinput”
REMOTE_LIRCD_ARGS=””

#Enable lircd
START_LIRCD=”true”

And in the lirc configuration file /etc/lirc/lircd.conf you should put this line:

#Configuration for the Linux input layer (/dev/input/eventX) remote:
include “/usr/share/lirc/remotes/devinput/lircd.conf.devinput”

This work good on my ubutu 11.10, perhaps you need to adjust some paths if your distro is different.

PLS NOTE Done this way the knob on my antec fusion doesn’t work neigther the blue key on the remote. The kno generates events on a different device: /dev/input/by-id/usb-15c2_0038-event-mouse

So you have to chain two distinct lirc servers togethere:

/usr/sbin/lircd –pidfile=/var/run/lirc/lircd1.pid –output=/var/run/lirc/lircd1 –driver=devinput –device=/dev/input/by-id/usb-15c2_0038-event-mouse –listen/usr/sbin/lircd –output=/var/run/lirc/lircd –driver=devinput –device=/dev/input/by-id/usb-15c2_0038-event-if00 –connect=localhost 8765

This way you find events of both devices on the socket /var/run/lirc/lircd.

Due to a driver bug, which i will investigate, the knob gets temporarly disabled if you press some particular key. For example if you press the yellow tv button the kno will not work anymore, until you press a number button of the remote.

To make the two instances of lirc to startup at boot time i added an upstart script /etc/init/htpc-lirc.conf:

description    “HTPC lirc daemon”

start on (net-device-up
and local-filesystems
and runlevel [2345])
stop on runlevel [016]

script
mkdir /var/run/lirc -p
/usr/sbin/lircd –pidfile=/var/run/lirc/lircd1.pid –output=/var/run/lirc/lircd1 –driver=devinput –device=/dev/input/by-id/usb-15c2_0038-event-mouse –listen
/usr/sbin/lircd –output=/var/run/lirc/lircd –driver=devinput –device=/dev/input/by-id/usb-15c2_0038-event-if00 –connect=localhost:8765
end script

Finally link it init.d

ln -s /lib/init/upstart-job /etc/init.d/htpc-lirc

 

 

 

WP to LinkedIn Auto Publish Powered By : XYZScripts.com