[LINUX] Generic HID Remote Driver for XBMC (Drivers for XBMC on Linux and XBMC Live) - 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)
+---- Forum: Linux and Live support (/forumdisplay.php?fid=52)
+---- Thread: [LINUX] Generic HID Remote Driver for XBMC (Drivers for XBMC on Linux and XBMC Live) (/showthread.php?tid=88560)
- Cucurbitace - 2011-01-24 21:12
Thanks for the work. I'm going to give it a try right now!
- Diego2002 - 2011-01-25 23:43
I'm using the next Ubuntu distribution:
Distributor ID: Ubuntu
Description: Ubuntu 10.04.1 LTS - XBMCLive Dharma
I compiled the code successfully now (after deleting the three keys from keys_definition.cpp). After that - I had the same problem as Cucurbitace, I needed to use the beta version. Everything worked, I created a map file, only to test, with this content:
I tried to load this map, but I received this error:
Loaded map file test.map
Found HID device
Opened HID interface on /dev/hidraw0
Unable to setup event device
I have to admit, I skipped a step: to blacklist the device in Xorg, becasuse I thought it's not necessary with this distro.
Could be this the problem?
Should I make a try?
- coldsource - 2011-01-26 00:57
Could you confirm me that learn mode is working ?
Also check that you are runing hid_mapper as root, uinput won't be able to create device as non-root.
You can also check the properties on uinput file :
Quote:ls -l /dev/uinput
It is possible that your kernel doesn't have built-in uinput support, as root try
Quote:modprobe uinputAnd then relaunch hid_mapper.
If none of these work, could you post the result of :
Quote:ls -l /dev/uinput
Concerning Xorg blacklist, I don't think it could cause the error. It is just used to avoid double keys inputs (from Xorg and from the HID mapper).
- Cucurbitace - 2011-01-26 08:17
sorry for the late reply, I could not get full access to the computer before, it's the media server of the flat and I had to wait for no one to use it.
Anyway, it didn't work.
Here is the result of the command:
./hid_mapper --learn --lookup-id --manufacturer '13ec' --product '0006'
At first I thought that is might be because I didn't blacklisted the remote from X11. So I did create a 50-remote.conf in /usr/share/X11/xorg.conf.d like you explained at the beginning of this thread. Here it is:
And it works, my computer doesn't get input from the remote anymore. But the command still gives the same error.
- coldsource - 2011-01-26 10:41
Are you sure you are running hid_mapper as root ? Detection can be done as non-root but not mapping.
Try running it with a sudo it should work.
- Cucurbitace - 2011-01-26 16:43
Yup, my bad, I used the command as a normal user. Thanks. I'll give a try again as soon as I have full access to the media center.
- Diego2002 - 2011-01-26 22:12
Yes, I can confirm, that learn mode is working, because when I press a button, a lot of numbers appear.
I logged in as root also.
Quote:ls -l /dev/uinput
Quote:modprobe uinputQuote:Returns nothing (no output, not errors)
So the next try:
Quote:ls -l /dev/uinputQuote:crw-r----- 1 root root 10, 223 2011-01-26 20:52 /dev/uinput
Quote:dmesg | tailQuote:[ 1080.652048] usb 3-4: new low speed USB device using ohci_hcd and address 2
Quote:uname -aQuote:Linux XBMCLive 2.6.32-26-generic #48-Ubuntu SMP Wed Nov 24 09:00:03 UTC 2010 i686 GNU/Linux
I tried to run once more the command, but now the message is different:
Quote:Loaded map file test.map
At this point the bash signal dissapears, I can press any button, and only Ctrl-C stops whatewer it does...
- coldsource - 2011-01-27 00:23
The main problem comes from the fact that uinput if not built in your kernel. After loading the module with:
Quote:modprobe uinputuinput is loaded correctly since you can see the uinput main device in /dev/uinput as ls shows.
I think the last try was the good one because the last message of :
Quote:Loaded map file test.mapproved hid_mapper started correctly.
At this point you should be able to press the remote button you mapped as 'KEY_F' and see a 'F' appear in any X application. If it does not work try blacklisting your remote from Xorg because it can cause confilcts to have both Xorg and hid_mapper listen to the same device.
Remember that hid_mapper must be running when you press the remote button for this to work (pressing CTRL C will quit hid_mapper). If it is working you can do the full mapping and start hid_mapper at boot by starting it in /etc/rc.local.
- Cucurbitace - 2011-01-27 19:43
It is working ! Thanks a lot ! I still have to make a clean map file (5 keys are not recognized and I have to figure out how map all the others). But congratulations coldsource, nice piece of coding you've made.
- Cucurbitace - 2011-01-27 22:05
I was hoping to use this post to share my map file, but I found another problem:
Every key that use a value above 9 (A to E) is not recognized by the program.
Here is my actual zydacron.map:
So this keys don't work: BACKSPACE, RIGHT, 1 and 2. I've tried to capitalize, but it doesn't change anything.
coldsource, any idea where it can come from ?