[LINUX] Generic HID Remote Driver for XBMC (Drivers for XBMC on Linux and XBMC Live) - Printable Version +- Kodi Community Forum (https://forum.kodi.tv) +-- Forum: Support (https://forum.kodi.tv/forumdisplay.php?fid=33) +--- Forum: General Support (https://forum.kodi.tv/forumdisplay.php?fid=111) +---- Forum: Linux (https://forum.kodi.tv/forumdisplay.php?fid=52) +---- Thread: [LINUX] Generic HID Remote Driver for XBMC (Drivers for XBMC on Linux and XBMC Live) (/showthread.php?tid=88560) |
- UsagiYojimbo - 2011-03-14 MrFX Wrote:thanks for the hint, but my map with the entries above is working well.I see. It is also have the benefit of specifying the buttons one want to repeat. E.G. only the volume up and down buttons should repeat, the others not. - uryu_ishida - 2011-03-15 I have some bizarre problem where, I think, after installing bluez and xbmc-wiiremote (was trying to get the wiimote set up for game playing), hid_mapper stopped recognizing the device. Somehow, hid_mapper started working again, but now it refuses to load at startup, though it loads fine if I run it in a terminal. This remained true after removing bluez and xbmc-wiiremote. I have tried to get hid_mapper to load through rc.local, autoexec.py and runXBMC, but none of them work. And since none of them provide useful logging (as far as I know), I can't tell what's going on. Mouse button support - godfreydanials - 2011-03-16 coldsource, Thanks very much for you efforts with this driver. It has enabled me to use my Jetway remote for something other than a paperweight. I will soon be able to remove the wired keyboard and mouse, then put the nettop into the cabinet. Did you remove the BTN_LEFT and BTN_RIGHT mouse button support from the latest driver? When I start hid_mapper, it does not like the map file. Here is the error: $ sudo ./hid_mapper --manufacturer 'Cy se̪http://www.ir' --product 'www.irfmedia.com UIR' --map /etc/hid_mapper/jetway_mini.map Error loading map file [ MapReader ] Unknown key name at line 32 I have the Jetway mini-top and I am using the bundled Jetway remote. All mapped keys worked before I added the 2 mouse buttons to the map file. Here is the last section of my map file: 30 0100080000000000:KEY_VIDEO 31 0c00280000000000:KEY_ESC 32 0101000000:BTN_LEFT 33 0102000000:BTN_RIGHT What have I done wrong? - UsagiYojimbo - 2011-03-17 godfreydanials Wrote:Here is the last section of my map file: I hope those line numbers are not in the map file, just in this listing! - coldsource - 2011-03-17 godfreydanials Wrote:coldsource, Hi godfreydanials, Mouse buttons should still be working (just tested on my box and it works) . Could you tell me which distribution you are using ? You could also check that BTN_LEFT and BTN_RIGHT are defined in /usr/include/linux/input.h (they should). Last thing to try : Code: make clean To make sure you haven't old object files remaining from a previous compilation. - UsagiYojimbo - 2011-03-17 uryu_ishida Wrote:...now it refuses to load at startup, though it loads fine if I run it in a terminal. Seem to fail to load some kernel modules, that get loaded later on the starting up process. Another possibility could be the executing environment: In the startup script try to run it through "exec". E.G: Code: modprobe uinput - godfreydanials - 2011-03-19 UsagiYojimbo, I have been using vi for the past 20 years, the numbers are output with the et number option. This is simply what I am used to. 28 00004c0000000000:KEY_DELETEFILE 29 0100100000000000:KEY_AUDIO 30 0100080000000000:KEY_VIDEO 31 0c00280000000000:KEY_ESC 32 0101000000:BTN_LEFT 33 0102000000:BTN_RIGHT I have Ubuntu 10.10 with uinput running. coldsource, You were correct with the old object files. Now the BTN_LEFT & BTN_RIGHT keys work. However the KEY_DELETEFILE is no longer recognized. This key worked with your previous version. I commented line 28 of the map file and the driver successfully loaded with no complaints about lines 32 or 33 in the map file. I am using the same /usr/include/linux/input.h, which has not changed and contains all these keys. This is the error when I start this latest (clean build) driver: $ sudo /usr/local/bin/hid_mapper --manufacturer 'Cy se̪http://www.ir' --product 'www.irfmedia.com UIR' --map /etc/hid_mapper/jetway_mini.map Error loading map file [ MapReader ] Unknown key name at line 28 Did you unintentionally drop the support for the KEY_DELETEFILE button? - coldsource - 2011-03-20 godfreydanials Wrote:Did you unintentionally drop the support for the KEY_DELETEFILE button? Yes, it was an error in the keys definition. Here is an updated version : hid_mapper_beta.tar.gz Let me know if it works - godfreydanials - 2011-03-21 It is all working now. Thanks again for your fine work! - uryu_ishida - 2011-03-22 UsagiYojimbo Wrote:Seem to fail to load some kernel modules, that get loaded later on the starting up process.Doesn't work, and hid_rc.log says this: Code: Unable to find specified HID device I can't load hid_mapper until a few seconds after the XBMC main screen shows up. And my remote doesn't work until then either. - UsagiYojimbo - 2011-03-22 uryu_ishida Wrote:Doesn't work, and hid_rc.log says this:I still believe some modules are not loading in time... Could you check lsmod before and after the XBMC main screen? Look for module-names that contain usb or hid, also modules depending on these. If found add those in the starting script, just as uinput was: modprobe module-name - uryu_ishida - 2011-03-22 UsagiYojimbo Wrote:I still believe some modules are not loading in time... So the hid and usbhid modules weren't loading until after the main screen. I added those to rc.local, and they now load before the main screen, but hid_mapper oddly still won't load until after the main screen. Also, hid_mapper --list-devices doesn't show any devices until after the main screen loads, if that helps. - coldsource - 2011-04-03 Hi uryu_ishida, I've developped a new option on the mapper that should help in your case. It is available at : hid_mapper_beta.tar.gz You can now use --wait-device switch on the command line to make hid_mapper waits for the device for the specified number of seconds. For example, if you set --wait-device 30, hid_mapper will try to find the device every second for 30 seconds before exiting. If the device is found before the timeout, hid_mapper starts normally. Hope this helps - Dizzzeh - 2011-04-30 Hey, I'm having some problems getting this driver to work. I'm using a Jetway Mini-top system with XBMC-Live installed. I can get the driver to list the devices, and it finds: Quote:Found HID device at /dev/hidraw2 But when I try to capture events, I get this result: Quote:sudo ./hid_mapper --lookup-id --manufacturer 'Cy se̪http://www.ir' --product 'www.irfmedia.com UIR' --map 'maptest.map' If I run the same command using the hex values that I found during the look-up, I get the same result: Quote:sudo ./hid_mapper --lookup-id --manufacturer '0755' --product '2626' --map 'maptest.map' It doesn't seem to matter if I use the apha-numeric values or the hex values that I find using the --list-devices switch, I get the same error message regardless. Any suggestions? - Arquero - 2011-05-02 I have a Jetway Mini-top with Ubuntu 11.04 running XBMC. I've been using hid_mapper for a while and it worked great. I told Ubuntu to ignore the remote so mappings only went through hid_mapper. I also had hid_mapper load on startup with a script. I recently upgraded Ubuntu from 10.10 to 11.04 and after redoing my settings to get the sound and everything working again for xbmc, I noticed the remote no longer is working. Running the normal command returns an error: Code: sudo /root/hid_mapper/hid_mapper --lookup-id --manufacturer '0755' --product '2626' --map /root/hid_mapper/remote.map The ids are correct. Code: sudo /root/hid_mapper/hid_mapper --list-devices --lookup-id This is the same output 10.10 gave me. Running --learn tells me the same thing. I may be missing something obvious, but is it possible there is something different between 10.10 and 11.04 that doesn't allow hid_mapper to find HIDs? |