2009-12-02, 23:10
i finally got the hama mce remote control to work properly under ubuntu 9.04 with xbmc after about a week doing a lot of research and testing.
i use this remote control and got almost every key to work in xbmc.
in this tutorial, [xbmc-user] is a placeholder for your xbmc user.
please note that some keys have the same mapping (for example: "OK", "Start" and "Enter" or "i" and the right mouse button). some keys send three commands to the ir receiver, but in the lircd.conf, i only entered one, otherwise it didn't work, because xbmc only catches the first key sent.
log in as your standard xbmc user and install the latest lirc:
In the lirc configuration tool, that opens up after installation, select "None" in every screen.
after the installation has been completed, edit the following files:
/etc/lirc/lircd.conf
/etc/lirc/hardware.conf
add the following code to
/etc/modprobe.d/blacklist.conf
add the following code (IMPORTANT: the entry has to be written before "exit 0") to
/etc/rc.local
read out the event numbers for your hid:
you get something like this (i only copied the important entries containing Name="HID...):
event3 and event4 are the two important entries from the cat we made before that we need in the next step. they could be different on your system.
create a file
/home/[xbmc-user]/lircstart.sh
please note that the code change from dec 17, 2009. the old code contained a copy/paste error...
be careful to change event3 and event4 to the event numbers you got for your system.
chmod the lircstart.sh to 0755
to be continued in the next post...
i use this remote control and got almost every key to work in xbmc.
in this tutorial, [xbmc-user] is a placeholder for your xbmc user.
please note that some keys have the same mapping (for example: "OK", "Start" and "Enter" or "i" and the right mouse button). some keys send three commands to the ir receiver, but in the lircd.conf, i only entered one, otherwise it didn't work, because xbmc only catches the first key sent.
log in as your standard xbmc user and install the latest lirc:
Code:
sudo apt-get install lirc
In the lirc configuration tool, that opens up after installation, select "None" in every screen.
after the installation has been completed, edit the following files:
/etc/lirc/lircd.conf
Code:
begin remote
name hama_52451
bits 32
begin codes
HOMEPAGE 0x100ac
POWER 0x1008e
YELLOW 0x10014
BLUE 0x10032
GREEN 0x10017
RED 0x10012
TV 0x10018
PICTURES 0x10022
REWIND 0x10030
FASTFORWARD 0x10021
PREV 0x100a5
NEXT 0x100a3
PLAYPAUSE 0x100a4
STOP 0x100a6
REC 0x10013
BACK 0x1000e
INFO 0x10111
UP 0x10067
LEFT 0x10069
RIGHT 0x1006a
DOWN 0x1006c
ENTER 0x1001c
BTN_LEFT 0x10110
VOLUMEUP 0x10073
VOLUMEDOWN 0x10072
MUTE 0x10071
CHANNELUP 0x10068
CHANNELDOWN 0x1006d
1 0x1004f
2 0x10050
3 0x10051
4 0x1004b
5 0x1004c
6 0x1004d
7 0x10047
8 0x10048
9 0x10049
0 0x10052
STERN 0x10037
CLOSE 0x1003e
CLEAR 0x10001
end codes
end remote
/etc/lirc/hardware.conf
Code:
# /etc/lirc/hardware.conf
#
#Chosen Remote Control
REMOTE="None"
REMOTE_MODULES="lirc_atiusb lirc_dev"
REMOTE_DRIVER=""
REMOTE_DEVICE="/dev/lirc0"
REMOTE_SOCKET=""
REMOTE_LIRCD_CONF=""
REMOTE_LIRCD_ARGS="-r"
#Chosen IR Transmitter
TRANSMITTER="None"
TRANSMITTER_MODULES=""
TRANSMITTER_DRIVER=""
TRANSMITTER_DEVICE=""
TRANSMITTER_SOCKET=""
TRANSMITTER_LIRCD_CONF=""
TRANSMITTER_LIRCD_ARGS=""
#Enable lircd
START_LIRCD="true"
#Don't start lircmd even if there seems to be a good config file
#START_LIRCMD="false"
#Try to load appropriate kernel modules
LOAD_MODULES="true"
# Default configuration files for your hardware if any
LIRCMD_CONF="lircd.conf"
#Forcing noninteractive reconfiguration
#If lirc is to be reconfigured by an external application
#that doesn't have a debconf frontend available, the noninteractive
#frontend can be invoked and set to parse REMOTE and TRANSMITTER
#It will then populate all other variables without any user input
#If you would like to configure lirc via standard methods, be sure
#to leave this set to "false"
FORCE_NONINTERACTIVE_RECONFIGURATION="true"
START_LIRCMD=""
add the following code to
/etc/modprobe.d/blacklist.conf
Code:
blacklist ati_remote
add the following code (IMPORTANT: the entry has to be written before "exit 0") to
/etc/rc.local
Code:
./home/[xbmc-user]/lircstart.sh
read out the event numbers for your hid:
Code:
cat /proc/bus/input/devices
you get something like this (i only copied the important entries containing Name="HID...):
Code:
I: Bus=0003 Vendor=05a4 Product=9881 Version=0110
N: Name="HID 05a4:9881"
P: Phys=usb-0000:00:04.0-3/input0
S: Sysfs=/devices/pci0000:00/0000:00:04.0/usb2/2-3/2-3:1.0/input/input3
U: Uniq=
H: Handlers=kbd [b]event3[/b]
B: EV=120013
B: KEY=e080ffdf 1cfffff ffffffff fffffffe
B: MSC=10
B: LED=7
I: Bus=0003 Vendor=05a4 Product=9881 Version=0110
N: Name="HID 05a4:9881"
P: Phys=usb-0000:00:04.0-3/input1
S: Sysfs=/devices/pci0000:00/0000:00:04.0/usb2/2-3/2-3:1.1/input/input4
U: Uniq=
H: Handlers=kbd mouse1 [b]event4[/b]
B: EV=17
B: KEY=1f0000 0 2020000 3878 d801d001 1e0000 0 0 0
B: REL=103
B: MSC=10
event3 and event4 are the two important entries from the cat we made before that we need in the next step. they could be different on your system.
create a file
/home/[xbmc-user]/lircstart.sh
please note that the code change from dec 17, 2009. the old code contained a copy/paste error...
Code:
#!/bin/sh
/etc/init.d/lirc stop
lircd --driver=devinput --device=/dev/input/event3 --pidfile=/var/run/lirc1.pid --listen=9988;
lircd --driver=devinput --device=/dev/input/event4 --pidfile=/var/run/lirc2.pid --connect=localhost:9988;
be careful to change event3 and event4 to the event numbers you got for your system.
chmod the lircstart.sh to 0755
Code:
chmod 0755 lircstart.sh
to be continued in the next post...