Using the Hauppauge remote control with Ubuntu Breezy Linux

This guide was written for the HP a1250n AMD 64 X2 computer, and will not work on all computers. It may also be missing steps since I sometimes had to try many things to get something to work.

I followed the instructions at patrick.wagstrom.net/tutorials/mythTV64/mythTV64.xml to get and build lirc.

	wget http://internap.dl.sourceforge.net/sourceforge/lirc/lirc-0.8.0.tar.bz2
	tar -jxvf lirc-0.8.0.tar.bz2
	cd lirc-0.8.0
	./configure
The configure program will allow setting the type of tv remote control. Select the menu for "driver configuration", then "tv card", then "hauppauge tv card".

The configure program will then indicate to use the lirc_i2c module. Then run the following.

	make
	sudo make install
	sudo /etc/init.d/lirc restart
I followed the instructions for loading lirc from http://ubuntuforums.org/showthread.php?t=30612.
	sudo update-modules
	sudo depmod -ae
	sudo modprobe lirc_i2c
	sudo lircd
Then simply run the irw program from a terminal to see if the remote is working. It should not print any errors, and when a button on the remote is clicked, a line should display on the terminal.

If irw displays, "connect: Connection refused", this means that lircd is not running. The irw command will sometimes kill lircd if the devices in /dev/lirc* are not correct. See below for more information.

To test the remote in mythtv, start mythbackend and mythfrontend. If an error "could not open config file /home/mythtv/.mythtv/lircrc" displays, do the following.

	cd /opt/mythtv/mythtv-0.18.1/configfiles
	cp hauppauge-lircrc-nativelirc /home/mythtv/.mythtv/lircrc
I saw one site mythtv.info/moin.cgi/UbuntuInstallationthat listed an alternative lircrc file that may map the buttons better for your version of the remote.
	wget http://wilsonet.com/mythtv/lircrc-haupgrey-g3.txt
	$ mkdir ~/.mythtv
	$ mv lircrc-haupgrey-g3.txt ~/.mythtv/lircrc
I found that some of the keys didn't work in the one from wilsonet, and so I copied some of the keys from the mythtv version. See the guide mythtv.html on setting up MythTV for more information.

After the above steps are complete, each time the computer reboots, the lirc drivers will not be reloaded. To get the correct dev/lirc devices loaded, add the following to /etc/udev/udev.rules.

	KERNEL="lirc0", SYMLINK="lirc"
Add following to /etc/modules to start the lirc_i2c module.
	lirc_i2c
I found from //mythtv.info/moin.cgi/UbuntuInstallation how to start lircd. Use a text editor to make a /etc/init.d/lircd file and enter the following.
#!/bin/sh

case "$1" in
'start')
        /usr/local/sbin/lircd --device=/dev/lirc0
        RETVAL=$?
        ;;
'stop')
        killall lircd
        RETVAL=$?
        ;;
esac
exit $RETVAL
The do the following.
	sudo chmod +x /etc/init.d/lircd
	sudo update-rc.d lircd defaults 99
At this point each time the PC boots, the infra red remote should be usable by the Mythtv software.
Hosted by www.Geocities.ws

1