[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)
- Juanjo - 2010-09-15 13:40
it seems the power key does not send a keyup code, so the program thinks its still pressed, there is probably a more elegant way to fix it, but since it is the only key i could find with that problem, i patched it here.
in file hama_mce.cpp, line 182:
if (repeat_fn != NULL && repeat_key != NULL)
if (repeat_fn != NULL && repeat_key != NULL && repeat_key != "power")
still i have ditched this awesome tool, cos i quit xbmc and run tvtime for live tv, and this takes control over the remote, and it does not work with tvtime... im using a modified version of inputlirc guide also found in xbmc documentation now. only thing i cant make work is the mouse and diferentiating the right mouse button from the info button. the rest i mapped it all perfectly.
if/when i get another tv card ill surelly switch to tvheadend and definately go back to using hama_mce
EDIT: I just downloaded the latest version, fyfe fixed the power button bug in the translation table
- Juanjo - 2010-09-15 13:57
i just noticed your new code which allows the keys to be remapped.
i have some programming skills, but most of what ive done, has been on windows.. i dont know a lot of linux insights, but is the code able (or maybe able, with a few mods) to work more alike lirc or make it to be able to send codes to other program other than xbmc ? i'd love to make this work with tvtime.
tv time uses an external program to send commands, and i am using irexec from lirc to make it work...
you think its possible to make this program work in a way similar as that ?
thanks in advance
EDIT: sorry for the repeated posting, hehe. my head is on a roll.
Ive tried to make the combo xbmc-tvtime work with this, but i had the problem that hama_mce keeps control of the 2 remote devices, so when i try to run inputlirc, it does not work, and if i kill hama_mce the devices are not restored, is there a way to gracefully end this program and release control over the devices so lircd can access them ? the devices disapear from the list when this program takes control..
- fyfe - 2010-09-15 21:48
I get the sluggishness response sometimes as well, it's a problem with the remote hardware it can be a little inconsistent sending ir codes.
Play and pause both send the same code so there's no way to map them individually.
The problem with the power button getting stuck has been fixed in my code.
I'll have a look at tvtime and see if it can be done.
- hudo - 2010-09-15 22:30
Thanks for the prompt response, fyfe!
And thanks again for all your hard work!
- Juanjo - 2010-09-16 05:36
thanks fyfe, it would be very cool.
thanks for the work
EDIT: I just installed the latest v1.2 and the right click button is erratic. sometimes you get a emit_right_click, sometimes you get an info button, and sometimes you get nothing
i kinda found a way to recover the devices after hama_mce is killed, but it involves modprobe -r usbhid and modprobe usbhid again. but it needs sudo access, and i dont know how to make it work inside the X script that runXBMC generates. outside the X window i can make it work, bt inside X it asks for sudo password no matter what switch i use.. i need to figure this out, but having the functionality of :
send normal xbmc commands
would be awesome
thanks again fyfe!
- fyfe - 2010-09-16 10:56
To fix your sudo problem edit the sudo config file:
$ sudo visudo
and add the following line
xbmc ALL = NOPASSWD: modprobe
- fyfe - 2010-09-16 13:32
Ignore my last post try v1.3 instead. It releases the remote back to the system and recreates the missing devices when you exit hama_mce.
- Juanjo - 2010-09-16 14:23
you are a genius, fyfe.
I just have 1 question, how do you gracefully exit hama_mce ?
or when it gets SIGKILL it exits and recreates the devices?
thanks a lot
- fyfe - 2010-09-16 14:25
Juanjo Wrote:AWESOME!It'll recreate the devices if you send it sigterm or sigint:
killall -s SIGINT hama_mce
- Juanjo - 2010-09-16 14:52
fyfe Wrote:It'll recreate the devices if you send it sigterm or sigint:
Excelent, ill modify runXBMC to make it create a new script that kills hama_mce when xbmc exits and runs inputlirc for tvtime, and on exit tvtime, restart hama_mce before running xbmc again.
thanks a lot, fyfe, ill post results