From LedHed's Wiki
Revision as of 01:16, 26 February 2007 by Ledhed (Talk | contribs)

Jump to: navigation, search

Lirc_Serial

Many times when using the lirc_serial module, you have to use setserial to change the com port settings. Most kernels are compiled with serial support, which causes the lirc_serial module to fail when loading. This is because the kernel is using the Com ports IRQ and I/O.

To fix this run this command.

setserial /dev/ttyS0 uart none;

Note: on Ubuntu (and possibly other distros) you have to install the "setserial" package before running the above command.


You can add this line to your modprobe.conf or modprobe.d to prep the serial ports before the lirc_serial module loads.

# Lirc
options lirc_serial irq=4 io=0x3f8
install lirc_serial /bin/setserial /dev/ttyS0 uart none ; /sbin/modprobe --ignore-install lirc_serial


Ubuntu & LIRC

Reference: https://help.ubuntu.com/community/Install_Lirc_Edgy

sudo apt-get install lirc lirc-modules-source module-assistant

Durring the installation of the Lirc package you will be prompted for they type of receiver you are using. At the end of this you will be asked What would you like to do about lirc-modules-source.conf.
Choose: "Install Package Maintainer's version"

Now edit hardware.conf

sudo vi /etc/lirc/hardware.conf

In hardware.conf shange this line:

LOAD_MODULES=false

to

LOAD_MODULES=true

also change this line:

MODULES=""

to

MODULES="lirc_serial"

The above line assumes you are using the lirc_serial module (Homebrew IR Receiver) change to suit your needs


The lirc modules will need to be rebuilt every time that you update your kernel.
Grab the necessary headers to build the kernel modules:

sudo m-a update,prepare

This will clean out any old lirc module builds:

sudo rm /usr/src/lirc*deb
sudo m-a clean lirc

Build the kernel/install modules:

sudo m-a a-i lirc

Update the modules list:

sudo depmod -a

If using the lirc_serial module and you are using a stock kernel then you will need to use the setserial utility to free the port for lirc to use. Add this to your /etc/modprobe.conf (this file may not exist, if not then just create one).

alias char-major-61 lirc_serial 
options lirc_serial irq=4 io=0x3f8
install lirc_serial /bin/setserial /dev/ttyS0 uart none ;\
   /sbin/modprobe --ignore-install lirc_serial

That should be it. Reboot or start the lirc daemon and you're good to go. In Ubuntu you can use update-rc.d to add the lirc daemon to the list of services and invoke-rc.d to start|stop|restart the service. See Ubuntu General for more info.