XBMC with MCEUSB Remote on Oneiric HOWTO
#1
After upgrading to Oneiric, my mceusb remote no longer worked in XBMC. It turns out that Lirc messed with the key names for some reason, putting "KEY_" in front of all of them, renaming some others, and putting them in all caps. I found this to be profoundly annoying and time consuming to debug but now have everything working properly. Here's how to fix it.

1) Backup your Lircmap.xml file.
Code:
cp ~/.xbmc/userdata/Lircmap.xml ~/.xbmc/userdata/Lircmap.xml.OneiricBak

2) Two choices here. You can either run the "irw" command and compare the output to every command in your Lircmap.xml file (which is what I had to do), or you can just use mine. Replace everything from <remote device="mceusb"> and </remote> with the following.

Note that most (but not all) of the key names are in caps, most (but not all) start with "KEY_" now, and some like the former "chanup" are now renamed to "KEY_CHANNELUP". Fun times.

Code:
<remote device="mceusb">
                <PLAY>KEY_PLAY</PLAY>
                <PAUSE>KEY_PAUSE</PAUSE>
                <STOP>KEY_STOP</STOP>
                <FORWARD>KEY_FORWARD</FORWARD>
                <REVERSE>KEY_REWIND</REVERSE>
                <LEFT>KEY_LEFT</LEFT>
                <RIGHT>KEY_RIGHT</RIGHT>
                <UP>KEY_UP</UP>
                <DOWN>KEY_DOWN</DOWN>
                <SELECT>KEY_OK</SELECT>
                <PAGEPLUS>KEY_CHANNELUP</PAGEPLUS>
                <PAGEMINUS>KEY_CHANNELDOWN</PAGEMINUS>
                <BACK>KEY_BACK</BACK>
                <MENU>KEY_PREVIOUSMENU</MENU>
                <TITLE>KEY_RECORD</TITLE>
                <INFO>More</INFO>
                <SKIPPLUS>KEY_SKIP</SKIPPLUS>
                <SKIPMINUS>KEY_REPLAY</SKIPMINUS>
                <DISPLAY>Teletext</DISPLAY>
                <START>KEY_HOME</START>
                <RECORD>Guide</RECORD>
                <VOLUMEPLUS>KEY_VOLUP</VOLUMEPLUS>
                <VOLUMEMINUS>KEY_VOLDOWN</VOLUMEMINUS>
                <MUTE>KEY_MUTE</MUTE>
                <POWER>KEY_POWER</POWER>
                <MYVIDEO>KEY_VIDEOS</MYVIDEO>
                <MYMUSIC>KEY_MUSIC</MYMUSIC>
                <MYPICTURES>KEY_PICTURES</MYPICTURES>
                <MYTV>KEY_TV</MYTV>
                <ONE>KEY_1</ONE>
                <TWO>KEY_2</TWO>
                <THREE>KEY_3</THREE>
                <FOUR>KEY_4</FOUR>
                <FIVE>KEY_5</FIVE>
                <SIX>KEY_6</SIX>
                <SEVEN>KEY_7</SEVEN>
                <EIGHT>KEY_8</EIGHT>
                <NINE>KEY_9</NINE>
                <ZERO>KEY_0</ZERO>
                <STAR>Star</STAR>
                <HASH>Hash</HASH>
                <CLEAR>KEY_CLEAR</CLEAR>
                <ENTER>KEY_ENTER</ENTER>
                <RED>KEY_RED</RED>
                <GREEN>KEY_GREEN</GREEN>
                <YELLOW>KEY_YELLOW</YELLOW>
                <BLUE>KEY_BLUE</BLUE>
        </remote>

I assume the devs will fix the default Lircmap.xml in a forthcoming release so this won't be necessary. Until then, hope this helps someone out there.
Reply
#2
Thanks for posting that. I had the same problem (very annoying). My keymappings were a little different though so I figured I would post mine too to save someone else the trouble.

I believe I have the windows remote made by philips but I'm not sure.

Here is my Lircmap.xml

Code:
<lircmap>
             <remote device="mceusb">
                <PLAY>KEY_PLAY</PLAY>
                <PAUSE>KEY_PAUSE</PAUSE>
                <STOP>KEY_STOP</STOP>
                <FORWARD>KEY_FORWARD</FORWARD>
                <REVERSE>KEY_REWIND</REVERSE>
                <LEFT>KEY_LEFT</LEFT>
                <RIGHT>KEY_RIGHT</RIGHT>
                <UP>KEY_UP</UP>
                <DOWN>KEY_DOWN</DOWN>
                <SELECT>KEY_OK</SELECT>
                <PAGEPLUS>KEY_CHANNELUP</PAGEPLUS>
                <PAGEMINUS>KEY_CHANNELDOWN</PAGEMINUS>
                <BACK>KEY_BACK</BACK>
                <MENU>KEY_DVD</MENU>
                <TITLE>Guide</TITLE>
                <INFO>More</INFO>
                <SKIPPLUS>KEY_NEXT</SKIPPLUS>
                <SKIPMINUS>KEY_AGAIN</SKIPMINUS>
                <DISPLAY>Teletext</DISPLAY>
                <START>KEY_HOME</START>
                <RECORD>KEY_RECORD</RECORD>
                <VOLUMEPLUS>KEY_VOLUMEUP</VOLUMEPLUS>
                <VOLUMEMINUS>KEY_VOLUMEDOWN</VOLUMEMINUS>
                <MUTE>KEY_MUTE</MUTE>
                <POWER>KEY_POWER</POWER>
                <MYVIDEO>KEY_VIDEO</MYVIDEO>
                <MYMUSIC>KEY_AUDIO</MYMUSIC>
                <MYPICTURES>KEY_PICTURES</MYPICTURES>
                <MYTV>LiveTV</MYTV>
                <ONE>KEY_1</ONE>
                <TWO>KEY_2</TWO>
                <THREE>KEY_3</THREE>
                <FOUR>KEY_4</FOUR>
                <FIVE>KEY_5</FIVE>
                <SIX>KEY_6</SIX>
                <SEVEN>KEY_7</SEVEN>
                <EIGHT>KEY_8</EIGHT>
                <NINE>KEY_9</NINE>
                <ZERO>KEY_0</ZERO>
                <STAR>KEY_STAR</STAR>
                <HASH>KEY_HASH</HASH>
                <CLEAR>KEY_CLEAR</CLEAR>
                <ENTER>KEY_ENTER</ENTER>
                <RED>KEY_RED</RED>
                <GREEN>KEY_GREEN</GREEN>
                <YELLOW>KEY_YELLOW</YELLOW>
                <BLUE>KEY_BLUE</BLUE>
        </remote>
</lircmap>

As you can see most of the keymappings start with KEY_ and are all caps but a few of them do not like "Guide" for example. Hopefully someone will make them more consistent.
Reply
#3
I'll have to check mine-- I actually don't use those buttons so I didn't verify, I just hacked my file together late last night. Your list is more likely to be correct.

Edit: You were absolutely correct. I actually use the "More" button, and just didn't catch it. I updated my mceusb Lircmap as well.
Reply
#4
Thanks guys, good when a problem arises and someone has already worked it out.

My Lircmap file is located here, /usr/share/xbmc/system/Lircmap.xml.

For the Linux apprentices you need to as root,

Code:
1. cp /usr/share/xbmc/system/Lircmap.xml /usr/share/xbmc

2. gedit /usr/share/xbmc/system/Lircmap.xml

3. rm /usr/share/xbmc/Lircmap.xml

Step 1, gives you a copy, which can be deleted once everything is checked and working.

Step 2, copy and paste, then save.

Step 3, Delete copy.
Reply
#5
Thanks for posting this - big help.
Reply
#6
You can change keymap in /usr/share/lirc/remotes/mceusb for your remote.

In my asrock 330ht i change for something similiar to this:http://lirc.sourceforge.net/remotes/mceu...onf.mceusb
Reply
#7
I believe future package updates could overwrite that file, though. The lircmap.xml in your personal .xbmc directory is always safe.
Reply
#8
I corrected some functions in the "mceusb" section of lircmap.xml.

- GUIDE
- RECORDED TV
- LIVE TV
- DVD MENU

The guide/recorded tv/live tv keys are especially usefull if you use PVR branch.

Some other XBMC keys seem to be useless since they have no associated keys on MCE remote. (MYVIDEO, MYMUSIC, etc) But I didn't dare to remove them.

[HTML] <remote device="mceusb">
<GUIDE>Guide</GUIDE>
<LIVETV>LiveTV</LIVETV>
<RECORDEDTV>RecTV</RECORDEDTV>
<PLAY>KEY_PLAY</PLAY>
<PAUSE>KEY_PAUSE</PAUSE>
<STOP>KEY_STOP</STOP>
<FORWARD>KEY_FORWARD</FORWARD>
<REVERSE>KEY_REWIND</REVERSE>
<LEFT>KEY_LEFT</LEFT>
<RIGHT>KEY_RIGHT</RIGHT>
<UP>KEY_UP</UP>
<DOWN>KEY_DOWN</DOWN>
<SELECT>KEY_OK</SELECT>
<PAGEPLUS>KEY_CHANNELUP</PAGEPLUS>
<PAGEMINUS>KEY_CHANNELDOWN</PAGEMINUS>
<BACK>KEY_BACK</BACK>
<MENU>KEY_PREVIOUSMENU</MENU>
<TITLE>KEY_DVD</TITLE>
<INFO>More</INFO>
<SKIPPLUS>KEY_NEXT</SKIPPLUS>
<SKIPMINUS>KEY_AGAIN</SKIPMINUS>
<DISPLAY>Teletext</DISPLAY>
<START>KEY_HOME</START>
<RECORD>KEY_RECORD</RECORD>
<VOLUMEPLUS>KEY_VOLUMEUP</VOLUMEPLUS>
<VOLUMEMINUS>KEY_VOLUMEDOWN</VOLUMEMINUS>
<MUTE>KEY_MUTE</MUTE>
<POWER>KEY_POWER</POWER>
<MYVIDEO>KEY_VIDEOS</MYVIDEO>
<MYMUSIC>KEY_MUSIC</MYMUSIC>
<MYPICTURES>KEY_PICTURES</MYPICTURES>
<MYTV>KEY_TV</MYTV>
<ONE>KEY_1</ONE>
<TWO>KEY_2</TWO>
<THREE>KEY_3</THREE>
<FOUR>KEY_4</FOUR>
<FIVE>KEY_5</FIVE>
<SIX>KEY_6</SIX>
<SEVEN>KEY_7</SEVEN>
<EIGHT>KEY_8</EIGHT>
<NINE>KEY_9</NINE>
<ZERO>KEY_0</ZERO>
<STAR>Star</STAR>
<HASH>Hash</HASH>
<CLEAR>KEY_CLEAR</CLEAR>
<ENTER>KEY_ENTER</ENTER>
<RED>KEY_RED</RED>
<GREEN>KEY_GREEN</GREEN>
<YELLOW>KEY_YELLOW</YELLOW>
<BLUE>KEY_BLUE</BLUE>
</remote>
[/HTML]
Reply
#9
After updating to Oneiric only half the keys on my remote were working in xbmc. I found this thread and changed the keymap but to no avail.

I got no reply when trying
Code:
irw
, but finally fixed that by running
Code:
dpkg-reconfigure lirc
and selecting "Windows Media Center Edition remotes (all)". After this all was ok in xbmc.

I also got autologin and correct session selection working with the help of this link

Thanks!
Reply
#10
For my AVS Gear HA-IR01SV, a few keys still seemed to keep their old names that don't have the KEY_ in front and the volume keys need to have volume spelled out, so here if my lircmap, with my changes at the bottom, in case anybody else has the exact same remote/lirc keys.
I didn't know what to assign the dvdmenu button to, so I just made up something that I could change later.
Code:
<remote device="mceusb">
                <PLAY>KEY_PLAY</PLAY>
                <PAUSE>KEY_PAUSE</PAUSE>
                <STOP>KEY_STOP</STOP>
                <FORWARD>KEY_FORWARD</FORWARD>
                <REVERSE>KEY_REWIND</REVERSE>
                <LEFT>KEY_LEFT</LEFT>
                <RIGHT>KEY_RIGHT</RIGHT>
                <UP>KEY_UP</UP>
                <DOWN>KEY_DOWN</DOWN>
                <SELECT>KEY_OK</SELECT>
                <PAGEPLUS>KEY_CHANNELUP</PAGEPLUS>
                <PAGEMINUS>KEY_CHANNELDOWN</PAGEMINUS>
                <BACK>KEY_BACK</BACK>
                <MENU>KEY_PREVIOUSMENU</MENU>
                <INFO>More</INFO>
                <SKIPPLUS>KEY_SKIP</SKIPPLUS>
                <SKIPMINUS>KEY_REPLAY</SKIPMINUS>
                <DISPLAY>Teletext</DISPLAY>
                <START>KEY_HOME</START>
                <MUTE>KEY_MUTE</MUTE>
                <POWER>KEY_POWER</POWER>
                <MYTV>KEY_TV</MYTV>
                <ONE>KEY_1</ONE>
                <TWO>KEY_2</TWO>
                <THREE>KEY_3</THREE>
                <FOUR>KEY_4</FOUR>
                <FIVE>KEY_5</FIVE>
                <SIX>KEY_6</SIX>
                <SEVEN>KEY_7</SEVEN>
                <EIGHT>KEY_8</EIGHT>
                <NINE>KEY_9</NINE>
                <ZERO>KEY_0</ZERO>
                <STAR>Star</STAR>
                <HASH>Hash</HASH>
                <CLEAR>KEY_CLEAR</CLEAR>
                <ENTER>KEY_ENTER</ENTER>
                <RED>KEY_RED</RED>
                <GREEN>KEY_GREEN</GREEN>
                <YELLOW>KEY_YELLOW</YELLOW>
                <BLUE>KEY_BLUE</BLUE>

                <MYPICTURES>Pictures</MYPICTURES>
                <RADIO>KEY_RADIO</RADIO>
                <MYVIDEO>KEY_VIDEO</MYVIDEO>
                <MYMUSIC>KEY_AUDIO</MYMUSIC>
                <VOLUMEPLUS>KEY_VOLUMEUP</VOLUMEPLUS>
                <VOLUMEMINUS>KEY_VOLUMEDOWN</VOLUMEMINUS>
                <TITLE>Guide</TITLE>
                <RECORDEDTV>RecTV</RECORDEDTV>
                <LIVETV>LiveTV</LIVETV>
                <DVD>KEY_DVD</DVD>

        </remote>
Reply
#11
Thanks!
This thread saved me a lot of time and headache.
Reply
#12
I would also like to recommend the thread: http://forum.xbmc.org/showthread.php?tid=114124
solution as an alternative for 11.10 ubuntu. Looks like going forward, lirc functions are being handled as keyboard/mouse type of event, especially now that lirc modules are integrated into the kernel tree. Just run a sudo lsinput
I imagine in the future, lirc daemon days are numbered.
Reply
#13
Solved! Smile
Reply
#14
Running Ubuntu Linux 11.10 - Kernel 3.0.0-14-generic on x86_64 - XBMC latest PPA

Installed lirc and configured remote using Lircmap.xml, copies of xml file is places in the following...

/home/xbmc/.xbmc/userdata
/home/xbmc/.xbmc/system
/usr/share/xbmc/system

the mce remote only works once and on reboot mce remote is dead. (Standard MCE USB IR receiver and RC6 remote)

irw - does nothing when remote keys are pressed

Any help? Thanks
Reply
#15
Did NOT really read all those other postings, here is my solution from start to finish (putting all to same place to ME also find later)

I tried to use following combo without lirc (with kernel inbuild system), but I kept having problem with "pressing key 4 times, I took like 10-20 presses"
System: Compaq nc6220 laptop + Ubuntu 11.10 + MCE Remote (Clone) + XBMC 10.1 (I think) + Kernel 3.0.0-15-generic

So I installed lirc, an then:

Firstly /usr/share/lirc/remotes/mceusb/lircd.conf.mceusb should contain the following text (copy/paste the raw paste data): http://pastebin.com/Yrpi9U6u

Secondly modded the keyboard.xml to get some more buttons to work ("OK" and some other buttons also), Located here --> .xbmc/userdata/keymaps/keyboard.xml
This must contain the following text (again, copy/paste the raw paste data) --> http://pastebin.com/VtJHpnLy

Thirdly:
Xbmc won't always see lirc and uses kernel inbuild remotesystem.. peace of sh*t
This might work: Invoke Lirc to restart at system startup. Simply add
Code:
sudo service lirc restart
at the end of the file /etc/rc.local (but before the exit 0 line!)


Also /etc/lirc/hardware.conf must contain next (forcing lirc to main remotesystem):
(edit this line): LOAD_MODULES=false
(ADD this line): echo lirc > /sys/class/rc/rc0/protocols 2>/dev/null || true


At this work, I lost my S/PDIF sound Laugh
Later got it back Rolleyes


BTW: Sometimes xbmc won't save settings correctly (pixel ratio, or such), do it manually by editing .xbmc/userdata/guisettings.xml AND change it to "read only". Now xbmc won't be able to change it. I had to use this to set my pixel ratio.

Something might be wrong at this post, but works for me. Obviously there might be some "my computer-dedicated" -settings, that wont work for you.
Reply

Logout Mark Read Team Forum Stats Members Help
XBMC with MCEUSB Remote on Oneiric HOWTO0