Installation

First install lirc with pacman:

# pacman -S lirc

It's also recommended that you install the utils package:

# pacman -S lirc-utils

Serial receivers

Now there might be a problem: the module lirc_serial is build to use ttyS0 (COM1), if your device isn't connected to ttyS0, you'll have to either change the module-options or rebuild the lirc module. If your device is connected to ttyS0, you can skip this step

To change the options for the lirc_serial module, you edit /etc/modprobe.conf and add this line:

options lirc_serial io=0x2f8 irq=3

You should change the values after io and irq to reflect you serial port settings, the values above may work for you if you are using ttyS1 (COM2) to connect your IR-device. But you will find the correct values by checking dmesg:

Loading

Now try to load the serial module:

# modprobe lirc_serial

If this produces an error which says your serial port is not ready, you have the problem that your serial port support is build into the kernel and not as a module (in the default arch kernel it is build into the kernel)

If it's build into the kernel you'll have to do the following (remember that it is build into the kernel, you will need to make some changes later too)

You'll have to release the serial port:

# setserial /dev/ttySx uart none

(Replace x with your port number)

Load the module again:

# modprobe lirc_serial

Now it shouldn't show any errors, and the modules lirc_serial should be listed in lsmod

USB devices

Newer devices may be using the mceusb2 module you should change mceusb2 to mceusb if you are using the old version of the remote.
To manually load the USB receiver:

# modprobe lirc_mceusb2

then load lirc

$ lirc

Test it with irw. irw will output the commands received by the IR receiver that match your lircd.conf file. So start irw, point your remote and start pressing buttons.

The above procedure however has been simplified and probably won't work that easily. If you get errors in the above try the following:

One of the reasons the lircd daemon may not be working is because it expects to be run at startup and needs root permissions because it will create device nodes in /dev. Try "man lircd" for more information.

To run lircd at startup, add it to the DAEMONS line in /etc/rc.conf. eg:

DAEMONS=(syslog-ng network netfs crond lircd)

Also, if needed add your receivers kernel module to the MODLUES line of /etc/rc.conf eg (for the MCE Remote control):

MODULES=(lirc-mceusb2)

Next, you need to put your remotes .config file into /etc/lirc.config. These files can be found either in your directory /usr/share/lirc/remotes/ or you may be able to find them here http://lirc.sourceforge.net/remotes/

If you're copying it locally here's an example of what you would do for the mceusb remote

# cp /usr/share/lirc/remotes/mceusb/lircd.conf.mceusb /etc/lircd.conf

upon rebooting the remote should work. Test it with irw. irw will output the commands received by the IR receiver that match your lircd.conf file. So start irw, point your remote and start pressing buttons

Setup a HID device with lirc

For lirc version 0.8.5 and previous

Warning: Engrish ahead.

Nowadays there are some cheap HID devices on the market. They are looks like a MCE USB remote, but they aren't.If you plug those devices into you computer, system will automatically recognize them as USB keyboard, it can be used even without lirc. Every button on the device is recognize as a key or a combination of some keys. If you want to get a more customized setting, here is the solution:

Because the HID remote actually simulates a USB infrared Keyboard and an mouse, there are two devices, so you need to create two lirc daemon instead just one in default setting.

Fisrt we need the find out our HID device in /proc/bus/input/device:

$ cat /proc/bus/input/device

You should find some info like this "Name="HID xxxx:xxxx", here first "xxxx" is the id of the vendor, second one is product id.For example, in my case it's

Name="HID 3353:3713"

Remember it,those info is import, we will use them late.

then go to /dev/input/by-id

$ ls -l /dev/input/by-id

You shold find two files named with vendor id and product id, in my case

If you like start lirc daemon at the boot ,simply put evden and lircd to your /etc/rc.conf

MODULES=(... evdev ...)
DAEMONS=(... lircd ...)

For Lirc version 0.8.6 and above

According the changes in Lirc version 0.8.6, we need do some tiny change in order to make HID works with latest verson of lirc.

1. Changes in config files

The content of these config file do not need to do any change, so you can still use the example in lirc 0.8.5. The only thing you need to do is change where the file shoud to be put at. The config file that contains the parameters for /etc/rc.d/lircd has been move from /etc/conf.d/(in lirc 0.8.5) to /etc/lirc/lircd.conf. The config file of HID device itself remains the same postion with old version, ie, /etc/licd.conf

2. Changes in /etc/rc.d/lircd
Though of lirc 0.8.6 had changed the default socket from /dev/lircd to /var/run/lirc/lircd, but most applications still recognize the old socket. So I strongly recommend that you should make a soft link with the name '/etc/rc.d/lircd', like this:

Using a X10

Making a configuration file

You'll need a configuration file for your remote control. The easiest way is to look on the lirc site and hope your device has already a config file: list of remotes on the lirc site

If so, download your file and save it as /etc/lircd.conf

If your device doesn't have already a config file, you'll have to create the file yourself with the command:

# irrecord -d /dev/lirc0 /tmp/my_remote

Just follow the instructions. The resulting file, /tmp/my_remote, should then be copied to /etc/lircd.conf. If you want to use several remotes, you repeat the irrecord step with each remote and different filenames, and then concatenate all the resulting files into /etc/lircd.conf:

Now load the daemons: add "start_lirc" and "lircd" to the daemons list in /etc/rc.conf

Program specific

Enable lirc support in xine

Now lirc works, but you have no program that can communicate with lirc. This section will explain how to make xine work, but you can use xmms and mplayer (and probably a lot of other programs too) to work with lirc.

Configure xine to use lirc

Now, in order to have a functioning xine+lirc, edit the .lircrc file to your preferences.

However, you may choose to configure lirc to control more than just xine. If this is the case, you will need to manually edit the .lircrc file, and add elements.

Xine-ui
Mplayer
Totem
Vlc
Rhythmbox

All work with lirc, but you must enable lirc support in the program in some cases, such as VLC. Simply copy the vlc packagebuild and edit it so that "--enable-lirc" is one of the compile options for VLC not FFMPEG!

Configure Amarok2 to use Lirc

Depending on your controller model, the following configuration works with Amarok2-svn. This configuration file will work with the MCEUSB controller.