As promised, here is the recipe I followed to get LIRC working for my Hauppauge HVR1600 card on Ubuntu 12.04. This includes both the IR Receiver and the IR Blaster. This may work for other Hauppauge cards as well. The hard work was all done by others, for Ubuntu 10.04, this just serves as an updated reference for Ubuntu 12.04. As usual, this info is provided with NO warranty of any kind, so use at your own risk! It's assumed you have basic knowledge of Linux/LIRC/Scripts/etc.
The secret to the HVR1600 is the lirc_zilog kernel module. Once this kernel module is loaded and LIRC is configured, the HVR1600's IR capabilities should work.
Step One: Install LIRC
Step one is easy, just install standard LIRC! You can install it from the Ubuntu Software Center, or, install (or build) it from the command line if you are so inclined. The LIRC version that was installed for me was 0.9.0.
Step Two: Install lirc_zilog
(Note: you might already have lirc_zilog installed, see below).
This part is a bit tricky. The "proper" way to do it would be to install the lirc-modules-source package, apply the lirc_zilog patch, then reconfigure the package to build the kernel modules. The Ubuntu 10.04 recipe for this is here.
However, it does not yet appear that the lirc-modules-source package is available for Ubuntu 12.04. If it were, you would likely have to make some changes to the patch file to get it building under 12.04 (you might find some hints here).
As a shortcut, I found a complied version of lirc_zilog that appears to be 12.04 compatible here. There is a *.deb file for both i386 and 64-bit version (disclaimer: I can't vouch for the security of this site of the files). I find it strange that these files appear in this package but aren't actually in Ubuntu by default - but I'm sure there is an answer to that (if you know, feel free to share).
Download the version applicable to you and open the *.deb file with the Archive Manager (not the Ubuntu Software Center, which it opens with by default).
Find the lirc_zilog.ko file in the archive here: /lib/modules/3.2.0-24-generic/kernel/drivers/staging/media/lirc/
Extract it, and copy it to the following location in your system:
To load the module: sudo modprobe lirc_zilog
If all was successful, you shouldn't get any errors. At this point, you should be able to do lsmod | grep -i lirc_zilog and see:
lirc_dev 19204 1 lirc_zilog
Pro-Tip: To have lirc_zilog automatically inserted into the kernel on boot, add it to /etc/modules
Pro-Tip: You might already have lirc_zilog installed. As an easy check, in a Terminal, go to /lib/modules and run find . -name "lirc_zilog*. If it finds lirc_zilog, already, you shouldn't have to copy one from another source. However, you'll still have to modprobe lirc_zilog to get it loaded and add it to /etc/modules to have it run boot.
Step Three: Install the HVR1600 IR Firmware files
I believe this can be found here, and a few other locations on the web.
This file needs to be copied here: /lib/firmware
Step Four: Configuration Files
You need to modify the following two files:
First, we modify hardware.conf to get lirc_zilog to be loaded. Add or modify the following lines (if necessary):
As for lircd.conf, again, a working one for my card was found here. I believe you can even put the relevant parts in its own file and use an include directive if you'd like.
Step Five: Take a deep breath
You're almost there! At this point, the following two things should work:
From a terminal, run "irw". Point your HVR1600 at the IR Receiver and press some buttons! If irw is working correctly, you should see some response, like:
00000000000017a5 00 OK Hauppauge_350
0000000000001795 00 Down Hauppauge_350
0000000000001794 00 Up Hauppauge_350
This means your IR Receiver is working.
To test the IR Blaster, use the irsend command. At this point, it doesn't matter what code set you use, you just want to get the light to blink. For example:
$ irsend SEND_ONCE blaster 0_130_KEY_0
Note that the name "blaster" was the name chosen in "lircd.conf" from above....if you used another name insert it there.
Step Six: Final configuration
If the IR Blaster and Receiver are responsive, you're pretty much golden. All that remains is a bit of extra configuration.
To get the IR Receiver to do "cool" things (e.g. work MythTV and/or launch applications), you want to configure a ".lircrc" file. This should be in your Home directory.
Each command to be sent to a specific application has an entry that looks like this:
begin prog = mythtv button = LEFT repeat = 3 config = Left end
Each starts with "begin" and ends with "end".
button = The button on the remote which will cause the command
prog = The program to send the command too.
config = The command to send to the program
repeat = What to do when a key is repeated. 0 ignores repeats. A positive value (n) sends the command to the program every "nth" times.
Obviously, you need a lot of commands to get various buttons working. To get you started, here is a .lircrc file very similar to the one I use.
Pro-Tip: To get a remote button to start a program, instead of just being interpreted by one, set "prog" to irexec and "config" to the command line-method of starting the program. Remember that irexec must be running in the background for this to work, so you can set it up as an Ubuntu start-up application.
For the receiver, you need to figure out what code set the device you are sending commands to uses. One again, a script is already developed for this. This will send the Power command to the device. Once you see it respond, you've found the right code set. For example, in the command I have above, the code set being used was 0_130 code set.
You'll most often be using this to change the channel, but you can do other things as well. You can find some example change_channel scripts here. Don't forget that in order for MythTV change the channel, you need to configure the backend to post to the script.
At this point you should be in good shape, but you might require some additional modifications to get things "quite right" (geeks are never happy, are we?)
My only concern is that some point along the line, a Linux kernel change will cause lirc_zilog to stop working. But I'll cross that bridge when I come to it...either by getting it building from source or finding it compiled elsewhere. I hope you found this guide helpful.
References and special thanks!