Linux Infrared Remote Control - LIRC

The Ubuntu How-to is explained here: https://help.ubuntu.com/community/Install_Lirc_Feisty#head-a36a9de7022109683b574df7d9f16ee9f1f45405

The following link contains a hardware overview of supported devices: http://www.lirc.org/html/table.html. My Media Center PC has 3 different remotes: the Antec VFD / volume knob, the ASUS DH motherboard remote and the DiVCO FusionHDTV remote.

The FusionHDTV card itself is supported in Feisty's kernel 2.6.20, but support for the remote for this chip (cx88) will only be available from kernel 2.6.22 upward. This kernel will be used in Ubuntu Gutsy, but I wanted to avoid installing a new kernel which would not be covered by Feisty's automatic security updates. I therefore decided to get an additional USB remote to handle the media center functionality, and bought an SoundGraph iMON PAD remote. If you want to get the FusionHDTV remote working, here is a link with instructions (as of 22 Aug 2007): http://marc.info/?l=linux-video&m=118728654807985&w=2. Hopefully, the respective code changes will be worked into kernel 2.6.22 eventually.

Install the LIRC package

Below follow all the necessary steps in short, partly taken from the Ubuntu How-to:

apt-get install lirc lirc-modules-source module-assistant
dpkg-reconfigure lirc-modules-source
# 1st screen: select imon  # prepare for the volume knob and the Soundgraph remote
# 2nd screen: automatically build: no
# 3rd screen: choose option "install package maintainer's version"
vim /etc/lirc/hardware.conf
# find and modify: MODULES="lirc_imon"
m-a update,prepare # grab the kernel headers
rm /usr/src/lirc*deb # remove previous version
m-a clean lirc
m-a a-i -f lirc # build the modules
depmod -a # update the module list

Antec VFD and iMON volume knob

Antec's Vacuum Fluorescent Display is the OEM version of the Soundgraph iMON VFD. Select “imon” in the list of drivers to install. When LIRC is installed, download the pre-configured config files for the iMON from: http://www.lirc.org/remotes.tar.bz2

Get the lirc configuration files:

wget http://www.lirc.org/remotes.tar.bz2 # download the premade config files

Copy the for the Soundgraph iMON volume knob as follows:

cp remotes/imon/lircd.conf.imon-knob /etc/lirc/lircd.conf

Now install the VFD driver with

apt-get install lcdproc

You can test both with the following commands. Turn the knob to see the test dump:

echo "Simple if you know how to do it" > /dev/lcd0
irw

SoundGraph iMON PAD remote

The following changes are necessary to get more than one remote recognized at the same time by the system. In our case, we have the iMON volume knob and the iMON remote each plugged into 2 different USB ports. This howto is based on https://help.ubuntu.com/community/Install_Lirc_Feisty#head-a36a9de7022109683b574df7d9f16ee9f1f45405 with some important changes and bug fixes:

Config file /etc/lirc/hardware.conf:

# /etc/lirc/hardware.conf
#
# Arguments which will be used when launching lircd
LIRCD_ARGS="--device=/dev/lirc0 --output=/dev/lircd0 --pidfile=/var/run/lircd0.pid --listen"
LIRCD2_ARGS="--device=/dev/lirc1 --output=/dev/lircd --connect=localhost:8765 --pidfile=/var/run/lircd1.pid"

#Don't start lircmd even if there seems to be a good config file
#START_LIRCMD=false

#Try to load appropriate kernel modules
LOAD_MODULES=true

# Run "lircd --driver=help" for a list of supported drivers.
DRIVER=""
# If DEVICE is set to /dev/lirc and devfs is in use /dev/lirc/0 will be
# automatically used instead
# for more than 1 lirc device set DEVICE="none" to avoid adding the default "--device" option
DEVICE="none"
MODULES="lirc_imon"

# Default configuration files for your hardware if any
LIRCD_CONF=""
LIRCMD_CONF=""

Startup file /etc/init.d/lirc:

# /etc/init.d/lirc
# -- find the following lines and replace with below's code
#
echo -n "Starting lirc daemon:"
if $START_LIRCD; then
  echo -n " lircd"
  LIRCD_ARGS=`build_args $LIRCD_ARGS`
  LIRCD2_ARGS=`build_args $LIRCD2_ARGS`
  start-stop-daemon --start --quiet --exec /usr/sbin/lircd -- $LIRCD_ARGS < /dev/null
                                           /usr/sbin/lircd $LIRCD2_ARGS < /dev/null
fi