XBMC Community Forum
[LINUX] HOW-TO get Hama MCE Remote Control to fully work in Ubuntu 9.04 - Printable Version

+- XBMC Community Forum (http://forum.xbmc.org)
+-- Forum: Help and Support (/forumdisplay.php?fid=33)
+--- Forum: XBMC General Help and Support (/forumdisplay.php?fid=111)
+--- Thread: [LINUX] HOW-TO get Hama MCE Remote Control to fully work in Ubuntu 9.04 (/showthread.php?tid=63152)

Pages: 1 2 3 4 5 6 7 8

[LINUX] HOW-TO get Hama MCE Remote Control to fully work in Ubuntu 9.04 - lx_cool_j - 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:
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:

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
#Chosen Remote Control
REMOTE_MODULES="lirc_atiusb lirc_dev"

#Chosen IR Transmitter

#Enable lircd

#Don't start lircmd even if there seems to be a good config file

#Try to load appropriate kernel modules

# Default configuration files for your hardware if any

#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"

add the following code to

blacklist ati_remote

add the following code (IMPORTANT: the entry has to be written before "exit 0") to

read out the event numbers for your hid:
cat /proc/bus/input/devices

you get something like this (i only copied the important entries containing Name="HID...):
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

please note that the code change from dec 17, 2009. the old code contained a copy/paste error...

/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
chmod 0755 lircstart.sh

to be continued in the next post...

[LINUX] Full Hama MCE Remote Control support in ubuntu 9.04, continued... - lx_cool_j - 2009-12-03 14:54

continued from previous post

edit the file
        <remote device="hama_52451">



ok, everything should work now after a reboot.

to check if remote.xml and Lircmap.xml are integrated to xbmc without any problem you may check it with:

cat /home/[xbmc-user]/.xbmc/temp/xbmc.log | grep remote.xml


cat /home/[xbmc-user]/.xbmc/temp/xbmc.log | grep Lircmap.xml

something like this should come to your screen:
21:11:00 T:3041413008 M:1477832704    INFO: Loading special://xbmc/system/keymaps/remote.xml
21:11:00 T:3041413008 M:1477832704    INFO: Loading special://profile/keymaps/remote.xml


21:11:00 T:3041413008 M:1477832704    INFO: Loading special://xbmc/system/Lircmap.xml
21:11:00 T:3041413008 M:1477832704    INFO: Loading special://profile/Lircmap.xml

you also can check the incoming remote control commands with

press any keys on your remote and you should see the name for that key. To close irw, use strg-c.

tail -f /home/[xbmc-user]/.xbmc/temp/xbmc.log

you can see the keys pressed and the executed commands in xbmc with your remote control.

have fun using your working remote in xbmc!

- anton610 - 2009-12-03 20:14

Hey Thank you very much!!!

you made my day!Big GrinBig GrinBig Grin


Ubuntu 9.10 - anton610 - 2009-12-07 16:21


I've tried it in 9.10, but it didn't worked...

does anybody tried it also in ubuntu 9.10??

Regards Anton

- lx_cool_j - 2009-12-07 18:02

hi anton610,
are there any errors? do you get any response when you use irw? any errors in the xbmc.log?

regards alex

- anton610 - 2009-12-08 18:33

Hello, there are no errors.

of the remote are only a few buttons who work.

Ive found a sec. howto

I'll try and report.

regards Anton

- TheHeadGear - 2009-12-16 21:19

Thanks very much for posting this howto. I had trouble getting all the keys working. In the end, I did everything as posted with the exception of using the following to start lircd. I put these directly into /etc/rc.local rather than creating a separate sh script in my home folder.

sudo vim /etc/rc.local

/etc/init.d/lirc stop
    lircd --driver=devinput --device=/dev/input/event3 --output=/dev/lircd --listen --pidfile=/var/run/lirc1.pid$
    lircd --driver=devinput --device=/dev/input/event4 --output=/dev/lircd --connect=localhost:8765 --pidfile=/var/run/lirc2.pid$

- lx_cool_j - 2009-12-17 18:34

thank you @TheHeadGear,
there was a copy/paste error in my tutorial... i changed the lines regarding lircstart.sh in my post to the code i use. hope, it works now.

this could also be the solution for @anton610

- DocEvil - 2009-12-22 00:19

first, thanksfor the tutorial, but it is not working for me.

let me explain, what i did.

I Installed Ubuntu minimal with openssh server, then followed the Instruktions in the XBMC Wiki found here: http://wiki.xbmc.org/?title=XBMCbuntu.

Everthing works fine, only the damn remote from HAMA. I have until now no sound issues, no graphic issues, and the SMB Network with my Windows PC works fine.

So i install then straight following your tutorial lirc, everything was fine, editing the files, change chmod until even the thing with the event3 and event4. My ION has a bit more Harware at the USB connetors, so i have to changed that to event6 and event7.

But when i write this command in the terminal via ssh:

cat /home/[xbmc-user]/.xbmc/temp/xbmc.log | grep remote.xml

nothing happen. Of course i rebbot my Asrock ION 330 before i tested it.

Take a look at your tutorial the next command ist the same command like before.

Sounds strange, or?

So then I tried the other commans, like

but no input was shown and the last command

tail -f /home/[xbmc-user]/.xbmc/temp/xbmc.log

displays also nothing on the screen.

So i'm a littlebit crazy, trying to install all the things with xbmc the last three days and then that.

S, eventually you can told me, how i unstall lirc, to try it again, or you know my problem and have a solution for me

- DocEvil - 2009-12-22 18:30

excuse my double post, but i want you to know, that i have a little success, with


i could ffind out the keymapping from my hama remote, so please tell me, what in which section i must adjust, to get my remote with this keybinding to work.

here are my commands recorded by me

00000000000100ac 00 HOMEPAGE hama_52451 -- this is the Button with an "e"

000000000001008e 00 POWER hama_52451
0000000000010014 00 YELLOW hama_52451
0000000000010032 00 BLUE hama_52451
0000000000010017 00 GREEN hama_52451
0000000000010012 00 RED hama_52451
0000000000010018 00 TV hama_52451
0000000000010022 00 PICTURES hama_52451
0000000000010014 00 YELLOW hama_52451 -- this is the Button next to TV
0000000000010032 00 BLUE hama_52451 -- that's the Button next to the Button before

0000000000010030 00 REWIND hama_52451
00000000000100a4 00 PLAYPAUSE hama_52451 -- big Playbutton
0000000000010021 00 FASTFORWARD hama_52451
00000000000100a5 00 PREV hama_52451
00000000000100a3 00 NEXT hama_52451
00000000000100a6 00 STOP hama_52451
00000000000100a4 00 PLAYPAUSE hama_52451  --small Pause button
0000000000010013 00 REC hama_52451
000000000001000e 00 BACK hama_52451
0000000000010111 00 INFO hama_52451
0000000000010067 00 UP hama_52451
0000000000010069 00 LEFT hama_52451
000000000001006a 00 RIGHT hama_52451
000000000001006c 00 DOWN hama_52451
000000000001001c 00 ENTER hama_52451 -- OK Button
0000000000010110 00 BTN_LEFT hama_52451
0000000000010111 00 INFO hama_52451 -- this is the Button marked with right Mouseclick

0000000000010073 00 VOLUMEUP hama_52451
0000000000010072 00 VOLUMEDOWN hama_52451
0000000000010071 00 MUTE hama_52451
0000000000010068 00 CHANNELUP hama_52451
000000000001006d 00 CHANNELDOWN hama_52451
000000000001001c 00 ENTER hama_52451 -- green START Button
000000000001004f 00 1 hama_52451
0000000000010050 00 2 hama_52451
0000000000010051 00 3 hama_52451
000000000001004b 00 4 hama_52451
000000000001004c 00 5 hama_52451
000000000001004d 00 6 hama_52451
0000000000010047 00 7 hama_52451
0000000000010048 00 8 hama_52451
0000000000010049 00 9 hama_52451
0000000000010037 00 STERN hama_52451
0000000000010052 00 0 hama_52451
0000000000010051 00 3 hama_52451 -- this and the next one are displayed when i pushing the # Button
000000000001004c 00 5 hama_52451
000000000001003e 00 CLOSE hama_52451
0000000000010001 00 CLEAR hama_52451
000000000001001c 00 ENTER hama_52451 -- the Button marked with Enter

i forget to say, that in XBMC only the Volume Buttons and a few other Buttons will work, about ninty Percent dont make anything while pushing it

oh god, the important thing i forget to say, i'm using minimal Ubunto 9.10 karmic. so this is eventually important for you.

- anton610 - 2009-12-23 10:10

lx_cool_j Wrote:thank you @TheHeadGear,
there was a copy/paste error in my tutorial... i changed the lines regarding lircstart.sh in my post to the code i use. hope, it works now.

this could also be the solution for @anton610

Thank you!!

I'll try it soon

- lx_cool_j - 2009-12-23 16:31

to completely remove lirc enter
sudo apt-get purge lirc
in your terminal.

have you replaced [xbmc-user] to your ubuntu username in all of the commands and pathes listed in my tutorial?
for example, if your username is xbmc, the correct command should be:
cat /home/[b]xbmc[/b]/.xbmc/temp/xbmc.log | grep remote.xml

i only tried this on ubuntu 9.04 (my machine and a friend's) but normally, it should work on 9.10 too.

- DocEvil - 2009-12-23 17:58

sure, i completly removed lirc with the command you posted, after that, a complete reinstall was made. So now i can use

irw to look which remote actions are function, but like i wrote, the command you are posting again, have no effect, no output in terminal.

- lx_cool_j - 2009-12-24 13:03

if you see the pressed buttons of the remote in irw, there has to be an error with your Lircmap.xml or remote.xml in the userdata directory of xbmc. the first letter of Lircmap.xml has to be upper case.

do you see a xbmc.log in your xbmc temp directory?
in my case /home/xbmc/.xbmc/temp

also, in my xbmc, i have checked the option "remote control sends keyboard presses" and "enable mouse" from the "input devices" section. you may also check the option debug logging in the system settings.

good look!

- vibowit - 2009-12-28 03:36

To make it work under Karmic you have to edit:

add one line to it
ln -s /var/run/lirc/lircd /dev/lircd

With this modification it works like a charm in Karmic and XBMC 9.11 beta2.
I have not hama, but Vista MCE Remote VRC-1100 and the codes are identical.

Thanks and regards.