Howto configure LIRC for usage with kernel 3.X ???

Audio editors, music players, video players, burning software, etc.
Post Reply
Message
Author
User avatar
Hesse James
Posts: 106
Joined: Mon 08 Feb 2010, 18:41

Howto configure LIRC for usage with kernel 3.X ???

#1 Post by Hesse James »

Hi
I hope that there are experts out there who managed to configure lirc so that it can be used for my multimedia-computer.

I have an Imon PAD RC which works pretty well with K2.6.34 (spup050), Lirc-0.87 (including mouse movements).
Beginning with K2.6.35 the driver went into the kernel so my old working configuration could no longer be used. :(
With evtest I could find out that the RC sends events to event8 (so it is not defect) but I did not manage that xorg uses these events for mouse movements. All these recommendations in the internet do not work for me. (I tried lirc with devinput, lircmd with uinput, eventlirc ...)

Is there someone out who have this application running ? How did you solve this ?

Tips are much appreciated.

Many thanks in adavance
Christian

User avatar
Hesse James
Posts: 106
Joined: Mon 08 Feb 2010, 18:41

#2 Post by Hesse James »

Having read tons of forum contributions about it (without making any progress) I found recently a trivial solution:
For Slacko 5.7: By pressing the mouse/keyboard button on my RC-Imon-Pad (see picture) I could switch the lirc kernel driver into the mouse operation mode I was looking for. Now I can move the cursor with the mouse-pad on the RC, simulate left and right mouse clicks. Exactly what I was looking for. A second press leads to the keyboard version again. I didn't notice that before. After a quick investigation I can say that not all previous releases show this behavior. Of course it is mandatory that the RC is recognised by the lirc kernel driver.

For key assignments I actually prefer inputlirc over lircd. Maybe I'll write some future experiences about the remote control of application software for Puppy.

Christian

User avatar
Hesse James
Posts: 106
Joined: Mon 08 Feb 2010, 18:41

#3 Post by Hesse James »

Hi
I mentioned that I intend to write some experiences about key assignment with a Remote Control using inputlirc.
This link was a great help for me:

http://wiki.ubuntuusers.de/Lirc

Install the attached inputlirc-23.pet

I opened the terminal window and started the investigations with:

cat /proc/bus/input/devices

The essential part of my output was:
---------------------------------------------------------------------------------------------------
I: Bus=0003 Vendor=15c2 Product=0036 Version=0002
N: Name="iMON Panel, Knob and Mouse(15c2:0036)"
P: Phys=usb-0000:00:04.0-6/input1
S: Sysfs=/devices/pci0000:00/0000:00:04.0/usb3/3-6/3-6:1.0/input/input7
U: Uniq=
H: Handlers=kbd mouse1 event7
B: PROP=0
B: EV=100007
B: KEY=10800320 2000002 0 0 30000 4 110000 4110 801 e1680 0 0 10000002
B: REL=103

I: Bus=0003 Vendor=15c2 Product=0036 Version=0002
N: Name="iMON Remote (15c2:0036)"
P: Phys=usb-0000:00:04.0-6/input0
S: Sysfs=/devices/pci0000:00/0000:00:04.0/usb3/3-6/3-6:1.0/rc/rc0/input8
U: Uniq=
H: Handlers=kbd event8
B: PROP=0
B: EV=100013
B: KEY=fff 0 0 4400000 108c0320 2d50080 0 0 30000 4 119000 4186 14000801 809e1680 0 2000000 10004002
B: MSC=10
-----------------------------------------------------------------------------------------------------
The bold text showed me, that RC-input is obtained via two events: event7 and event8 (one is the RC, the other two knobs at the computer housing).
To find out which of them is essential for me I started in the terminal window:

evtest

output of evtest:

Select the device event number [0-18]:

I took the 8

You should now press buttons on RC and see if the RC keystrokes are recognized. Example:
----------------------------------------------------------------------------------------------
Event: time 1396511918.272368, type 1 (EV_KEY), code 516 (KEY_NUMERIC_4), value 0
Event: time 1396511918.272368, -------------- SYN_REPORT ------------
----------------------------------------------------------------------------------------------
Is your choice correct then proceed to next step. Otherwise take the other event.

Sidenote: you could also create UDEV-rules so that your device nodes are always the same (I haven't observed a CHANGE yet, might be possible in case of kernel update). This link was helpful as a howto:
http://wiki.xbmc.org/index.php?title=HO ... for_Ubuntu

Edit the file /etc/init.d/inputlirc with a text editor
Remove the # in line 13 and line 32
Replace the event@ in line 13 and 32 with your determined event, e.g. event8

Edit the file /etc/default/inputlirc
Replace the event@ in line 2 with your determined event, e.g. event8

Restart computer, open terminal and enter command:

irw

Then press buttons on Remote Control.
Output should be like this:

201 0 KEY_NUMERIC_1 /dev/input/event8

KEY_NUMERIC_1 has to be used as the button identifier in the lircrc-file , see below.

Edit the file /etc/init.d/inputlirc

Remove the # in line 14 and line 33

Edit the file /etc/lirc/lircrc

It depends on your application you want to control, which button you assign to which command. There are lots of lircrc-files available in the Internet. I have added two button assignments as an example, one for MPlayer, one for SMPlayer.

Reboot

Finally: If you want to use both events as I do, you have to modify the files

/etc/init.d/inputlirc
/etc/default/inputlirc

by adding the additional event. Example:
/usr/sbin/inputlircd -g -m 0 -c /dev/input/event7 /dev/input/event8

Tested with Slacko 5.7.0
Successful results to you !
Attachments
inputlirc-23.pet
(49.83 KiB) Downloaded 353 times

Post Reply