[LINUX] Generic HID Remote Driver for XBMC (Drivers for XBMC on Linux and XBMC Live) - Printable Version
+- Kodi Community Forum (http://forum.kodi.tv)
+-- Forum: Help and Support (/forumdisplay.php?fid=33)
+--- Forum: Kodi 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)
- Diego2002 - 2011-01-27 23:48
I tried this x11/xorg blacklisting, but in /usr/share/x11 there isn't such folder xorg.conf.d.
The situation anyway isn't changed, my custom map isn't recognized.
Slowly I give up, because I have only two buttons (Power off, and Win key), which aren't working on my remote, I try to live without these.
- coldsource - 2011-01-28 11:50
Cucurbitace Wrote:Every key that use a value above 9 (A to E) is not recognized by the program.
My fault it was a bug in the code. I have updated the beta version to correct this. Try redownloading the archive to see if it works.
Still not detecting these keys - akr884 - 2011-01-28 12:47
coldsource Wrote:My fault it was a bug in the code. I have updated the beta version to correct this. Try redownloading the archive to see if it works.
First of all, thanks a lot for these drivers.
I just downloaded the beta version again and it has the same issue with not detecting keypresses that have letters (for me a - f).
edit: Updating the beta driver on my laptop didn't work (I use it for testing) but installing the beta cleanly on my Media Center PC worked.
- Cucurbitace - 2011-01-29 11:22
Congratulations coldsource, the new beta is doing really good.
Here is my map:
I add to edit keyboard.xml config from XBMC too in order to have all the keys working the way I wanted. Here are the changes:
At the moment I still run it manually, as soon as you think it's not a beta anymore, I'll install it properly.
Thanks again for the great work.
Buttons Sticking - akr884 - 2011-01-30 21:55
I've got a generic USB HID mce remote: 073a:2230 that has a mouse input pad.
The button presses that it sends is something like this for the mouse pad
with the xx starting off as one thing and changing maybe 7 times before it sticks definitively (if I hold the button down).
Each direction has a unique pattern, but no matter which number I choose in the sequence as the Action capture to define the button in my .map file, the button sticks until I push another button.
It's not a deal-breaker, but I was wondering if there is a possible fix for this.
I tried to block out only the keyboard and not the mouse input in xorg, but I couldn't get that to work either.
It shows up as /dev/input/by-id/xxx/mouse
/dev/input/by-id/xxx/mouse-event-server - but this one is the only one that shows up on the event input query using cat.
- Grez - 2011-01-31 22:59
This is brilliant, thank you so much Coldsource, this driver/app has solved all my Remote niggles with my Jetway Mini-TOP.
The jetway has a built in IR that shows up as:
Found HID device at /dev/hidraw3
Manufacturer : Cy se̪http://www.ir
Product name : http://www.irfmedia.com UIR
Here's my map, I basically remapped most of the more useless buttons on the bundled remote into keys to do useful things in XBMC as follows:
Standby = L (next sub)
Close = Q (add to queue)
Magnifier = A (audio delay)
www = T (toggle subs)
Full Screen = Z (aspect ratio)
Desktop = O (codec info)
Mic OSD = C (context menu)
WindowToggle = I (info)
I then made my Harmony remote learn all these, mapped them to the right buttons on the Harmony and I can shove the useless bundled remote into a drawer.
- coldsource - 2011-02-01 12:49
Hi everyone and thanks for the feedback.
Based on your results and on the tests I have made I think the beta version is now stable enough, so I have placed it as stable.
I'll post a startup script using upstart for those using ubuntu so you can cleanly start the mapper at boot time.
Some devices simulate multiple interfaces (for mouse and keyboard for example).
When you start the mapper, do you see multiple :
Quote:Opened HID interface on ...And if it is the case could you post the output at startup.
If I understand your problem, the mapping works but the key repetition doesn't. Is it right? I'm not sure to understand what you would like to do.
Could you also post the exact model of your remote ?
- Shayan - 2011-02-02 01:58
Thanks for putting this together, it works great. It got me to register just to say thanks for putting this together.
However, there was one bug I ran into. When I do a ./hid_mapper --list-devices, I have 6 devices attached to my machine, the last 3 of them have the Manufacturer as unknown. So in this block of code
Even though it found my HID device earlier in its loop, the code still exits out with a -1 causing the program to say the HID device was not found.
I did a quick hack, which works for me. If it found some devices earlier, return 0 instead of -1, but I didn't go and check if that works if the valid HID device is after devices with an unknown manufacturer.
Here's my updated block of code
Hope this helps.
- coldsource - 2011-02-02 10:42
Shayan Wrote:However, there was one bug I ran into. When I do a ./hid_mapper --list-devices, I have 6 devices attached to my machine, the last 3 of them have the Manufacturer as unknown.
I think you could use the --lookup-id if some devices have unknown manufacturer or product name, it should do the trick.
Quote:./hid_mapper --list-devices --lookup-id
- UsagiYojimbo - 2011-02-02 13:29
Thanks for this driver!
It works with the IR receiver in my ModeCom FEEL 607 MediaCenter case. I will post the mappings for my remotes (i have 2 of them).
- akr884 - 2011-02-05 19:16
Quote:If I understand your problem, the mapping works but the key repetition doesn't. Is it right? I'm not sure to understand what you would like to do.
From the hid lookup
Quote:aaron@aaron:~/Desktop/hid_mapper_beta$ ./hid_mapper --list-devices --lookup-id
This is holding the 'mouse' up arrow for a few seconds
Quote:Opened HID interface on /dev/hidraw0
No matter which code I choose as the action button among those, the key press sticks until I push another button. My guess is that the 'mouse' buttons just have a key press that isn't followed by a key release, so the button just 'sticks' and repeats until I press something else. My solution was to route the 'keyboard' through hid_mapper and let X control the 'mouse' but I can't get X.org to only ignore one of the two inputs and if I use hid_mapper, the 'mouse' is useless because all the button presses stick (hid_mapper works well for me, it would just be nice to be able to get these buttons working too)
The remote is a cheap MCE remote from amazon.co.uk
I think it's this one, but I couldn't get it to work with lirc in ubuntu 10.10; nothing would show up using irw after successfully programming the remote.
- coldsource - 2011-02-09 01:25
Hi and sorry for the late reply.
Here is the upstart script to place in /etc/init/remote_mapper.conf :
Be careful to use full paths and not relative ones as you can't know the working directory of upstart.
Also note that this is an upstart script, it will work for ubuntu only. For other distributions you can use /etc/rc.local or the standard init scripts.
I confirm that there is no key up notification or at least that hid_mapper won't detect it as it expects an all 0 code. Did you also release the key in your previous example ? Because even if the 'Key up' code was '02 00 00 e6' (the last event from your dump), it sounds strange that it is emitted multiple times.
Could you try with several key and try to guess what is the key up code ? If it is fixed I could add a command line option to specify it and all should be working well.
- akr884 - 2011-02-09 21:09
The remote emits all those numbers in sequence (not all at once) when I hold the 'mouse' up key for maybe a second-and-a-half. I can choose any one of those key codes and use it as the hook in my .map file and it works (of course, if I choose a code that's further down, there's a delay between holding the 'mouse' up and getting a button response though).
If I just tap the button, then the only output is
02 00 00 fc
A longer press gives
02 00 00 fc
02 00 00 fa
However, regardless of which button press I use as the key code in the .map file, the button 'sticks', meaning even a quick press causes continuous upward scrolling (if it's programmed as the 'up' button) until I hit another key. I think that, because they're 'mouse' presses, the remote sends key presses without indicating a key release like it does with all the other buttons (which work fine).
I think that the button sequence changes as I hold it down to create accelerated mouse scrolling, but again that's just a best guess.
- coldsource - 2011-02-09 23:05
akr884 Wrote:I think that the button sequence changes as I hold it down to create accelerated mouse scrolling, but again that's just a best guess.
I also think so. These keys must me programmed for mouse movement so of course there is no key release. I'll write a new beta version with a specific map file for mouse events. This will be used to map key codes to movements (e.g. up by 4 pixels). This way you'll be able to setup these buttons with acceleration setting, that is :
Quote:02 00 00 fa = Up 1 pixel
I think this is the only way to setup these buttons correctly.
I'll post here as soon as the new beta version is ready.
Thanks for the new informations.
upstart script - Shayan - 2011-02-10 05:38
coldsource Wrote:Hi and sorry for the late reply.
This is my first time messing around with upstart, and it doesn't seem to work for me. I placed the remote_mapper.conf file in the /etc/init directory. However, it doesn't seem to start the service at bootup. I'm not sure if there is anything extra that I need to do.
Right now once the system boots up, if I do a status remote_mapper it says the service is stopped. If I do a start remote_mapper, there is an error and the service doesn't start. However, if I do a sudo start remote_mapper, the service starts fine.
Is there something that needs to be configured for upstart to start remote_mapper at boot time?