LIRC

LIRC is a software package under linux which allows you interface with remote control/controlled devices. LIRC is pretty much a must for any 1/2 decent MythTV configuration.

For my Myth setup I use LIRC both to change the channels on the cable-set-top- box and as a way to control the mythtv interface from the couch. Although this is a quite common configuration its annoying to get working.

The first thing you have to decide when setting up LIRC is what hardware you want to use. You can build your own receivers/transmitters but the simple plans make for quite crappy and unreliable devices; for something more sophisticated the cost of parts adds up to exceed the cost of kits/ready-to- use devices.

I had a (X10 based) RF serial receiver and remote (that I got a while back with my Nvidia PC cinema card). It worked with better LIRC than it ever did under windows. To control the set-top-box I first got an iguanaworks USB transceiver but it would not work since it only transmits at 36khz (It can be flashed to transmit at 58khz with a non-existing utility) and all the devices I needed to control only worked at 58khz. Money down the drain. So I decided to try again, this time I got the Serial Iguanaworks transceiver this one interfaces with LIRC more like the home-made transceivers except it has greater range (thanks to a .3f capacitor (think battery) which stores energy for transmissions).

Alright so I'm thinking I have the hardware configuring should be a breeze. I already had the controlling software installed, all I needed was to compile the drivers. I downloaded the debian driver source package it looked all very nice and neat, it allowed me to select the drivers I want and even attempted to compile the drivers automagically.. except it failed. The sources it provides are too old and were no longer compatible with my kernel. No big deal, I'll compile the vanilla drivers from LIRC -- wrong.

LIRC can't be compiled with just any combination of drivers you want, the configuration scripts compile either any ONE driver or all of them. No big deal, I thought, I'll compile all and install only the onces I need.. except all the drivers don't compile. Compilation broke on some driver that I didn't need. So I decided to hack the config scripts a bit. I downloaded the CVS version of LIRC opened the configure.in file and around line 1207

if test "$lirc_driver" = "all"; then lirc_driver="lirc_dev \ lirc_atiusb \ lirc_serial"

Trimmed down the list of drivers to only the ones that I needed. I then ran autoconf to generate all the needed Makefiles and ran ./configure --with- driver=all --with-port=0x3f8 --with-irq=4 --with-timer=65536 --with-x --with- transmitter && make && make install and things built correctly with only the drivers I wanted.

From then on configuring LIRC was a breeze, I modified the debian /etc/init.d/lirc script to use start 2 lirc daemons, one for each driver and configured them to talk to each other.

Finally I made my lircd.conf and lircmd.conf using irecord and configured MythTV, xorg and channel changing script. YAY, working mythbox.

Brief overview of all the programs and devices that make up my mythbox
A/V Hardware: Nvidia MX440 (vga/svideo out), Happauge150 (rca audio/svideo in), CHAINTECH AV-710 (optical audio out), RCA dvd/audio system
Remote controlled devices: RCA TV, Scientific Atlanta Explorer 4200 (cable box), Nvidia branded X10 RF remote

The last problem I had was the cable box being off while mythtv was trying to record, Its a nasty one. But it turns out the cable box has this nice feature where it will turn on when any numerical key is pressed on the remote (can be enabled in the settings menu). So when mythtv changes channels the cable box is either already on or is turned on auto-magically.

More of my config files.

Debian  LILUG  MythTV  Software  2007-06-29T00:04:25