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.
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.
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?
godfreydanials Wrote: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?
I hope those line numbers are not in the map file, just in this listing!
godfreydanials Wrote:coldsource,
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.
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
make
sudo ./....
To make sure you haven't old object files remaining from a previous compilation.
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
exec /usr/local/sbin/hid_mapper --manufacturer '...' --product '...' --map "/usr/local/share/hid/ModeCom.map" >> /var/log/hid_rc.log 2>&1 &
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?
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
It is all working now.
Thanks again for your fine work!
UsagiYojimbo Wrote: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
exec /usr/local/sbin/hid_mapper --manufacturer '...' --product '...' --map "/usr/local/share/hid/ModeCom.map" >> /var/log/hid_rc.log 2>&1 &
Doesn't work, and hid_rc.log says this:
Code:
Unable to find specified HID device
Loaded map file '...'
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.
uryu_ishida Wrote:Doesn't work, and hid_rc.log says this:Code:
Unable to find specified HID device
Loaded map file '...'
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.
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
UsagiYojimbo Wrote: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
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.
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
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
Manufacturer : Cy se̪http://www.ir
Product name : http://www.irfmedia.com UIR
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'
Loaded map file maptest.map
Unable to find specified HID device
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'
Loaded map file maptest.map
Unable to find specified HID device
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?
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
Loaded map file /root/hid_mapper/remote.map
Unable to find specified HID device
The ids are correct.
Code:
sudo /root/hid_mapper/hid_mapper --list-devices --lookup-id
Found HID device at /dev/hidraw0
Manufacturer : 0755
Product name : 2626
Found HID device at /dev/hidraw1
Manufacturer : 0755
Product name : 2626
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?