xbianonpi / xbian

XBMC on Raspberry Pi, Bleeding Edge
https://xbian.org
GNU General Public License v3.0
294 stars 44 forks source link

[Beta 1.1] MCE remote works only partially #440

Closed pcernocky closed 10 years ago

pcernocky commented 11 years ago

On my MCE remote only some keys works, eg. arrows, pause, stop, volume up. But most keys does not work, eg. volume down, mute, numbers.

I've been playing with it some time and figured out, that it's using kernel module and not lirc. If I stop lirc it works exactly same.

If I stop xbmc and try ir-keytable -t it works nice, all keys are working and are mapped correctly to KEY_*:

xbian@xbian ~ $ ir-keytable -t
Testing events. Please, press CTRL-C to abort.
1376084726.731806: event MSC: scancode = 800f0410
1376084726.731806: event key down: KEY_VOLUMEUP (0x0073)
1376084726.731806: event sync
1376084726.972988: event key up: KEY_VOLUMEUP (0x0073)
1376084726.972988: event sync
1376084729.758170: event MSC: scancode = 800f0411
1376084729.758170: event key down: KEY_VOLUMEDOWN (0x0072)
1376084729.758170: event sync
1376084730.002990: event key up: KEY_VOLUMEDOWN (0x0072)
1376084730.002990: event sync
1376084735.320826: event MSC: scancode = 800f040e
1376084735.320826: event key down: KEY_MUTE (0x0071)
1376084735.320826: event sync
1376084735.562981: event key up: KEY_MUTE (0x0071)
1376084735.562981: event sync
1376084742.154637: event MSC: scancode = 800f0420
1376084742.154637: event key down: KEY_LEFT (0x0069)
1376084742.154637: event sync
1376084742.402982: event key up: KEY_LEFT (0x0069)
1376084742.402982: event sync

In xbmc.log the remote is found:

23:17:57 T:3042476032   DEBUG: Checking device: /dev/input/event1
23:17:57 T:3042476032    INFO: Found input device /dev/input/event1
23:17:57 T:3042476032    INFO: opened device 'MCE IR Keyboard/Mouse (mceusb)' (file name /dev/input/event1), m_bSkipNonKeyEvents 0

If I press volume up, it's working:

23:52:17 T:3042279424   DEBUG: Keyboard: scancode: 73, sym: 00af, unicode: 0000, modifier: 0
23:52:17 T:3042279424   DEBUG: OnKey: volume_up (f0b9) pressed, action is VolumeUp

But volume down doesn't work:

23:52:14 T:3042279424   DEBUG: Keyboard: scancode: 72, sym: 0127, unicode: 0000, modifier: 0
23:52:14 T:3042279424   DEBUG: OnKey: f14 (f09d) pressed, action is

Volume down is recognized as f14 and if I map it in keyboard.xml I can get it to work.

But there are keys which generate same key code (f200) so I can't map them in keyboard.xml key rewind:

23:57:42 T:3042279424   DEBUG: Keyboard: scancode: a8, sym: 0153, unicode: 0000, modifier: 0
23:57:42 T:3042279424   DEBUG: GetActionCode: Trying Hardy keycode for 0xf200
23:57:42 T:3042279424   DEBUG: Previous line repeats 3 times.
23:57:42 T:3042279424   DEBUG: OnKey: 0 (f200) pressed, action is

key fast forward:

23:57:43 T:3042279424   DEBUG: Keyboard: scancode: d0, sym: 0157, unicode: 0000, modifier: 0
23:57:43 T:3042279424   DEBUG: GetActionCode: Trying Hardy keycode for 0xf200
23:57:43 T:3042279424   DEBUG: Previous line repeats 3 times.

Lots of other keys (numbers, ...) does not generate anything in xbmc.log although they work in ir-keytable -t.

What seems strange to me is that the behaviour is controlled via keymaps/keyboard.xml and not via Lircmap.xml and keymaps/remote.xml. In Lircmap.xml there's section "" which contains exactly those key names reported by ir-keytable -t.

I've tried newest openelec for rpi few weeks ago and all keys worked out of the box without problems, so there must be a way to fix it :-)

mk01 commented 11 years ago
On my MCE remote only some keys works, eg. arrows, pause, stop, volume up. But most keys does not work, eg. volume down, mute, numbers.

I've been playing with it some time and figured out, that it's using kernel module and not lirc. If I stop lirc it works exactly same.

is lirc module loaded before lircd starts? is lircd init script able to properly detect .conf file to load ?

mdentremont commented 11 years ago

I'm seeing this as well.

mk01 commented 11 years ago

@pcernocky then disable lirc, and just enable the keymap/protocol in /etc/rc_maps.cfg ? this is not a way ? if mceusb is module and /lib/udev/rc_keymaps/rc6_mce is the map, add a line

mceusb        *            /lib/udev/rc_keymaps/rc6_mce

reboot

mk01 commented 10 years ago

guys, can you please check this post ?

http://forum.xbian.org/thread-1363-post-17132.html#pid17132

Koenkk commented 10 years ago

Closed due to inactivity of the author

sschmitz commented 10 years ago

My experience with a Medion X10 remote is similar. ir-keytable -t recognizes every key with an appropriate symbolic name (e. g. KEY_VOLUMEUP, KEY_VOLUMEDOWN, KEY_OK). xbmc.log shows those keys as volume_up (mapped to VolumeUp), f14 (unmapped), and not at all for OK. The keymap editor addon accordingly did not recognize when the OK key was pressed.

lsmod lists rc_medion_x10, lirc is not loaded. I don't see the ir-keytable names anywhere but in Lircmap.xml, yet this is obviously not the mapping in use ...? I'm not really knowledgeable about the internal workings here; I guess that /etc/rc_maps.cfg isn't the problem here since ir-keytable works as expected?

mdentremont commented 10 years ago

A fresh install of beta 1.2 fixed all my problems :)

sschmitz commented 10 years ago

Oh, I forgot to mention that I'm already running beta2. I haven't changed all too much, but I can try a completely fresh install again.