![]() |
|
[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) |
- coldsource - 2011-01-02 15:44 Hi jpmayo. The driver works as a daemon, so it is normal that you have to run it on each boot for the mapping to work. Also is it normal to run it as root, because of the default properties of the HID files in /dev (only readable by root). I think the simplest would be to but something in /etc/rc.local, like : Quote:hid_mapper --manufacturer '...' --product '...' --map '...' & Put it before the exit statement. It should be enough to make it work. Hope this helps - jpmayo - 2011-01-15 06:55 I tried that, but it dosen't seem to work. I can only get it to work if I got to terminal and type Quote:sudo /./hid_mapper --manufacturer 'Cy se' --product 'W-01RN USB_V3.1' --map '/s$ - Diego2002 - 2011-01-18 00:13 Hello coldsource! I try to compile the source, but I get this error to make: root@XBMCLive:/home/xxx/hid_mapper/hid_mapper# make g++ -c -Iinclude main.cpp gcc -c -Iinclude uinput_device.c gcc -c -Iinclude hid.c gcc -c -Iinclude signals.c g++ -c -Iinclude keys_definition.cpp keys_definition.cpp:458: error: âKEY_CAMERA_FOCUSâ was not declared in this scope keys_definition.cpp:705: error: âKEY_RFKILLâ was not declared in this scope keys_definition.cpp:777: error: âKEY_WPS_BUTTONâ was not declared in this scope make: *** [keys_definition.o] Error 1 I had deal with c++ a long time ago, so I can not really find the problem. I checked those lines, but nothing interesting. It's even else... Can you help plz? Thx Diego - coldsource - 2011-01-21 12:17 What it your Linux distribution ? This file does mapping between text description of keys and standard constants. I have generated the file based on ubuntu 10.10 so it is possible that you do not have all the keys defined. One solution could be to delete the entries that are not recognized from the file, it should be harmless. Just be careful to remove entries from both arrays (keys_char and keys_int : one have quotes around values and the other not). Then recompile and it should be ok. - Cucurbitace - 2011-01-22 12:29 Hi, I feel this might just be the solution I'm looking for quit a few time! The program compiled fine, but when I use the command: hif_mapper --list-devices I get this: Code: Found HID device at /dev/hidraw0The last one is my remote, but as you can see, there is no manufacturer nor product name. Any idea what I may try? Thanks - coldsource - 2011-01-23 14:15 Hello Cucurbitace, Could you try this : Quote:uname -a And post the results here please. Also could you tell me which distribution you use ? Thanks - Cucurbitace - 2011-01-23 21:44 Hi, thanks for trying to help. I'm using Ubuntu 10.10 (32 bits)Here are the results of the commands: uname -a Code: Linux ubuntu 2.6.35-24-generic #42-Ubuntu SMP Thu Dec 2 01:41:57 UTC 2010 i686 GNU/Linuxudevadm info --attribute-walk --name=/dev/hidraw3 | grep manufacturer Code: ATTRS{[color=#990000]manufacturer[/color]}=="Linux 2.6.35-24-generic uhci_hcd"udevadm info --attribute-walk --name=/dev/hidraw3 | grep product Code: ATTRS{[color=#990000]product[/color]}=="UHCI Host Controller"I hope you can get something out of this.
- coldsource - 2011-01-23 23:26 Ok, it seems the problem is that your device is UHCI and not OHCI (had only tested on OHCI) and so does not report proper informations. Could you try : Quote:lsusb And a full attribute walk : Quote:udevadm info --attribute-walk --name=/dev/hidraw3 Not sure but I think even so it will report a proper Vendor ID and Product ID. If it is the case I'll write a patch so you can select the proper device by specifying ID instead of names and it should work. - Cucurbitace - 2011-01-23 23:52 Here goes lsusb: Code: Bus 008 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hubI suppose we can tell it is Zydacron HID Remote Control we're talking about. And here is the full attribute one: Code: Udevadm info starts with the device specified by the devpath and thenThanks. - coldsource - 2011-01-24 00:59 Thanks for the informations Cucurbitace, It is working as I suspected, that is it reports only numeric vendor and product name. I have written a patch that you can download here : hid_mapper_beta.tar.gz Using this patch you can now use numeric IDs : Quote:./hid_mapper --list-devices --lookup-id Based on lsusb I think it should work with something like this : Quote:./hid_mapper --learn --lookup-id --manufacturer '13ec' --product '0006' Hope it will work ! |