Difference between revisions of "MCE Remote"

From MythTV Official Wiki
Jump to: navigation, search
(Phillips eHome)
m (Fix heading broken when note box was added.)
 
(37 intermediate revisions by 17 users not shown)
Line 1: Line 1:
 +
Media Center Edition (MCE) remotes are designed to control PCs running Microsoft Windows with Windows Media Center. MCE remotes come with an external infrared receiver that connects to a PC via USB. Newer PCs may have the IR receiver integrated in the case.
 +
 +
There are two main versions of the MCE remote, typically referred to as the 'older' (Version 1) and 'newer' (Version 2). As of [[LIRC|lirc]]-0.8.1, both versions are supported. After kernel 2.6.35, using LIRC is optional.
 +
 +
The newer version of remote comes in various alternatives, including different shapes and features. The new model is manufactured by Philips and half a dozen other manufacturers and is available by (among many other ways) purchase on it's own, shipped with MCE 2005 and contained in Hauppauge TV card MCE-Kits.
 +
 +
{{Note box|Most of this text is very old. Since written, LIRC has been heavily updated with e. g., dynamic drivers (no need to recompile) and systemd support. At the time of writing, the last LIRC version is 0.9.3.
 +
 +
While Debian-based distros  still is using 0.9.0 which is similar to the versions described here other distros have moved on to use more recent LIRC versions, in most cases also using systemd. This makes large part of this text obsolete on these distros.
 +
 +
There is new configuration information on http://lirc.sourceforge.net, in particular a new Configuration Guide. However, here is certainly nothing MCE remote specific.}}
 +
 
== Media Center Remotes ==
 
== Media Center Remotes ==
 
{{Script info
 
|long=Basic lircrc file for use with MythTV and Microsoft MCEUSB line of remotes.
 
|name=MCEUSB2 LIRCRC
 
|category=lircrc config
 
}}
 
  
 
{| border=1 cellspacing=0 cellpadding=2
 
{| border=1 cellspacing=0 cellpadding=2
Line 16: Line 22:
 
| [[Image:MCE-Remote-2-v1069.jpg | MCE Remote Hauppauge Windows Vista version |100px]]
 
| [[Image:MCE-Remote-2-v1069.jpg | MCE Remote Hauppauge Windows Vista version |100px]]
 
| [[Image:Philips-remote.jpg | Philips remote |90px]]
 
| [[Image:Philips-remote.jpg | Philips remote |90px]]
| [[Image:Black Hauppauge 2rows jumppoints.jpg | MCE Black Hauppauge |160px]]
+
| [[Image:Black Hauppauge 2rows jumppoints.jpg | MCE Black Hauppauge |160px]]
 
|-
 
|-
 
| Version
 
| Version
Line 33: Line 39:
 
| <center>1039</center>
 
| <center>1039</center>
 
| <center>1039</center>
 
| <center>1039</center>
| <center>Hauppauge PVR- kit</center>
+
| <center>Hauppauge<br>WinTV-PVR kit</center>
 
| <center>1069/335(UK/AU)</center>
 
| <center>1069/335(UK/AU)</center>
 
| <center>RC1974506/00</center>
 
| <center>RC1974506/00</center>
| <center>1019:0f38 Elitegroup Computer Systems (ECS)</center>
+
| <center>1019:0f38<br>Elitegroup Computer Systems</center>
 
|-
 
|-
 
| Features
 
| Features
 
| <center>Backlight</center>
 
| <center>Backlight</center>
| <center>Backlight</center>
+
| <center>Backlight<br>Ergonomic/Balanced</center>
| <center>Backlight, no colored buttons</center>
+
| <center>Backlight<br>Ergonomic/Balanced<br>no colored buttons</center>
| <center>Backlight, no TV Power button. MS Clone ? </center>
+
| <center>Backlight<br>Ergonomic/Balanced<br>no TV Power button<br>Grey market</center>
 
| <center>"My" Buttons</center>
 
| <center>"My" Buttons</center>
 
| <center>Uses mceusb2 lircd.conf</center>
 
| <center>Uses mceusb2 lircd.conf</center>
 
| <center>Uses mceusb2 lircd.conf</center>
 
| <center>Uses mceusb2 lircd.conf</center>
 
| <center>Two rows (8) of jump buttons</center>
 
| <center>Two rows (8) of jump buttons</center>
 +
|-
 +
| Rating
 +
| <center>?/5</center>
 +
| <center>5/5</center>
 +
| <center>4/5</center>
 +
| <center>?/5</center>
 +
| <center>?/5</center>
 +
| <center>?/5</center>
 +
| <center>?/5</center>
 +
| <center>?/5</center>
 
|}
 
|}
  
 
<center>Click on a Remote to see the full size image</center>
 
<center>Click on a Remote to see the full size image</center>
 
== Description ==
 
 
USB Remote intended for Media Center PCs
 
 
Vendors Website: http://www.microsoft.com/hardware/mouseandkeyboard/productdetails.aspx?pid=065
 
 
There are two main versions of the MCE remote, typically referred to as the 'older' (Version 1) and 'newer' (Version 2) models. Both of these are now supported in the latest lirc, currently 0.8.1.
 
 
The newer remote comes in various alternatives, including different shapes and features. The new model is manufactured by Philips and half a dozen other manufacturers and is available by (among many other ways) purchase on it's own, shipped with MCE 2005 and contained in Hauppauge TV card MCE-Kits.
 
 
  
 
== Support Status ==
 
== Support Status ==
 +
{{Note box| Originally there were two modules lirc_mceusb and lir_mceusb2. These were later merged into a single lirc_mceusb driver. More recently (2.6.35 kernel and lirc-0.8.7) the module was known as just mceusb. You need to adjust all the configuration examples below depending on exactly how the module is named.}}
  
* IR transmit and receive are supported on all generations of mce transceivers, as of lirc 0.8.6.
+
=== MCE Remote ===
* Some newer devices may require post-lirc-0.8.6 cvs for full functionality
+
* IR transmit and receive are supported on all generations of mce transceivers, as of lirc-0.8.6.
 +
* Some newer devices may require post lirc-0.8.6 cvs for full functionality
 +
* Historically, there were separate 1st-gen and 2nd-gen drivers, lirc_mceusb and lirc_mceusb2. They were merged into a single lirc_mceusb driver as of lirc-0.8.6, which as noted above, supports transmit and receive on all devices.
  
 
=== MCE Keyboard ===
 
=== MCE Keyboard ===
Line 74: Line 82:
  
 
=== MCE Remote alternative ===
 
=== MCE Remote alternative ===
* Based on the [http://mod-mce.sourceforge.net/ mod-mce] project
+
* There was a [http://mod-mce.sourceforge.net/ mod-mce] project for early support, but modern kernels should support Version 1 & 2 USB receivers as HID devices out-of-the-box
* Version 1 & 2 Receivers supported as a USB HID device
+
* LIRC not required
* No LIRC required
+
* Transmit (IR Blaster) support is unknown
* [https://sourceforge.net/projects/mod-mce/files/mod-mce/0.1.5/mod_mce-0.1.5.tar.bz2/download Download kernel module source ]
+
* Depending on your distro, some re-mapping of remote button codes to keyboard scan codes may be required. More information here: [[HID_Remotes]]
 +
* You will probably have to add [[Keybindings]] in Myth for a few of your remote buttons
  
 
== Installation guides ==
 
== Installation guides ==
 +
{{Note box| The below assumes you are using LIRC, which [[HID_Remotes |is no longer required]] for basic setups not requiring LIRC's more complete feature set.}}
  
 
=== Older remote ===
 
=== Older remote ===
 
 
I would ''think'' it's the same as the newer remote instructions below, but I can't verify. Only difference is the module name - it will be lirc_mceusb instead of lirc_mceusb2.
 
I would ''think'' it's the same as the newer remote instructions below, but I can't verify. Only difference is the module name - it will be lirc_mceusb instead of lirc_mceusb2.
  
 
=== Newer remote ===
 
=== Newer remote ===
 
 
You must be using a 2.6 kernel for the newer remote.  The kernel module that lirc creates does not have 2.4 support.
 
You must be using a 2.6 kernel for the newer remote.  The kernel module that lirc creates does not have 2.4 support.
  
Line 97: Line 105:
  
 
=== Windows Vista MCE Remote ===
 
=== Windows Vista MCE Remote ===
 
 
Another newer remote (version 1069) now responds with the following when you type lsusb:
 
Another newer remote (version 1069) now responds with the following when you type lsusb:
  
Line 110: Line 117:
  
 
=== Download a lirc CVS SnapShot ===
 
=== Download a lirc CVS SnapShot ===
 
 
Generally the latest [http://lirc.sourceforge.net/software/snapshots/ cvn snapshot] from the official LIRC website should work fine. As of writing, the latest snapshot available is lirc-0.8.7pre1. Download and extract it either manually from the previous link or using the following code.
 
Generally the latest [http://lirc.sourceforge.net/software/snapshots/ cvn snapshot] from the official LIRC website should work fine. As of writing, the latest snapshot available is lirc-0.8.7pre1. Download and extract it either manually from the previous link or using the following code.
  
Line 119: Line 125:
 
  cd lirc-0.8.7pre1
 
  cd lirc-0.8.7pre1
  
Users of the very latest linux kernels may find they have problems when compiling or running code from the svn snapshot. If you have problems with the above install, or just want to run the latest and greatest lirc version, download the latest cvs lirc code using the following method. If that still doesn't work, please report your issues to [https://lists.sourceforge.net/lists/listinfo/lirc-list the lirc mailing list].
+
Users of the very latest linux kernels may find they have problems compiling or running code from the svn snapshot. If you have problems with the above install, or just want to run the latest and greatest lirc version, download the latest cvs lirc code using the following method. If that still doesn't work, please report your issues to [https://lists.sourceforge.net/lists/listinfo/lirc-list the lirc mailing list].
  
 
==== Downloading using CVS ====
 
==== Downloading using CVS ====
 +
 +
{{Note box| The last version available in CVS is 0.8.7. Since then, the development is using git, and the steps to use the latest source is simplified. See https://sourceforge.net/p/lirc/git/ }}
  
 
1. Make sure you have the cvs, autoconf, automake and libtool packages installed (rpm package manager users search for them and install their rpms).
 
1. Make sure you have the cvs, autoconf, automake and libtool packages installed (rpm package manager users search for them and install their rpms).
 
 
2. Type the following on a command line and ignore what it says about not finding /root/...:
 
2. Type the following on a command line and ignore what it says about not finding /root/...:
 
  cvs -d:pserver:anonymous@lirc.cvs.sourceforge.net:/cvsroot/lirc login
 
  cvs -d:pserver:anonymous@lirc.cvs.sourceforge.net:/cvsroot/lirc login
Line 135: Line 142:
  
 
=== Install ===
 
=== Install ===
 +
{{Note box| Modern versions (0.9.1+) have have moved all configuration steps to post-build. For these versions this text is obsolete.}}
  
 
You now have two choices, you can either run the Lirc Setup script and accept it installing itself where it wants to, or you can carry out a manual configure. Using the setup script is easier, but it means that the various binararies and configuration files aren't placed in the normal Gentoo locations.
 
You now have two choices, you can either run the Lirc Setup script and accept it installing itself where it wants to, or you can carry out a manual configure. Using the setup script is easier, but it means that the various binararies and configuration files aren't placed in the normal Gentoo locations.
Line 146: Line 154:
 
  make
 
  make
 
  make install
 
  make install
 +
 
{{Note box|If bash returns 'dialog not found' when running ''./setup.sh'', install the dialog package}}
 
{{Note box|If bash returns 'dialog not found' when running ''./setup.sh'', install the dialog package}}
  
This will also create a /etc/lircd.conf file which should work. If it complains about missing fedora source files use "yum install kernel-devel" and rerun ./setup.sh.
+
This will also create a /etc/lircd.conf file which should work. If it complains about missing fedora source files use "yum install kernel-devel" and rerun ./setup.sh.
  
 
To perform the manual configuration:
 
To perform the manual configuration:
Line 172: Line 181:
 
  # lircd
 
  # lircd
  
Test it with irw. irw will output the commands received by the IR receiver that match your lircd.conf file.  So start irw, point your remote and start pressing buttons.
+
Test it with the '''irw''' utility. irw will output the commands received by the IR receiver that match your lircd.conf file.  So start irw, point your remote and start pressing buttons.
  
 
  # irw
 
  # irw
Line 194: Line 203:
  
 
==== openSUSE ====
 
==== openSUSE ====
 
 
[[Image:Geeko_head48.png|25px]] '''openSUSE 10.x''' does not required the steps described above, just install the lirc and lirc-kmp-<your kernel type> rpms (to find kernel type, type "rpm -qf /boot/vmlinuz" at a command prompt). You still need to do the following though.''
 
[[Image:Geeko_head48.png|25px]] '''openSUSE 10.x''' does not required the steps described above, just install the lirc and lirc-kmp-<your kernel type> rpms (to find kernel type, type "rpm -qf /boot/vmlinuz" at a command prompt). You still need to do the following though.''
  
Line 208: Line 216:
  
 
==== Ubuntu 6.10 Edgy, 7.04 Feisty, 7.10 Gutsy ====
 
==== Ubuntu 6.10 Edgy, 7.04 Feisty, 7.10 Gutsy ====
 
 
Alternate Ubuntu install instructions can be found here: [[Ubuntu_lirc_install]]  
 
Alternate Ubuntu install instructions can be found here: [[Ubuntu_lirc_install]]  
  
Line 221: Line 228:
  
 
==== Ubuntu 8.10 ====
 
==== Ubuntu 8.10 ====
 
+
Ubuntu 8.10 ("Intrepid Ibex") has out of the box kernel modules for the MCE remotes. All that is required is to install lirc (as noted above), and follow the prompts. An alternative to LIRC is ir-keytable, which once installed with an already recognized MCE reciever and remote should work out of the box.
Ubuntu 8.10 ("Intrepid Ibex") has out of the box kernel modules for the MCE remotes. All that is required is to install lirc (as noted above), and follow the prompts.
 
  
 
==== Debian GNU/Linux 4.0 ====
 
==== Debian GNU/Linux 4.0 ====
 
 
You need to install the lirc packages using apt:
 
You need to install the lirc packages using apt:
  
Line 255: Line 260:
  
 
====Gentoo (2.6.10) ====
 
====Gentoo (2.6.10) ====
 
 
For my Gentoo (2.6.10) installation I had to do a few extra things.
 
For my Gentoo (2.6.10) installation I had to do a few extra things.
 
Before following any install documentation, remove all lirc_mceusb.ko and lirc_dev.ko modules.  Mine were in /lib/modules/2.6.10/misc/ .  I also had to remove /lib/dev-state/lirc* because devfs was apparently trying to restore some older (non working) lirc states.
 
Before following any install documentation, remove all lirc_mceusb.ko and lirc_dev.ko modules.  Mine were in /lib/modules/2.6.10/misc/ .  I also had to remove /lib/dev-state/lirc* because devfs was apparently trying to restore some older (non working) lirc states.
Line 291: Line 295:
 
==== Fedora ====
 
==== Fedora ====
  
There are lirc userspace packages in the main Fedora package repository, and lirc kernel drivers are patched into the Fedora kernels.
+
Fedora follows upstream, and is currently in the process to release 0.9.3. It utilizes dynamic drivers, systemd-based services and the latest kernels with all relevant lirc drivers in the staging area included.
 +
 
 +
The basic steps:
  
1a) Simply yum install the userspace bits:
+
  # dnf install lirc-compat
  
# yum install lirc
+
Configure manually as documented in http://www.lirc.org/html/configuration-guide.html or using
  
1b) Optionally, to get a library of ready-to-go remote config files:
+
  $ lirc-setup
  
  # yum install lirc-remotes
+
lirc-setup will let you select both a capture device and a remote config file and download the latter. You will need to copy the files to their final location, as hinted by lirc-setup.
  
2) Copy an appropriate remote config file to /etc/lirc/lircd.conf.
 
  
 
3) Start the service and set it to run on system startup:
 
3) Start the service and set it to run on system startup:
  
  # /sbin/service lircd start
+
  # systemctl enable lircd.socket
  # /sbin/chkconfig lircd on
+
  # systemctl start lircd.socket
  
 
== Configuring the Buttons ==
 
== Configuring the Buttons ==
 
=== Programmable Buttons ===
 
=== Programmable Buttons ===
Some MCE Remote Controls are able to learn codes from other remote controls.  This was designed to allow you to turn on and off your television and control the TV volume. <b>Only</b> the following MCE buttons are able to be programmed:
+
Some MCE Remote Controls are able to learn codes from other remote controls.  This was designed to allow you to turn on and off your television and control the TV volume. <b>Only</b> the following MCE buttons are able to be programmed:
 
* TV Power
 
* TV Power
 
* Volume +
 
* Volume +
Line 328: Line 333:
  
 
=== Example lircrc config file ===
 
=== Example lircrc config file ===
 
 
Add the following to ~/.mythtv/lircrc:
 
Add the following to ~/.mythtv/lircrc:
  
{{Code box|~/.mythtv/lircrc|
+
{{LIRC|~/.mythtv/lircrc|
 
<pre>
 
<pre>
 
   begin
 
   begin
 
     prog = mythtv
 
     prog = mythtv
     button = One
+
     button = KEY_1
 
     config = 1
 
     config = 1
 
   end
 
   end
Line 341: Line 345:
 
   begin
 
   begin
 
     prog = mythtv
 
     prog = mythtv
     button = Two
+
     button = KEY_2
 
     config = 2
 
     config = 2
 
   end
 
   end
Line 347: Line 351:
 
   begin
 
   begin
 
     prog = mythtv
 
     prog = mythtv
     button = Three
+
     button = KEY_3
 
     config = 3
 
     config = 3
 
   end
 
   end
Line 353: Line 357:
 
   begin
 
   begin
 
     prog = mythtv
 
     prog = mythtv
     button = Four
+
     button = KEY_4
 
     config = 4
 
     config = 4
 
   end
 
   end
Line 359: Line 363:
 
   begin
 
   begin
 
     prog = mythtv
 
     prog = mythtv
     button = Five
+
     button = KEY_5
 
     config = 5
 
     config = 5
 
   end
 
   end
Line 365: Line 369:
 
   begin
 
   begin
 
     prog = mythtv
 
     prog = mythtv
     button = Six
+
     button = KEY_6
 
     config = 6
 
     config = 6
 
   end
 
   end
Line 371: Line 375:
 
   begin
 
   begin
 
     prog = mythtv
 
     prog = mythtv
     button = Seven
+
     button = KEY_7
 
     config = 7
 
     config = 7
 
   end
 
   end
Line 377: Line 381:
 
   begin
 
   begin
 
     prog = mythtv
 
     prog = mythtv
     button = Eight
+
     button = KEY_8
 
     config = 8
 
     config = 8
 
   end
 
   end
Line 383: Line 387:
 
   begin
 
   begin
 
     prog = mythtv
 
     prog = mythtv
     button = Nine
+
     button = KEY_9
 
     config = 9
 
     config = 9
 
   end
 
   end
Line 389: Line 393:
 
   begin
 
   begin
 
     prog = mythtv
 
     prog = mythtv
     button = Zero
+
     button = KEY_0
 
     config = 0
 
     config = 0
 
   end
 
   end
Line 395: Line 399:
 
   begin
 
   begin
 
     prog = mythtv
 
     prog = mythtv
     button = Back
+
     button = KEY_BACK
 
     config = Esc
 
     config = Esc
 
   end
 
   end
Line 401: Line 405:
 
   begin
 
   begin
 
     prog = mythtv
 
     prog = mythtv
     button = Home
+
     button = KEY_HOME
 
     config = Esc
 
     config = Esc
 
   end
 
   end
Line 407: Line 411:
 
   begin
 
   begin
 
     prog = mythtv
 
     prog = mythtv
     button = Guide
+
     button = KEY_EPG
 
     config = M
 
     config = M
 
   end
 
   end
Line 413: Line 417:
 
   begin
 
   begin
 
     prog = mythtv
 
     prog = mythtv
     button = More
+
     button = KEY_INFO
 
     config = I
 
     config = I
 
   end
 
   end
Line 419: Line 423:
 
   begin
 
   begin
 
     prog = mythtv
 
     prog = mythtv
     button = VolDown
+
     button = KEY_VOLUMEDOWN
 
     repeat = 1
 
     repeat = 1
 
     config = F10
 
     config = F10
Line 426: Line 430:
 
   begin
 
   begin
 
     prog = mythtv
 
     prog = mythtv
     button = VolUp
+
     button = KEY_VOLUMEUP
 
     repeat = 1
 
     repeat = 1
 
     config = F11
 
     config = F11
Line 433: Line 437:
 
   begin
 
   begin
 
     prog = mythtv
 
     prog = mythtv
     button = ChanUp
+
     button = KEY_CHANNELUP
 
     repeat = 3
 
     repeat = 3
 
     config = Up
 
     config = Up
Line 440: Line 444:
 
   begin
 
   begin
 
     prog = mythtv
 
     prog = mythtv
     button = ChanDown
+
     button = KEY_CHANNELDOWN
 
     repeat = 3
 
     repeat = 3
 
     config = Down
 
     config = Down
Line 447: Line 451:
 
   begin
 
   begin
 
     prog = mythtv
 
     prog = mythtv
     button = Up
+
     button = KEY_UP
 
     repeat = 3
 
     repeat = 3
 
     config = Up
 
     config = Up
Line 454: Line 458:
 
   begin
 
   begin
 
     prog = mythtv
 
     prog = mythtv
     button = Down
+
     button = KEY_DOWN
 
     repeat = 3
 
     repeat = 3
 
     config = Down
 
     config = Down
Line 461: Line 465:
 
   begin
 
   begin
 
     prog = mythtv
 
     prog = mythtv
     button = Left
+
     button = KEY_LEFT
 
     repeat = 3
 
     repeat = 3
 
     config = Left
 
     config = Left
Line 468: Line 472:
 
   begin
 
   begin
 
     prog = mythtv
 
     prog = mythtv
     button = Right
+
     button = KEY_RIGHT
 
     repeat = 3
 
     repeat = 3
 
     config = Right
 
     config = Right
Line 475: Line 479:
 
   begin
 
   begin
 
     prog = mythtv
 
     prog = mythtv
     button = Play
+
     button = KEY_PLAY
 
     config = Return
 
     config = Return
 
   end
 
   end
Line 481: Line 485:
 
   begin
 
   begin
 
     prog = mythtv
 
     prog = mythtv
     button = OK
+
     button = KEY_OK
 
     config = Return
 
     config = Return
 
   end
 
   end
Line 487: Line 491:
 
   begin
 
   begin
 
     prog = mythtv
 
     prog = mythtv
     button = Enter
+
     button = KEY_ENTER
 
     config = Return
 
     config = Return
 
   end
 
   end
Line 493: Line 497:
 
   begin
 
   begin
 
     prog = mythtv
 
     prog = mythtv
     button = Mute
+
     button = KEY_MUTE
 
     config = |
 
     config = |
 
   end
 
   end
Line 499: Line 503:
 
   begin
 
   begin
 
     prog = mythtv
 
     prog = mythtv
     button = Rewind
+
     button = KEY_REWIND
 
     config = <
 
     config = <
 
   end
 
   end
Line 505: Line 509:
 
   begin
 
   begin
 
     prog = mythtv
 
     prog = mythtv
     button = Forward
+
     button = KEY_FASTFORWARD
 
     config = >
 
     config = >
 
   end
 
   end
Line 511: Line 515:
 
   begin
 
   begin
 
     prog = mythtv
 
     prog = mythtv
     button = Record
+
     button = KEY_RECORD
 
     config = R
 
     config = R
 
   end
 
   end
Line 517: Line 521:
 
   begin
 
   begin
 
   prog = mythtv
 
   prog = mythtv
   button = Stop
+
   button = KEY_STOP
 
   config = O
 
   config = O
 
   end
 
   end
Line 523: Line 527:
 
   begin
 
   begin
 
     prog = mythtv
 
     prog = mythtv
     button = Pause
+
     button = KEY_PAUSE
 
     config = P
 
     config = P
 
   end
 
   end
Line 530: Line 534:
 
   begin
 
   begin
 
   prog = mythtv
 
   prog = mythtv
   button = Replay
+
   button = KEY_PREVIOUS
 
   config = Q
 
   config = Q
 
   end
 
   end
Line 537: Line 541:
 
   begin
 
   begin
 
   prog = mythtv
 
   prog = mythtv
   button = Skip
+
   button = KEY_NEXT
 
   config = Z
 
   config = Z
 
   end
 
   end
Line 543: Line 547:
 
   begin
 
   begin
 
   prog = mythtv
 
   prog = mythtv
   button = LiveTV
+
   button = KEY_TV
 
   repeat = 3
 
   repeat = 3
 
   config = ALT+L
 
   config = ALT+L
Line 551: Line 555:
 
   begin
 
   begin
 
   prog = mythtv
 
   prog = mythtv
   button = Teletext
+
   button = KEY_SUBTITLE
 
   config = T   
 
   config = T   
 
   end
 
   end
Line 557: Line 561:
 
   begin
 
   begin
 
   prog = mythtv
 
   prog = mythtv
   button = Blue
+
   button = KEY_BLUE
 
   config = W   
 
   config = W   
 
   end
 
   end
Line 564: Line 568:
  
 
=== Suggested changes to Button Functions ===
 
=== Suggested changes to Button Functions ===
This section has been moved to [[Customized Remote Control Keys]], as the suggestions apply to all remote controls, not just MCE remotes.
+
See [[Customized Remote Control Keys]]. The suggestions apply to all remote controls, not just MCE remotes.
  
 
=== S3 / Suspend To RAM ===
 
=== S3 / Suspend To RAM ===
This section will allow you to press the "PC" button on your MCE Remote and suspend to RAM in about one second. All fans are off, power is only minimally keeping your RAM refreshed, and your PC is silent. You can then press the "PC" button again to return to the same place in MythTV in about one second. Beats shutting down and booting up to save power. I am a Gentoo user, so only use this as an example. Since kernel 2.6.23, you need to enable deprecated /proc/acpi systems. Also, if using recent nvidia proprietary drivers, you can remove it from hibernate's blacklisted modules.
+
This section will allow you to press the "PC" button on your MCE Remote and suspend to RAM in about one second. All fans are off, power is only minimally keeping your RAM refreshed, and your PC is silent. You can then press the "PC" button again to return to the same place in MythTV in about one second. Beats shutting down and booting up to save power. I am a Gentoo user, so only use this as an example. Since kernel 2.6.23, you need to enable deprecated /proc/acpi systems. Also, if using recent nVidia proprietary drivers, you can remove it from hibernate's blacklisted modules.
 
Be sure irexec is running, you can add this in your .xinitrc:
 
Be sure irexec is running, you can add this in your .xinitrc:
 
  irexec -d
 
  irexec -d
Line 595: Line 599:
 
This command can be saved in your local.start
 
This command can be saved in your local.start
  
It also might be useful to change the MythTV exit settings to issue hibernate-ram on shutdown
+
It also might be useful to change the MythTV exit settings to issue hibernate-ram on shutdown.
 +
 
 +
 
 +
'''From Ubuntu/Mythbuntu 10.10 onwards'''
 +
 
 +
Kernel changes require you to explicitly power USB devices during sleep. If after following the above the PC does not wake from sleep:
 +
 
 +
Get ID of remote receiver (0815)
 +
lsusb
 +
Bus 002 Device 002: ID 0471:0815 Philips (or NXP) eHome Infrared Receiver
 +
 
 +
Get port details (2-1)
 +
grep 0815 /sys/bus/usb/devices/*/idProduct
 +
/sys/bus/usb/devices/2-1/idProduct:0815
 +
 
 +
Check state of port (disabled)
 +
cat /sys/bus/usb/devices/2-1/power/wakeup
 +
disabled
 +
 
 +
Edit /etc/rc.local to enable port
 +
Add line
 +
echo enabled > /sys/bus/usb/devices/2-1/power/wakeup
 +
 
 +
on reboot the port will be powered when in S3, and the PC will wake from the remote.
 +
 
 +
Alternatively you can set up a udev rule to automagically populate /sys on insert of the IR receiver (as well as /proc/acpi/wakeup - be sure to use the correct USBx for your system)
 +
Create a new rule /etc/udev/rules.d/90-mcewakeup.rules (ensure that the USB ID matches your receiver)
 +
# enable wake from S3 for MCE USB device 0471:0815
 +
SUBSYSTEM=="usb", ENV{ID_VENDOR_ID}=="0471", ENV{ID_MODEL_ID}=="0815" RUN+="/bin/sh -c 'echo enabled > /sys$env{DEVPATH}/power/wakeup;echo USB0 > /proc/acpi/wakeup'"
 +
 
 +
This works for me on mythbuntu 11.04, udev seems to change rather frequently and rules may need adopting for other distros/udev versions.
 +
 
 +
You might also need to enable power to the parent hub, as well as the device.
 +
udevadm info --attribute-walk /sys/bus/usb/devices/2-1
 +
 
 +
looking at parent device '/devices/pci0000:00/0000:00:1a.0/usb2':
 +
...
 +
SUBSYSTEMS=="usb"
 +
DRIVERS=="usb"
 +
...
 +
ATTRS{idVendor}=="1d6b"
 +
ATTRS{idProduct}=="0002"
 +
...
 +
ATTRS{busnum}=="2"
 +
...
 +
And add to the udev rules
 +
SUBSYSTEM=="usb", ATTRS{idVendor}=="1d6b", ATTRS{idProduct}=="0002", ATTRS{busnum}=="2" RUN+="/bin/sh -c 'echo enabled > /sys$env{DEVPATH}/power/wakeup'"
  
 
=== IR Blasting ===
 
=== IR Blasting ===
 +
Both versions of the MCE Remote support IR blasting in Lirc. IR Blasting is useful to change channels on your STB. Once your remote is working its easy to blast.
  
Both version of the MCE Remote support IR blasting in Lirc.  IR Blasting is useful to change channels on your STB.  Once your remote is working its easy to blast.
+
1. First you need to add the remote to your /etc/lircd.conf file.[http://lirc.sourceforge.net/remotes]
 
 
1. First you need to add the remote to your /etc/lircd.conf file.[http://lirc.sourceforge.net/remotes]
 
  
2. Copy and paste that text to the end of your /etc/lircd.conf file.  Make note of the NAME portion of the remote definition.
+
2. Copy and paste that text to the end of your /etc/lircd.conf file.  Make note of the NAME portion of the remote definition.
  
3. Restart LIRC.   
+
3. Restart LIRC.   
 
In fedora this can be done by running
 
In fedora this can be done by running
 
   # /sbin/service lirc restart
 
   # /sbin/service lirc restart
Line 612: Line 661:
 
  $ irsend LIST "" ""
 
  $ irsend LIST "" ""
  
5. Now you should be able to list the commands available to LIRC
+
5. Now you should be able to list the commands available to LIRC
 
   $ irsend LIST name ""   
 
   $ irsend LIST name ""   
  
Line 627: Line 676:
 
   irsend: 000000002340a606 SIX
 
   irsend: 000000002340a606 SIX
  
6. To send a signal to device one issue:
+
6. To send a signal to device one issue:
 
   $ irsend SET_TRANSMITTERS 1
 
   $ irsend SET_TRANSMITTERS 1
 
   $ irsend SEND_ONCE name button   
 
   $ irsend SEND_ONCE name button   
Line 636: Line 685:
 
   $ irsend SET_TRANSMITTERS 2   
 
   $ irsend SET_TRANSMITTERS 2   
 
   irsend SEND_ONCE name button
 
   irsend SEND_ONCE name button
 
 
7.  You can now use these commands to make two channel change scripts:
 
7.  You can now use these commands to make two channel change scripts:
 
   #!/bin/sh
 
   #!/bin/sh
Line 648: Line 696:
 
   exit 0
 
   exit 0
  
8. Make it executable
+
8. Make it executable
 
   $ chmod +x chan_ch_1
 
   $ chmod +x chan_ch_1
  
9. This is a good time to test it
+
9. This is a good time to test it
 
   ./chan_ch_1 12   
 
   ./chan_ch_1 12   
  
 
(should change the channel to 12 on blaster 1)
 
(should change the channel to 12 on blaster 1)
  
10. Add the scprit to MythTV channel change in inputs.
+
10. Add the scprit to MythTV channel change in inputs.
  
 
== Troubleshooting ==
 
== Troubleshooting ==
 +
=== Arrow Buttons Repeat ===
 +
When navigating the menus in Mythtv, it may appear that each time you hit the up or down arrow, that the button his hit twice but if you are using irw, the button only appears to be pressed once.  This is likely caused by another kernel module that is attempting to treat the mce remote as a keyboard.  As a test try unloading a few modules
 +
modprobe -r ir_rc6_decoder
 +
modprobe -r rc_rc6_mce
 +
modprobe -r ir_rc5_decoder
 +
 +
If that solves the problem, you'll need to add the following line to /etc/rc.local on startup.  (You can't blacklist the modules because the are force loaded by ir_raw.c)
 +
 +
echo lirc > /sys/class/rc/rc0/protocols
  
 
=== Remote fails to send data ===
 
=== Remote fails to send data ===
The MCE firmware can sometimes get into an inconsistent state and needs to be reset.
+
The MCE remotes firmware can sometimes get into an inconsistent state and needs to be reset.
  
In some models, there might be a large capacitor in the unit because you have to remove the batteries for 1/2 hour or more to discharge it , or try pressing lots of buttons to discharge it quicker. This should reset the firmware.
+
In some models, there might be a large capacitor in the unit because you have to remove the batteries for 1/2 hour or more to discharge it, or try pressing lots of buttons to discharge it quicker. This should reset the firmware.
 
 
=== Transmitter (Blaster) LEDs flash with irsend but IR reciever device does not pick up anything. ===
 
  
 +
=== Transmitter (Blaster) LEDs flash with irsend but device does not respond===
 
The small (1/4in) Microsoft MCE transmitter LEDs have a very short range (<2cm) since they are designed to be attached directly over the IR receiver window. If you cannot get it close enough, it probably will not work. I replaced the original MS MCE transmitter LEDs with the PVR500's (slightly bigger 1/2in length) transmitter LEDs and I was able to control the IR receiver device.  
 
The small (1/4in) Microsoft MCE transmitter LEDs have a very short range (<2cm) since they are designed to be attached directly over the IR receiver window. If you cannot get it close enough, it probably will not work. I replaced the original MS MCE transmitter LEDs with the PVR500's (slightly bigger 1/2in length) transmitter LEDs and I was able to control the IR receiver device.  
 
They are both equivalent devices and uses lirc_mceusb2.
 
They are both equivalent devices and uses lirc_mceusb2.
Line 673: Line 729:
  
 
=== Sluggish / Stuttery Remote ===
 
=== Sluggish / Stuttery Remote ===
 
+
*The below solution is no longer necessary since it has been fixed in lirc-0.8.1.
*The below solution is no longer necessary since it has been fixed in lirc 0.8.1.
 
  
 
Those using the mceusb2 module (for the newer MCE remote) may want to implement Maciek Klimkowski's [http://sourceforge.net/mailarchive/forum.php?thread_id=10284691&forum_id=5339 patch] to make the remote feel a little more responsive and detect repeat keys properly. The patch edits the lirc_mceusb2.c file in the downloaded lirc code (/lirc-0.8.0/drivers/lirc_mceusb2/lirc_mceusb2.c) to remove lines 354 to 357 and insert send_packet_to_lirc(ir); just after the resulting line 380.
 
Those using the mceusb2 module (for the newer MCE remote) may want to implement Maciek Klimkowski's [http://sourceforge.net/mailarchive/forum.php?thread_id=10284691&forum_id=5339 patch] to make the remote feel a little more responsive and detect repeat keys properly. The patch edits the lirc_mceusb2.c file in the downloaded lirc code (/lirc-0.8.0/drivers/lirc_mceusb2/lirc_mceusb2.c) to remove lines 354 to 357 and insert send_packet_to_lirc(ir); just after the resulting line 380.
  
To install the patch, change directories to the directory that lirc unzipped to. For example, <i>/usr/src/lirc-0.8.0</i>, download the patch to this directory, then
+
To install the patch, change directories to the directory that lirc unzipped to. For example, <i>/usr/src/lirc-0.8.0</i>, download the patch to this directory, then
  
 
  <code>
 
  <code>
Line 685: Line 740:
  
 
You can then go ahead and configure / make / install lirc as normal.
 
You can then go ahead and configure / make / install lirc as normal.
{{Tip box | Even with lirc 0.8.1 you may still get key stutter. A possible work around is to renice lircd to a very high priority. I.e. 'renice -19 <pid of lircd>'}}
+
{{Tip box | Even with lirc-0.8.1 you may still get key stutter. A possible work around is to renice lircd to a very high priority. I.e. 'renice -19 <pid of lircd>'}}
 
 
=== Remote Key / Button Sensitivity ===
 
  
 +
===Remote Key / Button Sensitivity===
 
* You may find that pressing a button acts like you have pressed the button multiple times.
 
* You may find that pressing a button acts like you have pressed the button multiple times.
  
Line 698: Line 752:
 
* Alternatively you can add a line containing "repeat 0 0" to your config file before the line containing gap. This disables repeat entirely.
 
* Alternatively you can add a line containing "repeat 0 0" to your config file before the line containing gap. This disables repeat entirely.
  
 +
===Where to Buy===
 +
 +
http://www.amazon.com/Control-Infrared-Receiver-MCE2005-Ultimate/dp/B007T1XS8E/ref=sr_1_2?ie=UTF8&qid=1334734292&sr=8-2
 +
 +
http://www.buydvb.net/microsoft-mce-remote-control-usb-ir-receiver-win7-vista_p46.html
 +
 +
==See Also==
 +
[[LIRC]]
 +
 +
[[Category:Hardware]]
 
[[Category:Remote Controls]]
 
[[Category:Remote Controls]]
 
[[Category:Microsoft]]
 
[[Category:Microsoft]]

Latest revision as of 18:16, 27 November 2016

Media Center Edition (MCE) remotes are designed to control PCs running Microsoft Windows with Windows Media Center. MCE remotes come with an external infrared receiver that connects to a PC via USB. Newer PCs may have the IR receiver integrated in the case.

There are two main versions of the MCE remote, typically referred to as the 'older' (Version 1) and 'newer' (Version 2). As of lirc-0.8.1, both versions are supported. After kernel 2.6.35, using LIRC is optional.

The newer version of remote comes in various alternatives, including different shapes and features. The new model is manufactured by Philips and half a dozen other manufacturers and is available by (among many other ways) purchase on it's own, shipped with MCE 2005 and contained in Hauppauge TV card MCE-Kits.


Important.png Note: Most of this text is very old. Since written, LIRC has been heavily updated with e. g., dynamic drivers (no need to recompile) and systemd support. At the time of writing, the last LIRC version is 0.9.3.

While Debian-based distros still is using 0.9.0 which is similar to the versions described here other distros have moved on to use more recent LIRC versions, in most cases also using systemd. This makes large part of this text obsolete on these distros.

There is new configuration information on http://lirc.sourceforge.net, in particular a new Configuration Guide. However, here is certainly nothing MCE remote specific.

Media Center Remotes

MCEremote.jpg Media Centre Remote 2 Media Centre Remote 2 ALT Media Centre Remote 2 ALT 2 MCE Remote Hauppauge version MCE Remote Hauppauge Windows Vista version Philips remote MCE Black Hauppauge
Version
1
2
2
2
2
2
2
2
Model
1039
1039
1039
Hauppauge
WinTV-PVR kit
1069/335(UK/AU)
RC1974506/00
1019:0f38
Elitegroup Computer Systems
Features
Backlight
Backlight
Ergonomic/Balanced
Backlight
Ergonomic/Balanced
no colored buttons
Backlight
Ergonomic/Balanced
no TV Power button
Grey market
"My" Buttons
Uses mceusb2 lircd.conf
Uses mceusb2 lircd.conf
Two rows (8) of jump buttons
Rating
?/5
5/5
4/5
?/5
?/5
?/5
?/5
?/5
Click on a Remote to see the full size image

Support Status

Important.png Note: Originally there were two modules lirc_mceusb and lir_mceusb2. These were later merged into a single lirc_mceusb driver. More recently (2.6.35 kernel and lirc-0.8.7) the module was known as just mceusb. You need to adjust all the configuration examples below depending on exactly how the module is named.

MCE Remote

  • IR transmit and receive are supported on all generations of mce transceivers, as of lirc-0.8.6.
  • Some newer devices may require post lirc-0.8.6 cvs for full functionality
  • Historically, there were separate 1st-gen and 2nd-gen drivers, lirc_mceusb and lirc_mceusb2. They were merged into a single lirc_mceusb driver as of lirc-0.8.6, which as noted above, supports transmit and receive on all devices.

MCE Keyboard

MCE Remote alternative

  • There was a mod-mce project for early support, but modern kernels should support Version 1 & 2 USB receivers as HID devices out-of-the-box
  • LIRC not required
  • Transmit (IR Blaster) support is unknown
  • Depending on your distro, some re-mapping of remote button codes to keyboard scan codes may be required. More information here: HID_Remotes
  • You will probably have to add Keybindings in Myth for a few of your remote buttons

Installation guides

Important.png Note: The below assumes you are using LIRC, which is no longer required for basic setups not requiring LIRC's more complete feature set.

Older remote

I would think it's the same as the newer remote instructions below, but I can't verify. Only difference is the module name - it will be lirc_mceusb instead of lirc_mceusb2.

Newer remote

You must be using a 2.6 kernel for the newer remote. The kernel module that lirc creates does not have 2.4 support.

Be sure your kernel has support for USB. Most default kernels will. You will only need the USB 1.1 driver (OHCI or UHCI) and USB 2.0 (EHCI) is not required. There is no kernel module specific for this device. Before continuing, be sure your device is recognized by your USB host controller:

# lsusb
Bus 002 Device 001: ID 0000:0000
Bus 001 Device 002: ID 0471:0815 Philips
Bus 001 Device 001: ID 0000:0000

Windows Vista MCE Remote

Another newer remote (version 1069) now responds with the following when you type lsusb:

# lsusb
Bus 002 Device 002: ID 0609:0334 SMK Manufacturing, Inc.
Bus 002 Device 001: ID 0000:0000
Bus 001 Device 001: ID 0000:0000

This remote requires an updated lirc_mceusb2 driver (newer than current lirc-0.8.2 released: 9-Jun-2007) Download just the updated driver (version 1.30 of the file and newer has support) from LIRC CVS or follow the instructions below for a complete CVS checkout.

Use the default mceusb2 lircd.conf file and all of the remote's keys work without modifying the example mceusb2 lircd.conf file.

Download a lirc CVS SnapShot

Generally the latest cvn snapshot from the official LIRC website should work fine. As of writing, the latest snapshot available is lirc-0.8.7pre1. Download and extract it either manually from the previous link or using the following code.

cd /usr/src
wget http://lirc.sourceforge.net/software/snapshots/lirc-0.8.7pre1.tar.bz2
bunzip2 lirc-0.8.7pre1.tar.bz2
tar -xvf lirc-0.8.7pre1.tar
cd lirc-0.8.7pre1

Users of the very latest linux kernels may find they have problems compiling or running code from the svn snapshot. If you have problems with the above install, or just want to run the latest and greatest lirc version, download the latest cvs lirc code using the following method. If that still doesn't work, please report your issues to the lirc mailing list.

Downloading using CVS

Important.png Note: The last version available in CVS is 0.8.7. Since then, the development is using git, and the steps to use the latest source is simplified. See https://sourceforge.net/p/lirc/git/

1. Make sure you have the cvs, autoconf, automake and libtool packages installed (rpm package manager users search for them and install their rpms). 2. Type the following on a command line and ignore what it says about not finding /root/...:

cvs -d:pserver:anonymous@lirc.cvs.sourceforge.net:/cvsroot/lirc login

3. Type the following:

cvs -z8 -d:pserver:anonymous@lirc.cvs.sourceforge.net:/cvsroot/lirc co lirc

4. Type the following:

cd lirc
./autogen.sh

5. Continue with the following Install section, starting with "./setup.sh".

Install

Important.png Note: Modern versions (0.9.1+) have have moved all configuration steps to post-build. For these versions this text is obsolete.

You now have two choices, you can either run the Lirc Setup script and accept it installing itself where it wants to, or you can carry out a manual configure. Using the setup script is easier, but it means that the various binararies and configuration files aren't placed in the normal Gentoo locations.

To use the automated setup process:

./setup.sh
Menu Option # (1) - Driver Configuration (enter)
Menu Option # (8) - USB Devices (enter)
Menu Option # (o) - Windows Media Center Remotes (new version, Philips et al.) (enter)
Menu Option # (3) - Save your configuration and run configure (enter)
make
make install


Important.png Note: If bash returns 'dialog not found' when running ./setup.sh, install the dialog package

This will also create a /etc/lircd.conf file which should work. If it complains about missing fedora source files use "yum install kernel-devel" and rerun ./setup.sh.

To perform the manual configuration:

./configure --prefix=/usr --sysconfdir=/etc/conf.d --with-x --with-driver=all
make
make install
cp remotes/mceusb/lircd.conf.mceusb /etc/conf.d/lircd.conf

If you get errors during the compile, try to change the .configure step to be


./configure --prefix=/usr --sysconfdir=/etc/conf.d --with-x --with-driver=mceusb2

instead of -with-driver=all. You should change mceusb2 to mceusb if you are using the old version of the remote.

If you get an error message that the "kernel source is required", it actually means the kernel headers. On my system this Ubuntu package was linux-kernel-headers-2.9.12-9-386 to match the version returned by the uname -a command. Installing the right version of the headers to match your kernel version is esssential. You may also need to install the gcc compiler.

Load the module

# modprobe lirc_mceusb2

Start lircd

# lircd

Test it with the irw utility. irw will output the commands received by the IR receiver that match your lircd.conf file. So start irw, point your remote and start pressing buttons.

# irw
000000037ff07bfe 00 One mceusb
000000037ff07bfd 00 Two mceusb
000000037ff07bfd 01 Two mceusb
000000037ff07bf2 00 Home mceusb
000000037ff07bf2 01 Home mceusb

If everything works, then autoload lirc_mceusb2 when your computer loads (how to depends on your distro) and start lircd as well (also depends on your distro).

One note, I'm running a late-model Gentoo and I have to load lircd with this option:

# lircd -d /dev/lirc/0

Otherwise it fails, as it defaults to /dev/lircd.

You will also need to install an lircrc file (note no dot at the front of the filename in the ~/.mythtv directory so that when the frontend starts up it can see the mythtv configuration settings for your remote control buttons.

Linux Distribution Specific Instructions

openSUSE

Geeko head48.png openSUSE 10.x does not required the steps described above, just install the lirc and lirc-kmp-<your kernel type> rpms (to find kernel type, type "rpm -qf /boot/vmlinuz" at a command prompt). You still need to do the following though.

On openSUSE you can start the lirc daemon at boot by using the run level editor (YaST > System > System Services) and enabling lirc. After this you need to edit /etc/sysconfig/lirc to load the lirc_mceusb2 module at boot. Look for the following lines and make any additions as needed (ie. they should look like this when you're finished):

LIRCD_DRIVER=""

LIRCD_DEVICE="/dev/lirc"

LIRC_MODULE="lirc_mceusb2"

You can leave the rest as it is.

Ubuntu 6.10 Edgy, 7.04 Feisty, 7.10 Gutsy

Alternate Ubuntu install instructions can be found here: Ubuntu_lirc_install

Ubuntu ships with basic lirc support but does not make it easy to install the kernel modules. These need to be installed as source and compiled. The compilation however, requires the full kernel sources and can have problems with version number conflicts. The easiest way to get this remote working on Ubuntu is to download the latest source from [1] and compile the lirc_mceusb or lirc_mceusb2 module as appropriate, following the instructions above. Then run

#sudo apt-get install lirc

Which will install the main lirc daemon and configure it to start on boot. The last step is to edit the /etc/lircd/hardware.conf file, setting the MODULE to either lirc_mceusb or lirc_mceusb2 as appropriate and the DEVICE section to /dev/lirc0 Lirc can then be restarted using

#sudo /etc/init.d/lirc restart

Ubuntu 8.10

Ubuntu 8.10 ("Intrepid Ibex") has out of the box kernel modules for the MCE remotes. All that is required is to install lirc (as noted above), and follow the prompts. An alternative to LIRC is ir-keytable, which once installed with an already recognized MCE reciever and remote should work out of the box.

Debian GNU/Linux 4.0

You need to install the lirc packages using apt:

# apt-get install lirc lirc-modules-source

The package lirc-modules-source allows you to build the required modules. However, just building the modules will leave you _without_ the modules lirc-mceusb andlirc-mceusb2, so you have to reconfigure the package:

# dpkg-reconfigure lirc-modules-source
Trying to compile lirc-modules-source 0.8.0-9.3 does not work with kernels newer than 2.6.19. See Debian bug #400494. Fix is to apply the patch that Eric Cooper posted to the bug report. To apply patch use "patch -p2 < lirc-patch" from within the lirc-0.8.0 directory.
The mceusb2 module also fails to compile due to an error in that code. To fix it, find all instances of SLAB_ATOMIC in /usr/src/modules/lirc/drivers/lirc_mceusb2/lirc_mceusb2.c and change them to GFP_ATOMIC. (more info)

This will present a screen where you can select the desired modules. You need at least lirc-dev and either lirc-mceusb or lirc-mceusb2 to get things working. If unsure, select both lirc-mceusb and lirc-mceusb2. Now you can build the modules for lirc (using the command `make-kpkg modules-image` with some additional options, depending on the kernel in use), and afterwards install the generated package from /usr/src, on my system this was:

# dpkg -i lirc-modules-2.6.17.13_0.8.0-9+MediaCenter+1.2_i386.deb

After this step, You have all the components needed on your system.

To auto-load the modules on system boot, just add them to your /etc/modules file.

Gentoo (2.6.10)

For my Gentoo (2.6.10) installation I had to do a few extra things. Before following any install documentation, remove all lirc_mceusb.ko and lirc_dev.ko modules. Mine were in /lib/modules/2.6.10/misc/ . I also had to remove /lib/dev-state/lirc* because devfs was apparently trying to restore some older (non working) lirc states.

Now follow the instructions in the INSTALL to verify proper installation (it may be helpful to load the module with "modprobe -v lirc_mceusb" to ensure you are loading the proper modules from the proper places).

I will add more to this as I understand it better, but for right now I finally have this working. Any help on Wiki Formatting would also be appreciated.

KnoppMyth

R5B7

With a clean install from R5B7 I had to edit one file to get my remote working:
/etc/init.d/lirc

Orig:

Changed to:
start-stop-daemon --start --quiet --exec /usr/sbin/lircd \

Stole this from the forums - figured it should be in the wiki:
http://mysettopbox.tv/phpBB2/viewtopic.php?t=5620

R5E50

From a clean install of R5E50 I had to do the exact opposite. /etc/init.d/lirc

Orig:
start-stop-daemon --start --quiet --exec /usr/sbin/lircd \
Changed to:
start-stop-daemon --start --quiet --exec /usr/sbin/lircd -- $LIRCD_ARGS \

Credit goes to the same thread posted above and:
http://mysettopbox.tv/phpBB2/viewtopic.php?t=13137

Fedora

Fedora follows upstream, and is currently in the process to release 0.9.3. It utilizes dynamic drivers, systemd-based services and the latest kernels with all relevant lirc drivers in the staging area included.

The basic steps:

  # dnf install lirc-compat

Configure manually as documented in http://www.lirc.org/html/configuration-guide.html or using

  $ lirc-setup

lirc-setup will let you select both a capture device and a remote config file and download the latter. You will need to copy the files to their final location, as hinted by lirc-setup.


3) Start the service and set it to run on system startup:

# systemctl enable lircd.socket
# systemctl start lircd.socket

Configuring the Buttons

Programmable Buttons

Some MCE Remote Controls are able to learn codes from other remote controls. This was designed to allow you to turn on and off your television and control the TV volume. Only the following MCE buttons are able to be programmed:

  • TV Power
  • Volume +
  • Volume -

To program these buttons, do the following steps for each button in a dark area:

  1. Hold the "DVD MENU" and "OK" buttons at the same time for 2 seconds until the backlight turns off.
  2. Press the MCE button that you want to program. The backlight will blink once to confirm.
  3. Point the original TV remote control at the top of the MCE remote and press and hold the button that you want teach. The MCE remote backlight will blink twice to confirm. If the learning phase fails the MCE remote will blink 4 times (error).

Restore the Default Programmable Buttons Settings

The following steps set the TV Power and Volume +/- buttons back to their default commands:

  1. Press and hold the DVD MENU button and LEFT navigation button at the same time until the MCE Remote Control lights turn off.
  2. Press the OK button.

The MCE remote control lights will blink twice to confirm that the buttons have been reset. The TV and Volume +/- buttons will have the default commands assigned. If the default settings were not restored the lights blink quickly four times (error).

Example lircrc config file

Add the following to ~/.mythtv/lircrc:


Script.png ~/.mythtv/lircrc

  begin
    prog = mythtv
    button = KEY_1
    config = 1
  end
  
  begin
    prog = mythtv
    button = KEY_2
    config = 2
  end
  
  begin
    prog = mythtv
    button = KEY_3
    config = 3
  end
  
  begin
    prog = mythtv
    button = KEY_4
    config = 4
  end
  
  begin
    prog = mythtv
    button = KEY_5
    config = 5
  end
  
  begin
    prog = mythtv
    button = KEY_6
    config = 6
  end
  
  begin
    prog = mythtv
    button = KEY_7
    config = 7
  end
  
  begin
    prog = mythtv
    button = KEY_8
    config = 8
  end
  
  begin
    prog = mythtv
    button = KEY_9
    config = 9
  end
  
  begin
    prog = mythtv
    button = KEY_0
    config = 0
  end
  
  begin
    prog = mythtv
    button = KEY_BACK
    config = Esc
  end
  
  begin
    prog = mythtv
    button = KEY_HOME
    config = Esc
  end
  
  begin
    prog = mythtv
    button = KEY_EPG
    config = M
  end
  
  begin
    prog = mythtv
    button = KEY_INFO
    config = I
  end
  
  begin
    prog = mythtv
    button = KEY_VOLUMEDOWN
    repeat = 1
    config = F10
  end
  
  begin
    prog = mythtv
    button = KEY_VOLUMEUP
    repeat = 1
    config = F11
  end
  
  begin
    prog = mythtv
    button = KEY_CHANNELUP
    repeat = 3
    config = Up
  end
  
  begin
    prog = mythtv
    button = KEY_CHANNELDOWN
    repeat = 3
    config = Down
  end
  
  begin
    prog = mythtv
    button = KEY_UP
    repeat = 3
    config = Up
  end
  
  begin
    prog = mythtv
    button = KEY_DOWN
    repeat = 3
    config = Down
  end
  
  begin
    prog = mythtv
    button = KEY_LEFT
    repeat = 3
    config = Left
  end
  
  begin
    prog = mythtv
    button = KEY_RIGHT
    repeat = 3
    config = Right
  end
  
  begin
    prog = mythtv
    button = KEY_PLAY
    config = Return
  end
  
  begin
    prog = mythtv
    button = KEY_OK
    config = Return
  end
  
  begin
    prog = mythtv
    button = KEY_ENTER
    config = Return
  end
  
  begin
    prog = mythtv
    button = KEY_MUTE
    config = |
  end
  
  begin
    prog = mythtv
    button = KEY_REWIND
    config = <
  end
  
  begin
    prog = mythtv
    button = KEY_FASTFORWARD
    config = >
  end
  
  begin
    prog = mythtv
    button = KEY_RECORD
    config = R
  end
  
  begin
   prog = mythtv
   button = KEY_STOP
   config = O
  end
  
  begin
    prog = mythtv
    button = KEY_PAUSE
    config = P
  end
  
  # Use for backwards commercial skip
  begin
   prog = mythtv
   button = KEY_PREVIOUS
   config = Q
  end
  
  # Use for forward commercial skip
  begin
   prog = mythtv
   button = KEY_NEXT
   config = Z
  end
  
  begin
   prog = mythtv
   button = KEY_TV
   repeat = 3
   config = ALT+L
  end
  
  # Toggle subtitles (closed captions)
  begin
   prog = mythtv
   button = KEY_SUBTITLE
   config = T   
  end
  
  begin
   prog = mythtv
   button = KEY_BLUE
   config = W   
  end


Suggested changes to Button Functions

See Customized Remote Control Keys. The suggestions apply to all remote controls, not just MCE remotes.

S3 / Suspend To RAM

This section will allow you to press the "PC" button on your MCE Remote and suspend to RAM in about one second. All fans are off, power is only minimally keeping your RAM refreshed, and your PC is silent. You can then press the "PC" button again to return to the same place in MythTV in about one second. Beats shutting down and booting up to save power. I am a Gentoo user, so only use this as an example. Since kernel 2.6.23, you need to enable deprecated /proc/acpi systems. Also, if using recent nVidia proprietary drivers, you can remove it from hibernate's blacklisted modules. Be sure irexec is running, you can add this in your .xinitrc:

irexec -d

In your lircrc, add this:

begin
 button = Power
 prog = irexec
 repeat = 0
 config = sudo /usr/sbin/hibernate-ram
end

In order for the button to wake, you need to specify the USB hub in /proc/acpi/wakeup. If you cat /proc/acpi/wakeup, you should see something like this:

Device  S-state   Status   Sysfs node
HUB0      S5     disabled  pci:0000:00:08.0
HUB1      S4     disabled
USB0      S3     disabled  pci:0000:00:02.0
USB1      S3     disabled  pci:0000:00:02.1

If you issue the following command, the disable status will toggle to enabled

sudo sh -c 'echo "USB0" > /proc/acpi/wakeup'

Should result in:

Device  S-state   Status   Sysfs node
HUB0      S5     disabled  pci:0000:00:08.0
HUB1      S4     disabled
USB0      S3     enabled   pci:0000:00:02.0
USB1      S3     disabled  pci:0000:00:02.1

This command can be saved in your local.start

It also might be useful to change the MythTV exit settings to issue hibernate-ram on shutdown.


From Ubuntu/Mythbuntu 10.10 onwards

Kernel changes require you to explicitly power USB devices during sleep. If after following the above the PC does not wake from sleep:

Get ID of remote receiver (0815)

lsusb
Bus 002 Device 002: ID 0471:0815 Philips (or NXP) eHome Infrared Receiver

Get port details (2-1)

grep 0815 /sys/bus/usb/devices/*/idProduct
/sys/bus/usb/devices/2-1/idProduct:0815

Check state of port (disabled)

cat /sys/bus/usb/devices/2-1/power/wakeup
disabled

Edit /etc/rc.local to enable port Add line

echo enabled > /sys/bus/usb/devices/2-1/power/wakeup

on reboot the port will be powered when in S3, and the PC will wake from the remote.

Alternatively you can set up a udev rule to automagically populate /sys on insert of the IR receiver (as well as /proc/acpi/wakeup - be sure to use the correct USBx for your system) Create a new rule /etc/udev/rules.d/90-mcewakeup.rules (ensure that the USB ID matches your receiver)

# enable wake from S3 for MCE USB device 0471:0815
SUBSYSTEM=="usb", ENV{ID_VENDOR_ID}=="0471", ENV{ID_MODEL_ID}=="0815" RUN+="/bin/sh -c 'echo enabled > /sys$env{DEVPATH}/power/wakeup;echo USB0 > /proc/acpi/wakeup'"

This works for me on mythbuntu 11.04, udev seems to change rather frequently and rules may need adopting for other distros/udev versions.

You might also need to enable power to the parent hub, as well as the device.

udevadm info --attribute-walk /sys/bus/usb/devices/2-1
looking at parent device '/devices/pci0000:00/0000:00:1a.0/usb2':
...
SUBSYSTEMS=="usb"
DRIVERS=="usb"
...
ATTRS{idVendor}=="1d6b"
ATTRS{idProduct}=="0002"
...
ATTRS{busnum}=="2"
...

And add to the udev rules

SUBSYSTEM=="usb", ATTRS{idVendor}=="1d6b", ATTRS{idProduct}=="0002", ATTRS{busnum}=="2" RUN+="/bin/sh -c 'echo enabled > /sys$env{DEVPATH}/power/wakeup'"

IR Blasting

Both versions of the MCE Remote support IR blasting in Lirc. IR Blasting is useful to change channels on your STB. Once your remote is working its easy to blast.

1. First you need to add the remote to your /etc/lircd.conf file.[2]

2. Copy and paste that text to the end of your /etc/lircd.conf file. Make note of the NAME portion of the remote definition.

3. Restart LIRC. In fedora this can be done by running

 # /sbin/service lirc restart

4. You can confirm what remote names lircd knows about using the following:

$ irsend LIST "" ""

5. Now you should be able to list the commands available to LIRC

 $ irsend LIST name ""   

(where name=the name of your remoted noted in step 2, which should have been included in the output of step 4)

You should get something along the lines of:

 [root@mythtv myth]# irsend LIST att ""
 irsend: 0000000023402600 ZERO
 irsend: 000000002340a601 ONE
 irsend: 0000000023402602 TWO
 irsend: 000000002340a603 THREE
 irsend: 0000000023402604 FOUR
 irsend: 000000002340a605 FIVE
 irsend: 000000002340a606 SIX

6. To send a signal to device one issue:

 $ irsend SET_TRANSMITTERS 1
 $ irsend SEND_ONCE name button  

(where name is your remote name and button is the name of the button in your def. file)

For device 2 just issue:

 $ irsend SET_TRANSMITTERS 2  
 irsend SEND_ONCE name button

7. You can now use these commands to make two channel change scripts:

 #!/bin/sh
 REMOTE_NAME=#######
 irsend SET_TRANSMITTERS 1
 for digit in $(echo $1 | sed -e 's/./& /g'); do
         irsend SEND_ONCE $REMOTE_NAME $digit
         sleep 0.4  # note, you may have to tweak the interdigit delay up a bit, depending on your STB model
 done
 irsend SEND_ONCE $REMOTE_NAME Enter
 exit 0

8. Make it executable

 $ chmod +x chan_ch_1

9. This is a good time to test it

 ./chan_ch_1 12  

(should change the channel to 12 on blaster 1)

10. Add the scprit to MythTV channel change in inputs.

Troubleshooting

Arrow Buttons Repeat

When navigating the menus in Mythtv, it may appear that each time you hit the up or down arrow, that the button his hit twice but if you are using irw, the button only appears to be pressed once. This is likely caused by another kernel module that is attempting to treat the mce remote as a keyboard. As a test try unloading a few modules

modprobe -r ir_rc6_decoder
modprobe -r rc_rc6_mce
modprobe -r ir_rc5_decoder 

If that solves the problem, you'll need to add the following line to /etc/rc.local on startup. (You can't blacklist the modules because the are force loaded by ir_raw.c)

echo lirc > /sys/class/rc/rc0/protocols

Remote fails to send data

The MCE remotes firmware can sometimes get into an inconsistent state and needs to be reset.

In some models, there might be a large capacitor in the unit because you have to remove the batteries for 1/2 hour or more to discharge it, or try pressing lots of buttons to discharge it quicker. This should reset the firmware.

Transmitter (Blaster) LEDs flash with irsend but device does not respond

The small (1/4in) Microsoft MCE transmitter LEDs have a very short range (<2cm) since they are designed to be attached directly over the IR receiver window. If you cannot get it close enough, it probably will not work. I replaced the original MS MCE transmitter LEDs with the PVR500's (slightly bigger 1/2in length) transmitter LEDs and I was able to control the IR receiver device. They are both equivalent devices and uses lirc_mceusb2.

It's also possible that there is infrared light interference. Certain LCD displays are known to interfere with infrared remotes. Try turning off possible interference sources, shielding the receiver (sometimes putting the receiver inside an open cabinet, behind a semi-transparent door, or putting a thin paper towel over the receiver helps).

Sluggish / Stuttery Remote

  • The below solution is no longer necessary since it has been fixed in lirc-0.8.1.

Those using the mceusb2 module (for the newer MCE remote) may want to implement Maciek Klimkowski's patch to make the remote feel a little more responsive and detect repeat keys properly. The patch edits the lirc_mceusb2.c file in the downloaded lirc code (/lirc-0.8.0/drivers/lirc_mceusb2/lirc_mceusb2.c) to remove lines 354 to 357 and insert send_packet_to_lirc(ir); just after the resulting line 380.

To install the patch, change directories to the directory that lirc unzipped to. For example, /usr/src/lirc-0.8.0, download the patch to this directory, then


patch -b -l -p1 <lirc-0.8.0.pre4-mceusb2_key_stutter_fix.patch

You can then go ahead and configure / make / install lirc as normal.

Information.png Tip: Even with lirc-0.8.1 you may still get key stutter. A possible work around is to renice lircd to a very high priority. I.e. 'renice -19 <pid of lircd>'

Remote Key / Button Sensitivity

  • You may find that pressing a button acts like you have pressed the button multiple times.

You can adjust the sensitivity of the remote by adjusting settings in the lircd.conf file (typically located /etc/lirc/lircd.conf)

  • Typically adjusting the gap setting in the lircd.conf to around 110000 provides a comfortable repeat rate.

Information on what each setting in the lircd.conf file does can be found here: http://winlirc.sourceforge.net/technicaldetails.html

  • Alternatively you can add a line containing "repeat 0 0" to your config file before the line containing gap. This disables repeat entirely.

Where to Buy

http://www.amazon.com/Control-Infrared-Receiver-MCE2005-Ultimate/dp/B007T1XS8E/ref=sr_1_2?ie=UTF8&qid=1334734292&sr=8-2

http://www.buydvb.net/microsoft-mce-remote-control-usb-ir-receiver-win7-vista_p46.html

See Also

LIRC