MCE Keyboard problems
#1
I previously had XMBC running under Windows and followed the directions here to get my Harmony ONE remote configured. Basically I set up a combination of the Media Center SE and MCE Keyboard Harmony device profiles. The MCE Keyboard profile allowed me to use commands that weren't available on a standard MCE remote. Specifically I used keyboard commands like "C" for Context Menu, "K" for Update Library, "SingleQuote" for Skip Back, and "." for Skip Forward.

I have since installed XBMCbuntu and have lost access to the MCE Keyboard commands. Commands from a normal MCE remote are working out of the box. Based on my research, I'm realizing that the simple question of "How do I enable MCE Keyboard commands" has a long, complex answer. Most of the information I find is several years old and I'm having trouble discerning what is relevant today with the newest builds of XMBCbuntu.

So, if someone has a simple answer to this question, by all means post it. If not, please bear with me while I explain the steps I've taken so far. First, some configuration:

Software:
XBMCbuntu 12.2 "Frodo", fresh install
  • XBMC version - 12.2 Git:32b1a5e
  • Ubuntu version - 12.10
  • Kernel version - 3.5.0-36-generic
  • lirc version - 0.9.0-0ubuntu3

Hardware:
Relevant dmesg lines
Code:
[    3.400523] Registered IR keymap rc-rc6-mce
[    3.400611] input: Nuvoton w836x7hg Infrared Remote Transceiver as /devices/pnp0/00:0b/rc/rc0/input4
[    3.400677] rc0: Nuvoton w836x7hg Infrared Remote Transceiver as /devices/pnp0/00:0b/rc/rc0
[    3.400875] nuvoton_cir: driver has been successfully loaded
[    3.409963] IR NEC protocol handler initialized
[    3.416524] IR RC5(x) protocol handler initialized
[    3.423151] IR RC6 protocol handler initialized
[    3.427077] IR JVC protocol handler initialized
[    3.428549] IR Sony protocol handler initialized
[    3.433579] IR SANYO protocol handler initialized
[    3.442144] input: MCE IR Keyboard/Mouse (nuvoton-cir) as /devices/virtual/input/input9
[    3.442209] IR MCE Keyboard/mouse protocol handler initialized
[    3.444287] microcode: CPU0 sig=0x206a7, pf=0x2, revision=0x25
[    3.445394] lirc_dev: IR Remote Control driver registered, major 250
[    3.445811] rc rc0: lirc_dev: driver ir-lirc-codec (nuvoton-cir) registered at minor = 0
[    3.445813] IR LIRC bridge handler initialized

I started my research here and here. The "seamless remote experience" post presents 3 options:
  1. Let the kernel pass the signal through to LIRC
  2. Do everything completely in-kernel
  3. Let the kernel cooperate with LIRC
After reviewing that thread several times, I'm still confused on which option the default configuration is currently using and which option I should change it to. It seems like it's close to working because when I switch to the MCE Keyboard device, irw reports that several commands work
Code:
000000037ff07bef 00 KEY_VOLUMEUP mceusb
000000037ff07bee 00 KEY_VOLUMEDOWN mceusb
000000037ff07bee 01 KEY_VOLUMEDOWN mceusb
000000037ff07bf1 00 KEY_MUTE mceusb
000000037ff07bd9 00 Guide mceusb
000000037ff07bd9 01 Guide mceusb
000000037ff07bf0 00 More mceusb
000000037ff07bf5 00 KEY_CLEAR mceusb
I can even turn the machine on and off with the remote (with the Media Center SE profile). However, many commands don't work, specifically the number and letter keys.

One of the first things I noticed is that restarting LIRC causes an error.
Code:
sudo /etc/init.d/lirc restart

* Stopping remote control daemon(s): LIRC                                                                         [ OK ]
* Loading LIRC modules                                                                                            [ OK ]
* Unable to load LIRC kernel modules. Verify your
* selected kernel modules in /etc/lirc/hardware.conf
This is because my hardware is not identified correctly in /etc/lirc/hardware.conf. Based on advice here, I changed
Code:
REMOTE="Windows Media Center Transceivers/Remotes (all)"
REMOTE_MODULES="lirc_dev mceusb"
REMOTE_DRIVER=""
to
Code:
REMOTE="Nuvoton Transceivers/Remotes"
REMOTE_MODULES="lirc_dev nuvoton-cir"
REMOTE_DRIVER="default"
Once I made that change, LIRC would restart correctly
Code:
sudo /etc/init.d/lirc restart

* Stopping remote control daemon(s): LIRC                                                                         [ OK ]
* Loading LIRC modules                                                                                            [ OK ]
* Starting remote control daemon(s) : LIRC                                                                        [ OK ]

Next thing I noticed was there is a mce_kbd protocol that's not enabled that looks like something I might want.
Code:
cat /sys/class/rc/rc0/protocols

rc-5 nec rc-6 jvc sony sanyo mce_kbd [lirc]
Based on recommendation here I updated the /etc/init.d/lirc file and enabled the mce_kbd protocol. Still no dice. I don't even know what this protocol is for, it was just a guess.

I stopped LIRC and installed ir-keytable. Here's the the output of sudo ir-keytable -v
Code:
Found device /sys/class/rc/rc0/
Input sysfs node is /sys/class/rc/rc0/input4/
Event sysfs node is /sys/class/rc/rc0/input4/event4/
Parsing uevent /sys/class/rc/rc0/input4/event4/uevent
/sys/class/rc/rc0/input4/event4/uevent uevent MAJOR=13
/sys/class/rc/rc0/input4/event4/uevent uevent MINOR=68
/sys/class/rc/rc0/input4/event4/uevent uevent DEVNAME=input/event4
Parsing uevent /sys/class/rc/rc0/uevent
/sys/class/rc/rc0/uevent uevent NAME=rc-rc6-mce
/sys/class/rc/rc0/uevent uevent DRV_NAME=nuvoton-cir
input device is /dev/input/event4
/sys/class/rc/rc0/protocols protocol rc-5 (enabled)
/sys/class/rc/rc0/protocols protocol nec (enabled)
/sys/class/rc/rc0/protocols protocol rc-6 (enabled)
/sys/class/rc/rc0/protocols protocol jvc (enabled)
/sys/class/rc/rc0/protocols protocol sony (enabled)
/sys/class/rc/rc0/protocols protocol sanyo (enabled)
/sys/class/rc/rc0/protocols protocol mce_kbd (enabled)
/sys/class/rc/rc0/protocols protocol lirc (enabled)
Found /sys/class/rc/rc0/ (/dev/input/event4) with:
        Driver nuvoton-cir, table rc-rc6-mce
        Supported protocols: NEC RC-5 RC-6 JVC SONY SANYO LIRC other
        Enabled protocols: NEC RC-5 RC-6 JVC SONY SANYO LIRC other
        Repeat delay = 500 ms, repeat period = 125 ms

sudo ir-keytable -t behaves similar irw, but I don't understand it all
Code:
1374877501.648450: event MSC: scancode = 800f0410
1374877501.648453: event key down: KEY_VOLUMEUP (0x0073)
1374877501.648453: event sync
1374877501.751634: event MSC: scancode = 800f0410
1374877501.751635: event sync
1374877501.878653: event MSC: scancode = 800f0410
1374877501.878654: event sync
1374877502.129933: event key up: KEY_VOLUMEUP (0x0073)
1374877502.129935: event sync
1374877503.086455: event MSC: scancode = 800f0411
1374877503.086458: event key down: KEY_VOLUMEDOWN (0x0072)
1374877503.086458: event sync
1374877503.190489: event MSC: scancode = 800f0411
1374877503.190490: event sync
1374877503.315252: event MSC: scancode = 800f0411
1374877503.315253: event sync
1374877503.565924: event key up: KEY_VOLUMEDOWN (0x0072)
1374877503.565925: event sync
1374877506.482295: event MSC: scancode = 800f040e
1374877506.482297: event key down: KEY_MUTE (0x0071)
1374877506.482298: event sync
1374877506.585485: event MSC: scancode = 800f040e
1374877506.585486: event sync
1374877506.712488: event MSC: scancode = 800f040e
1374877506.712489: event sync
Still, some commands work, the ones I'm interested in don't.

I've found some posts on the lirc listserv (post, post). It seems that the developer of the nuvotron-cir driver participates there, which is cool, but most of it's over my head. The 2nd post actually looks like a solution, but it mentions "devinput". What is that and do I want it? Also, they're talking about changing /etc/sysconfig/lircd. I don't see that file on my system, should it be?

Summary questions:
  • The "seamless remote experience" experience tread seems to have the most detailed and up to date information. I'm gathering that I should disable LIRC and do everything in kernel. If so, the changes I made to /etc/lirc/hardware.conf and /etc/init.d/lirc wouldn't matter right? Don't those both pertain to LIRC?
  • How was XBMC working (with limited command) when I was getting the error restarting LIRC. Does that mean it was already working "in kernel"?
  • Is the mce_kbd driver necessary? If so, why is it disabled by default?
  • Would someone care to explain protocols, drivers and modules and how they relate to each other? I guess I don't need to understand that to fix this issue, but it would be nice to know. Is it possible I'm using the wrong driver/protocol that doesn't understand the keyboard commands?
  • I feel like I just keep going in circles with this. I don't understand what technology is newer/better/more powerful and which one(s) I should be using. I'd like to keep things as simple as possible, but as complicated as necessary. With that in mind, any advice?
  • Should I just give this up and get a Flirc?

References:
Reply
#2
Shameless bump
Reply
#3
Did you ever figure this out? I would like to be able to control the mouse cursor at times with my Harmony remote. Setup a MCE SE device on the remote and mapped the mouse commands to the arrow pads but no dice.
Reply
#4
Nope, never figured it out. Sorry.
Reply
#5
any luck? Im trying to get a harmony 650 to act like an MCE keyboard on ubuntu
Reply
#6
Sorry, never got it figured out.
Reply
#7
Would love for someone to figure this out as well. Never could get the keyboard/mouse thing to work. It always did the original MCE stuff even when I switched to the MCE SE setup with the mouse buttons and keyboard shortcuts.
Reply

Logout Mark Read Team Forum Stats Members Help
MCE Keyboard problems0