XBMC: Difference between revisions

From miki
Jump to navigation Jump to search
Line 82: Line 82:
* I selected ''Windows media center remote'', and no transmitter, but actually I should have started from a blank remote control file.
* I selected ''Windows media center remote'', and no transmitter, but actually I should have started from a blank remote control file.
* file '''<tt>/etc/lirc/lircd.conf</tt>''' as defined [http://www.mythtv.org/wiki/Gyration-based_MCE_Remotes here].
* file '''<tt>/etc/lirc/lircd.conf</tt>''' as defined [http://www.mythtv.org/wiki/Gyration-based_MCE_Remotes here].
** '''Fix''': In the original file, ''Power'' was reported as <tt>0x0074</tt>, when on my system the keycode is <tt>0x008E</tt>. Changing the settings doesn't make the button to work better though...
* file '''<tt>/etc/lirc/hardware.conf</tt>''' (<tt>REMOTE_DEVICE</tt> must match name at <code>ls -l /dev/input/by-id</code>):
* file '''<tt>/etc/lirc/hardware.conf</tt>''' (<tt>REMOTE_DEVICE</tt> must match name at <code>ls -l /dev/input/by-id</code>):
{{pl2|<pre>
{{pl2|<pre>
Line 101: Line 102:
irw
irw
</source>}}
</source>}}
<li>Add the definition of the '''gyration''' remote in '''XBMC''' (file <tt>/usr/share/xbmc/system/Lircmap.xml</tt>):</li>
{{pl2|<source lang="xml">
<remote device="gyration">
<play>Play</play>
<pause>Pause</pause>
<stop>Stop</stop>
<forward>Forward</forward>
<reverse>Rewind</reverse>
<left>Left</left>
<right>Right</right>
<up>Up</up>
<down>Down</down>
<select>Enter</select>
<pageplus>ChanUp</pageplus>
<pageminus>ChanDown</pageminus>
<back>Back</back>
<menu>Home</menu>
<title>Guide</title>
<info>More</info>
<skipplus>Skip</skipplus>
<skipminus>Replay</skipminus>
<!-- <display>Teletext</display> -->
<!-- <start>Home</start> -->
<record>RecTV</record>
<volumeplus>VolUp</volumeplus>
<volumeminus>VolDown</volumeminus>
<mute>Mute</mute>
<power>Power</power>
<!-- <myvideo>Videos</myvideo> -->
<!-- <mymusic>Music</mymusic> -->
<!-- <mypictures>Pictures</mypictures> -->
<!-- <mytv>TV</mytv> -->
<one>One</one>
<two>Two</two>
<three>Three</three>
<four>Four</four>
<five>Five</five>
<six>Six</six>
<seven>Seven</seven>
<eight>Eight</eight>
<nine>Nine</nine>
<zero>Zero</zero>
<!-- <star>StarHash</star> -->
<hash>StarHash</hash>
<clear>Clear</clear>
<enter>Enter</enter>
<!-- <red>Red</red> -->
<!-- <green>Green</green> -->
<!-- <yellow>Yellow</yellow> -->
<!-- <blue>Blue</blue> -->
</remote>
</source>}}
<li>To work-around the ''Power'' that does not work, I edited the remote action file to '''show the shutdown menu''' when pressing the ''Back'' button in the '''Home''' window (file <tt>/usr/share/xbmc/system/keymaps/remote.xml</tt>):
{{pl2|<source lang="xml">
<Home>
<remote>
<!-- ... -->
<back>XBMC.ActivateWindow(shutdownmenu)</back>
</remote>
</Home>
</source>}}

</ul>
</ul>

So in summary, to get the '''Gyration Remote 3101''' to work in XBMC:
* Install '''lirc'''
* Edit file <tt>/etc/lirc/lircd.conf</tt> and <tt>hardware.conf</tt>
* In XBMC, edit the button mapping file <tt>/usr/share/xbmc/system/Lircmap.xml</tt> (this file maps the remote name & button name as reported by LIRC to a XBMC command).
* Edit the command mapping file <tt>/usr/share/xbmc/system/keymaps/remote.xml</tt> (this file maps the XBMC command in the previous file to real commands in XBMC).


== Troubleshoot ==
== Troubleshoot ==

Revision as of 01:10, 2 March 2010

References

Install

The reference instructions are found on XBMC website.

Since Ubuntu Karmic

Since Ubuntu Karmic, there is no need to add the XBMC Repository nor the PPA Keys. To install XBMC:

sudo add-apt-repository ppa:team-xbmc
sudo apt-get update
sudo apt-get install xbmc xbmc-standalone
sudo apt-get update

Older version of Ubuntu

To install through command-line:

  • Add XBMC repository
sudo su
echo "# XBMC Repositories" >>/etc/apt/sources.list
echo >>/etc/apt/sources.list
echo "deb http://ppa.launchpad.net/team-xbmc/ppa/ubuntu karmic main" >>/etc/apt/sources.list 
echo "deb-src http://ppa.launchpad.net/team-xbmc/ppa/ubuntu karmic main" >>/etc/apt/sources.list
  • Add repository authentication key:
gpg --keyserver keyserver.ubuntu.com --recv 91E7EE5E  # Get the key from keyserver. If not available see below
gpg --export --armor 91E7EE5E | sudo apt-key add -    # Add the key to apt key list
# If Ubuntu keyserver is down, one can also the MIT one
gpg --keyserver pgpkeys.mit.edu --recv 91E7EE5E
gpg --export --armor 91E7EE5E | sudo apt-key add -
  • Install XBMC
sudo apt-get update
sudo apt-get install xbmc xbmc-standalone

XBMC key is usually available here, but sometimes this server is down. If so copy [{{#filelink: xbmc-key.gpg}} the file below], and copy-paste after typing the command cat | sudo apt-key add - (end with <ctrl-D>). {{#fileanchor: xbmc-key.gpg}}

-----BEGIN PGP PUBLIC KEY BLOCK-----
Version: SKS 1.0.10

mI0ESXWBBAEEAM5zE6qzPJ0Xn8KQQCB14OD9EyCieF5yjpt7PlLDUXkojjguVGgZ+skcklbF
my0eIOWYvMNmMIstqDoGYZQQGE3Sc4Dq2M0msc28uIrey2aBtYvKHXLaZ+JG42TU2q5CDLfN
vUxIOyWD2Yr4zq/sjg44pUodrUZGRPUFR50T0lPHABEBAAG0IExhdW5jaHBhZCBQUEEgZm9y
IFhCTUMgZm9yIExpbnV4iEYEEBECAAYFAknyZLgACgkQTJjLBcbOX94S7wCeKFyFk3v15Uy3
T17wvmCPaVIdE5YAni9juCXYgBGdXyZQYqgc5oh6/dXfiLYEEwECACAFAkl1gQQCGwMGCwkI
BwMCBBUCCAMEFgIDAQIeAQIXgAAKCRBtl1xHkefuXnryBAChrSStywXdJOrmjKqq4BrZ2Isk
BYqak7pD0JDaGy9HatChgJH/D30AhU74C9ReqkXvw8UohuVhQUH0lKBZWVzisSjJo4lmT/un
qqNeFpUivvz8RzPQf0S+zE2MHjDPIwjiz6ns97VdQtc2upbW6zd3BitE70P7gpCqvOyOFCnc
ow==
=Mur8
-----END PGP PUBLIC KEY BLOCK-----

Remote and Keyboard Control

Links and References

Some handy links:

Also contain keymapping when watching videos, listening to musics...

Keymapping specific to the installation are in file Keymap.xml (System folder).

An excellent page on Gyration remote in MythTV: http://www.mythtv.org/wiki/Gyration-based_MCE_Remotes

Setting up the Gyration Remote 3101

  • Captured all keycodes / keysyms in X using xev. Not all buttons are seen by X (like LiveTV or Guide), other are captured by Ubuntu (like VolUp and VolDown).
  • Captured all keycodes / scancodes seen by the kernel with showkey -k and showkey -s (in a console TTY, i.e. not X).
    • All buttons have a keycode but the one that don't send RF signals (Connect, Setup, Input, Red, Green, Teletext, Yellow and Blue).
    • Some of these buttons have no scancode (LiveTV, Guide, ChanUp, ChanDown and DVD).
  • Tried xbindkeys and xbindkeys-config (see [1]) → it does not work!!! Keys that are invisible to X remains invisible!!!
  • Tried to setup lirc as described at [2] and [3].
  • sudo apt-get install lirc
    
    • I selected Windows media center remote, and no transmitter, but actually I should have started from a blank remote control file.
    • file /etc/lirc/lircd.conf as defined here.
      • Fix: In the original file, Power was reported as 0x0074, when on my system the keycode is 0x008E. Changing the settings doesn't make the button to work better though...
    • file /etc/lirc/hardware.conf (REMOTE_DEVICE must match name at ls -l /dev/input/by-id):
    #Chosen Remote Control
    REMOTE="GYRATION REMOTE 3101"
    REMOTE_MODULES=""
    REMOTE_DRIVER="devinput"
    REMOTE_DEVICE="/dev/input/by-id/usb-Gyration_Gyration_RF_Technology_Receiver-event-kbd"
    REMOTE_SOCKET=""
    REMOTE_LIRCD_CONF=""
    REMOTE_LIRCD_ARGS=""
    
    #Enable lircd
    START_LIRCD="true"
    
    • Restart the lirc daemon and test it. Every button works except Power, LiveTV and DVD !
    sudo /etc/init.d/lirc restart
    irw
    
  • Add the definition of the gyration remote in XBMC (file /usr/share/xbmc/system/Lircmap.xml):
  • 	<remote device="gyration">
    		<play>Play</play>
    		<pause>Pause</pause>
    		<stop>Stop</stop>
    		<forward>Forward</forward>
    		<reverse>Rewind</reverse>
    		<left>Left</left>
    		<right>Right</right>
    		<up>Up</up>
    		<down>Down</down>
    		<select>Enter</select>
    		<pageplus>ChanUp</pageplus>
    		<pageminus>ChanDown</pageminus>
    		<back>Back</back>
    		<menu>Home</menu> 
    		<title>Guide</title>
    		<info>More</info>
    		<skipplus>Skip</skipplus>
    		<skipminus>Replay</skipminus>
    <!--		<display>Teletext</display> -->
    <!--		<start>Home</start> -->
    		<record>RecTV</record>
    		<volumeplus>VolUp</volumeplus>
    		<volumeminus>VolDown</volumeminus>
    		<mute>Mute</mute>
    		<power>Power</power> 
    <!--		<myvideo>Videos</myvideo> -->
    <!--		<mymusic>Music</mymusic> -->
    <!--		<mypictures>Pictures</mypictures> -->
    <!--		<mytv>TV</mytv> -->
    		<one>One</one>
    		<two>Two</two>
    		<three>Three</three>
    		<four>Four</four>
    		<five>Five</five>
    		<six>Six</six>
    		<seven>Seven</seven>
    		<eight>Eight</eight>
    		<nine>Nine</nine>
    		<zero>Zero</zero>
    <!--		<star>StarHash</star> -->
    		<hash>StarHash</hash>
    		<clear>Clear</clear>
    		<enter>Enter</enter>
    <!--		<red>Red</red> -->
    <!--		<green>Green</green> -->
    <!--		<yellow>Yellow</yellow> -->
    <!--		<blue>Blue</blue> -->
    	</remote>
    
  • To work-around the Power that does not work, I edited the remote action file to show the shutdown menu when pressing the Back button in the Home window (file /usr/share/xbmc/system/keymaps/remote.xml):
      <Home>
        <remote>
          <!-- ... -->
          <back>XBMC.ActivateWindow(shutdownmenu)</back>
        </remote>
      </Home>
    

So in summary, to get the Gyration Remote 3101 to work in XBMC:

  • Install lirc
  • Edit file /etc/lirc/lircd.conf and hardware.conf
  • In XBMC, edit the button mapping file /usr/share/xbmc/system/Lircmap.xml (this file maps the remote name & button name as reported by LIRC to a XBMC command).
  • Edit the command mapping file /usr/share/xbmc/system/keymaps/remote.xml (this file maps the XBMC command in the previous file to real commands in XBMC).

Troubleshoot

My XBMC bugs on Delicious.

Freeze on Eeebuntu NBR 3.01

  • Eeebuntu NBR 3.01 - Ubuntu Jaunty 9.04 - Array Kernel 2.6.28-15 - XBMC v 9.04.1-jaunty1.
  • Freezes seems to be specific to Eeebuntu NBR 3, as reported here: [4], [5], [6]
  • Possible work-arounds:
    • Try stable platform as suggested in 2nd bug report above: Intrepid + intel xserver from xorg-edgers ppa + 2.6.28 kernel from jaunty + libpulse-dev + compiling XBMC from the SVN (slower GL than Ubuntu 9.04 though).
    • Try Eeebuntu NBR 2.0
      • Tried. The autoscan completes. But there are hick-ups reading the DVD (scene skip, roll-back). Need further testing to identify the causes. Rendering is not 100% smooth.

DVD Play-back hick-ups

  • Alien 4
    • This is a multi-angle DVD. When playing the Special Edition, the chapter 3 is played twice, then not possible to go backward (before 00:06:00) + misc. hick-ups. There is no problem with the Theatrical Cut.
      • Confirmed on Minimoy Samsung NC10 - Eeebuntu NBR 2.0 - XBMC v9.04.1-jaunty1.
      • Confirmed on Dell Latitude 620 - WinXP SP4 - XBMC 9.04.1 repack 2.
    • Media problem, not a XBMC bug. Windows readers also fail reading the DVD correctly (PowerDVD 4.0 on W2K can't even play the movie, WinDVD 4.0 on WXP performs a bit better, but with jumps/hickups).

Slow connection to Samba share

  • First launch of XBMC, Source on samba share takes long time to connect (20 sec).
    • Confirmed on Dell Latitude 620 - WinXP SP4

XBMC menu showing up unexpectedly and taking focus

  • Sometimes the XBMC navigation menu shows up when moving the mouse, although the current title is a DVD menu.
  • Moreover the frustrating part is that when this menu is shown, it is not possible to click on the DVD Menu Item