[LINUX] Generic HID Remote Driver for XBMC (Drivers for XBMC on Linux and XBMC Live)

  Thread Rating:
  • 7 Votes - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply
UsagiYojimbo Offline
Member
Posts: 83
Joined: Feb 2010
Reputation: 1
Location: Debrecen, Hungary
Post: #121
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.
find quote
uryu_ishida Offline
Junior Member
Posts: 23
Joined: Mar 2011
Reputation: 0
Post: #122
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.
find quote
godfreydanials Offline
Member
Posts: 66
Joined: Jan 2011
Reputation: 0
Post: #123
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?
find quote
UsagiYojimbo Offline
Member
Posts: 83
Joined: Feb 2010
Reputation: 1
Location: Debrecen, Hungary
Post: #124
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! Cool
find quote
coldsource Offline
Junior Member
Posts: 41
Joined: Dec 2010
Reputation: 0
Post: #125
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.
find quote
UsagiYojimbo Offline
Member
Posts: 83
Joined: Feb 2010
Reputation: 1
Location: Debrecen, Hungary
Post: #126
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 &
(This post was last modified: 2011-03-17 13:15 by UsagiYojimbo.)
find quote
godfreydanials Offline
Member
Posts: 66
Joined: Jan 2011
Reputation: 0
Post: #127
UsagiYojimbo,
I have been using vi for the past 20 years, the numbers are output with the :set 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?
(This post was last modified: 2011-03-19 00:38 by godfreydanials.)
find quote
coldsource Offline
Junior Member
Posts: 41
Joined: Dec 2010
Reputation: 0
Post: #128
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
find quote
godfreydanials Offline
Member
Posts: 66
Joined: Jan 2011
Reputation: 0
Post: #129
It is all working now.

Thanks again for your fine work!
find quote
uryu_ishida Offline
Junior Member
Posts: 23
Joined: Mar 2011
Reputation: 0
Post: #130
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.
find quote
Post Reply