Anastrophe Wrote:It would be great if you could explain what you did differently to the unbuntuforums link.
It is a little long, but here it is. Most of this I've found by trial and error, and I do not really know what I am doing or why it works, but it does. I should do more research, but haven't... Also I am more used to fedora linux (from the time it was called "red hat linux" and then "fedora core"), so some things perhaps should be done differently here. But it works for me.
First, become root entering "su -" and then the root password.
1) do "ls -l /dev/input/*" with the IR sensor not attached. Attach the sensor and repeat "ls -l /dev/input/*". That way you can see what devices the sensor creates.
For me, it was "event5" and "mouse1" (I had some other devices attached)
2) then do "udevadm info -a -p $(udevadm info -q path -n /dev/input/eventX)" ("X" being the "event number" you discovered on step 1, mine was "5")
There will be a long listing; look for the FIRST "ATTRS(modalias)" line, for me it was:
Code:
ATTRS{modalias}=="input:b0003v06B4p1C70e0110-e0,1,2,3,4,14,k71,72,73,74,75,77,79,7A,7B,7C,7D,7E,7F,80,81,82,83,84,85,86,87,88,89,8A,8B,8C,8E,8F,90,96,98,9B,9C,9E,9F,A1,A3,A4,A5,A6,A7,A8,A9,AB,AC,AD,AE,B1,B2,B5,B7,B8,B9,BA,BB,BC,BD,BE,BF,C0,C1,C2,CE,CF,D0,D1,D2,D5,D9,DB,E2,EA,EB,F0,100,101,102,103,104,105,106,107,108,109,10A,10B,10C,10D,10E,10F,110,111,112,113,114,115,116,117,118,119,11A,11B,11C,11D,11E,11F,120,121,122,123,124,125,126,127,128,129,12A,12B,12C,12D,12E,12F,130,131,132,133,162,166,16A,16E,178,179,17A,17B,17C,17D,17F,180,181,182,185,18C,18D,192,193,195,1A0,1A1,1A2,1A3,1A4,1A5,1A6,1A7,1A8,1A9,1AA,1AB,1AC,1AD,1AE,1B0,1B1,1B7,r0,1,6,8,9,a10,11,20,m4,lsfw"
from that, line, we can identify our device as "input:b0003v06B4p1C70e0110-e0*"
(yours will be probably similar but different)
3) create a udev rule to catch our device on each boot:
Code:
echo ATTRS{modalias}=="input:b0003v06B4p1C70e0110-e0*",SYMLINK+="input/dxremote" > /etc/udev/rules.d/60-persistent-input.rules
Of course, instead of "b0003v06B4p1C70e0110-e0*", enter the correct data for your device that you found on step 2
Now, by unplugging/plugging the USB IR sensor (or, if that does not work, rebooting) you should have a redirection for the device; "ls -l /dev/input/*" should give something like:
Code:
crw-r----- 1 root root 13, 64 2009-08-24 18:56 /dev/input/event0
crw-r----- 1 root root 13, 65 2009-08-24 18:56 /dev/input/event1
crw-rw----+ 1 root root 13, 66 2009-08-24 18:56 /dev/input/event2
crw-r----- 1 root root 13, 67 2009-08-24 18:56 /dev/input/event3
crw-r----- 1 root root 13, 68 2009-08-24 18:56 /dev/input/event4
crw-rw----+ 1 root root 13, 69 2009-08-24 19:07 /dev/input/event5
crw-rw----+ 1 root root 13, 70 2009-08-24 18:56 /dev/input/event6
crw-r----- 1 root root 13, 71 2009-08-24 18:56 /dev/input/event7
lrwxrwxrwx 1 root root 6 2009-08-24 19:07 /dev/input/dxremote -> event5
crw-r----- 1 root root 13, 63 2009-08-24 18:56 /dev/input/mice
crw-r----- 1 root root 13, 32 2009-08-24 18:56 /dev/input/mouse0
crw-r----- 1 root root 13, 33 2009-08-24 19:07 /dev/input/mouse1
crw-r----- 1 root root 13, 34 2009-08-24 18:56 /dev/input/mouse2
(instead of "dxremote" you may use any name you want)
After that this line:
Code:
/usr/local/sbin/lircd --driver=dev/input --device=/dev/input/dxremote --output=/dev/lircd --pidfile /var/run/lircd.pid
captures the input from the remote, you just need to execute that on each boot. I do that by creating a script on init.d:
Code:
echo /usr/local/sbin/lircd --driver=dev/input --device=/dev/input/mando --output=/dev/lircd --pidfile /var/run/lircd.pid > /etc/init.d/dxremote
making it executable:
Code:
chmod a+x /etc/init.d/dxremote
and creating a link in rc2.d, rc3.d and rc5.d to be sure it runs on each boot
Code:
ln /etc/init.d/dxremote /etc/rc2.d/S71dxremote
ln /etc/init.d/dxremote /etc/rc3.d/S71dxremote
ln /etc/init.d/dxremote /etc/rc5.d/S71dxremote
With that, and the adecuate Lircmap.xml and Keymap.xml in the ~/.xbmc/userdata directory (or /usr/share/xbmc/userdata if you want it to work for every user) you can control xbmc with the remote as I explained before.