Building a Linux Media Network, one step at a time

Saturday, February 25, 2006

Building and Configuring LIRC

Building LIRC is actually pretty simple. Download the source package from and extract it to /usr/local/src. As indicated in the INSTALL file in that package, compiling it is as simple as running && make install. But you'll need the "dialog" package to run the setup script, so apt-get install dialog first. It's a small package and you can remove it as soon as you're done.

When I ran the setup script it correctly detected my port configuration (IO and IRQ). Note that the onboard serial header is COM2, known to Linux as /dev/ttyS1. The default parameters for this port on the SP800 are 2F8 and IRQ3.

The configure script expects the kernel source to be installed in /usr/src. I had actually moved it to a separate partition to free up some room, so I just mounted the partition and made a symbolic link to the source. The source should be in a directory like kernel-source-2.6.8.

Save the configuration, run ./configure, and then make && make install. If you encounter the error "LIRC modules currently require module unloading...", go back into the kernel source, run "make menuconfig" and select "Loadable Module Support -> Module Unloading" from the menu options. The run make && make install in the kernel source directory, reboot, and try to build LIRC again.

Once LIRC is built you should follow the instructions at to get the driver up and running. The quickest way to test the input is like this:

  1. Tell the kernel to release the serial port by running setserial /dev/ttyS1 uart none

  2. Insert the LIRC serial module into the kernel: modprobe -v lirc_serial

  3. Run mode2. This program should display no output until you start pressing buttons on your remote control. If it prints values while no buttons are being pressed, you probably have an interference problem.

  4. If you get errors complaining that the device is busy, make sure that you've a) enabled COM2 in the VIA BIOS, b) configured LIRC's setup script with the correct values for COM2, and c) referred to the device /dev/ttyS1. I banged my head against the wall for half a day because I didn't twig to the zero-based port numbering.

Then it's just a matter of using irrecord to generate a .conf file, and starting lircd with that .conf file. Those steps are all very well documented at


Post a Comment

<< Home