Go up one level.

Easy Way to Enable a Hauppauge Remote Control in Linux/MythTV

Script last updated on 11-October-2009.

Forget about LIRC and its overly complex software stack.
If you want a simple, easily customized way to get your Hauppauge remote control working under Linux, then read on.

The Linux kernel already contains a suitable device driver for Hauppauge IR remotes. This driver is the ir-kbd-i2c driver (Infra-Red Keyboard over Inter-IC communications bus). By default, it will work just fine with many remote controls, including those included with the PVR-250 cards (and similar).

For the newer Hauppauge HVR-1600 tuner card, I have a kernel patch which adds support for the IR remote port (only for the remote control, not the IR blaster output). Full source code and patches are included in the download below.

Note: This patch works with the 2.6.30 (and earlier) kernels, but not with 2.6.31. The 2.6.32 kernel (and beyond) already incorporate the patch, so it is not needed there.

All of this means that Mythbuntu-9.10 is a bit of a mess, because that system is based upon 2.6.31, and I don't see an obvious easy way to fix that exact in-between kernel. Your best bets are to wait for Mythbuntu-10.04 (based on 2.6.32), or upgrade your system to a 2.6.32 kernel now. I have posted detailed notes about making this work on Mythbuntu-9.10 here.

The Makefile in this package (below) assumes a 2.6.30 kernel, so don't try using it on more recent kernel versions. But the enable_hauppauge_remote.sh script will work fine by itself with a 2.6.32 kernel. I will update the Makefile and stuff for 2.6.32 someday, probably when Mythbuntu-10.04 is finally released.

To use this driver with a 2.6.30 (or earlier) kernel, you must first have installed your distribution's linux-headers package, and the standard development tools. On a Mythbuntu system, for example, this means you must first do this:

    sudo apt-get install build-essential input-utils
    sudo apt-get build-dep linux-image
Once you have the necessary development tools in place, download fix_hauppauge_remote.tar.gz into your home directory, and then do these commands:
    cd
    tar xzf fix_hauppauge_remote.tar.gz
    cd fix_hauppauge_remote
    sudo make install
This turns your remote control into just another ordinary keyboard for the X11/X.org GUI. Now keep the mouse cursor in a text window, and try pressing the numeric buttons on the remote, If you see digits appear, the remote is working. Customize it further by editing /usr/local/bin/hauppauge_remote.conf and changing whatever you (or Mythtv) want in there.

If necessary, you can see what code is generated by each button of the remote control, by temporarily loading the driver module with a debug flag.

Eg. try doing this:

    rmmod ir-kbd-i2c ; modprobe ir-kbd-i2c debug=1

Messages should appear in /var/log/messages (or possibly /var/log/kern.log) as buttons are pressed.

To make this permanent for subsequent reboots, you could add this line to the bottom of the /etc/rc.local file:

    /usr/local/bin/enable_hauppauge_remote.sh
You will need to redo the original installation procedure after any subsequent kernel upgrades, including those performed by your distribution's package manager.