Hey,
I have set up lirc in my box. heres a little touch what i have done.
1. download lirc from www.lirc.org
2. run setup.sh
choose your driver ( i built my own ir reciever and attached that to com port 1, it is the default in the configuration script, some thing like driver:serial irq:4 io:0×3f8)
3. choose save and run configure
remember:
u must have kernel code installed in /usr/src and before compiling lirc, do as root: make oldconfig && make dep
4. make
5. make install
now your lirc is installed.
6. check $ls -l /dev/li*
it will look like:
lr-xr-xr-x 1 root root 5 Jan 27 09:00 /dev/lirc -> ttyS0
srw-rw-rw- 1 root root 0 Jan 27 15:01 /dev/lircd=
prw-r–r– 1 root root 0 Jan 27 09:00 /dev/lircm|
As you can see, there’s a link from /dev/lirc to ttyS0, a.k.a. “COM1″
Some IR receivers (including some homebrew units) use a character device as their data interface as opposed to a link to a serial port. If the make install step has created a character device for you, don’t replace it with a link to a COM port.
So, if the link or character device was not created (but should have been), ensure that you ran the make install step as root. If it still doesn’t work, re-read the lirc documentation to determine whether your IR receiver is a character device or should be a link to a serial port and to create the link/character device manually. My IR device is connected to ttyS0. If it were connected to “COM2″, then use ttyS1, etc.
$ su
# cd /dev
# ln -sf ttyS0 lirc
# exit
$
note: The above example assumes that your receiver uses the standard serial driver. Some receivers do not. Check the lirc documentation, but it may be necessary to replace the link created above with a character pipe:
# mknod /dev/lirc c 61 0
See the lirc documentation for additional information. The lirc installation should create this for you, so manually creating it indicates that your lirc installation may have other issues.
7. Now you should adjust the file permissions of /dev/lircd (this is the Unix domain socket that clients use to connect to lircd) so others than root can connect to lircd.
chmod 666 /dev/lircd
8. If your hardware requires a kernel module you should make sure that the kernel will find the correct module if a program tries to access /dev/lirc. This can be done by inserting the following line to your /etc/modprobe.conf):
alias char-major-61 lirc_serial
9. you can set the IRQ and I/O base the serial port drivers shall use by adding the following line to /etc/modprobe.conf:
options lirc_serial irq=4 io=0×3e8
This will override the default values you have selected during setup. The configure script will tell you which kernel module you need. (if u select com1 during setup, but wants to change it later)
10. now run $mode2, and press any button of your remote, u will see some raw codes, space pulse
, its done.
Note: if that doesnt work, run $modprobe lirc_serial, if it says that device busy then do the following
#setserial /dev/ttyS0 uart none
Then you have to load the kernel module:
#modprobe lirc_serial
After that, load the deamon:
#lircd
And test the reception of commands:
#irw
Press some buttons on your remote, it must appear on the screen.
i assume u have the correct remote configuration in /etc/lircd.conf. if u dont, use irrecord to have one.
now everything will be fine.
enjoy.
shahrear