Remote problems: Keymap + Lircmap
#1
Hi, I'm running Xbmc on Fedora 10 and so far everything functions beautifully.
Now I'm trying to get my remote working with it and have successfully configured Lirc and it functions just great:

irw outputs:
Code:
0000000000015f0 00 KEY_PAUSE marantz
00000000000015f0 01 KEY_PAUSE marantz
00000000000015f0 02 KEY_PAUSE marantz
00000000000015f6 00 KEY_STOP marantz
00000000000015f6 01 KEY_STOP marantz
00000000000015f6 02 KEY_STOP marantz
0000000000001df5 00 KEY_PLAY marantz
0000000000001df5 01 KEY_PLAY marantz
0000000000001df5 02 KEY_PLAY marantz
00000000000015e0 00 KEY_NEXT marantz
00000000000015e0 01 KEY_NEXT marantz
00000000000015e0 02 KEY_NEXT marantz
00000000000015e1 00 KEY_PREVIOUS marantz
00000000000015e1 01 KEY_PREVIOUS marantz
00000000000015e1 02 KEY_PREVIOUS marantz
00000000000005d0 00 KEY_UP marantz
00000000000005d0 01 KEY_UP marantz
00000000000005d0 02 KEY_UP marantz
00000000000015f1 00 KEY_OK marantz
00000000000015f1 01 KEY_OK marantz
00000000000005d1 00 KEY_DOWN marantz
00000000000005d1 01 KEY_DOWN marantz
00000000000005d5 00 KEY_LEFT marantz
00000000000005d5 01 KEY_LEFT marantz
00000000000005d6 00 KEY_RIGHT marantz
00000000000005d6 01 KEY_RIGHT marantz

I have Lircmap at $HOME/.xbmc/userdata/Lircmap.xml and it looks like this:
Code:
<lircmap>
        <remote device="marantz">
                <pause>KEY_PAUSE</pause>
                <stop>KEY_STOP</stop>
                <forward>KEY_FASTFORWARD</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>
        ... etc ...

Keymap is at $HOME/.xbmc/userdata/Keymap.xml and it looks like this:
Code:
<keymap>
  <global>
    <remote>
      <zero>Number0</zero>
      <one>Number1</one>
      <two>Number2</two>
      <three>Number3</three>
      <four>Number4</four>
      <five>Number5</five>
      <six>Number6</six>
      <seven>Number7</seven>
      <eight>Number8</eight>
      <nine>Number9</nine>
      <play>Play</play>
      <pause>Pause</pause>
      <stop>Stop</stop>
      <forward>FastForward</forward>
      <reverse>Rewind</reverse>
      <left>Left</left>
      <right>Right</right>
      <up>Up</up>
   ... etc ...

I checked the log at temp/xbmc.log and I see this:
Code:
...

17:31:31 T:3086284736 M:602017792   DEBUG: CLowLevelKeyboard::Initialize - XKb symbols pc_us_inet(evdev)
17:31:31 T:3086284736 M:602017792    INFO: LIRC Initialize: sucessfully started on: /dev/lircd
17:31:31 T:3086284736 M:602017792    INFO: Drives are mapped

...

17:31:32 T:3086284736 M:594079744    INFO: load keymapping
17:31:32 T:3086284736 M:594010112    INFO: Loading special://xbmc/system/Keymap.xml
17:31:32 T:3086284736 M:593801216    INFO: Loading special://profile/Keymap.xml
17:31:32 T:3086284736 M:593801216   ERROR: Window Translator: Can't find window xlinkkai
17:31:32 T:3086284736 M:593801216   ERROR: Window Translator: Can't find window trainersettings
17:31:32 T:3086284736 M:593801216    INFO: Loading special://xbmc/system/Lircmap.xml
17:31:32 T:3086284736 M:593801216    INFO: Loading special://profile/Lircmap.xml
17:31:32 T:3086284736 M:593801216    INFO: Checking skin version of: MediaStream

...

7:31:37 T:3086284736 M:552325120   DEBUG: Update - NEW at 5505:00000000000005d0 00 KEY_UP marantz (KEY_UP)
17:31:37 T:3086284736 M:552353792   DEBUG: Update - NEW at 6061:00000000000005d0 00 KEY_UP marantz (KEY_UP)
17:31:38 T:3086284736 M:551882752   DEBUG: Update - NEW at 7154:00000000000005d1 00 KEY_DOWN marantz (KEY_DOWN)
17:31:39 T:3086284736 M:551882752   DEBUG: Update - NEW at 7650:00000000000005d1 00 KEY_DOWN marantz (KEY_DOWN)
17:31:40 T:3086284736 M:551882752   DEBUG: Update - NEW at 8507:00000000000005d6 00 KEY_RIGHT marantz (KEY_RIGHT)
17:31:40 T:3086284736 M:551882752   DEBUG: Update - NEW at 8875:00000000000005d6 00 KEY_RIGHT marantz (KEY_RIGHT)
17:31:40 T:3086284736 M:551882752   DEBUG: Update - NEW at 9486:00000000000005d5 00 KEY_LEFT marantz (KEY_LEFT)
17:31:41 T:3086284736 M:551882752   DEBUG: Update - NEW at 9984:00000000000005d5 00 KEY_LEFT marantz (KEY_LEFT)
17:31:41 T:3086284736 M:551882752   DEBUG: Update - NEW at 10475:00000000000015f1 00 KEY_OK marantz (KEY_OK)

...

And still nothing happens on screen when I press the buttons.

Lirc is obviously configured correctly and responding as the Xbmc log clearly shows that it's getting the lirc commands with the appropriate names.

So what am I doing wrong? Do I have my Lircmap and/or Keymap set up incorrectly somehow?

The weird thing is that it worked before but then I was having problems with Lirc. After configuring Lirc properly I had to go change the mapping files so maybe I messed something up then?

All help would be really appreciated Smile
Reply
#2
Ok, that was hasty of me...

After reading that the xbmc.log does not tell you if you have malformed xml I started wondering if it might be an encoding issue... which it was.

As soon as I'd saved the files proper it started working...


Let that be a lesson to the rest of you Smile
Reply
#3
encoding or line endings? for the latter, dos2unix is your friend Smile
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.
Reply
#4
Haggy Wrote:encoding or line endings? for the latter, dos2unix is your friend Smile


Not really sure which, I'd just had similar problems with XML before so I gave it a shot.

All I know is that after editing in nano it didn't work but after editing in TextMate and uploading to the xbmc box it did work...

Whatever it was, I'm a happy camper now Smile
Reply
#5
yeah but it would be interesting. can you issue a `locale` and tell us what locale you are using? that is the same encoding nano uses, but as long as your config is US-ASCII safe, encoding does not matter, whereas line endings do matter for some xml parsers. can you have a look at what line ending settings your textmate uses?
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.
Reply
#6
Haggy Wrote:yeah but it would be interesting. can you issue a `locale` and tell us what locale you are using? that is the same encoding nano uses, but as long as your config is US-ASCII safe, encoding does not matter, whereas line endings do matter for some xml parsers. can you have a look at what line ending settings your textmate uses?

Sure thing:
Code:
[ulfur@thebox ~]$ locale
LANG=en_US.UTF-8
LC_CTYPE="en_US.UTF-8"
LC_NUMERIC="en_US.UTF-8"
LC_TIME="en_US.UTF-8"
LC_COLLATE="en_US.UTF-8"
LC_MONETARY="en_US.UTF-8"
LC_MESSAGES="en_US.UTF-8"
LC_PAPER="en_US.UTF-8"
LC_NAME="en_US.UTF-8"
LC_ADDRESS="en_US.UTF-8"
LC_TELEPHONE="en_US.UTF-8"
LC_MEASUREMENT="en_US.UTF-8"
LC_IDENTIFICATION="en_US.UTF-8"
LC_ALL=

Looking at this it seems like it couldn't have been encoding so maybe it was line endings.

As I said earlier, it wouldn't go after editing in nano but worked after I'd edited it in TextMate on Mac OS and ftp-ed it to the Linux box.

But then, maybe it was neither of these and one of the two files just got malformed in some other way I didn't notice and a fresh copy fixed things. I haven't really tested that possibility yet but will do so as soon as I get a chance.
Reply

Logout Mark Read Team Forum Stats Members Help
Remote problems: Keymap + Lircmap0