|
|
 |
Getting Started
LIRC (Linux Infra-Red Remote Control
|
|
LIRC is a package that allows you to receive, decode and send the
infra-red (IR) signals used by many commonly available remote controls.
The most important part of LIRC is the lircd daemon that
will decode IR
signals received by the device drivers and provide the information on a
socket, available for user applications.
Detailed information on LIRC project can be found in the official web site:
http://www.lirc.org.
Driver Model
Platform supported
| Platform |
LIRC plugin name |
Receiver |
| Espresso |
lirc_espresso_UHF.o |
UHF |
| Sti5528 Eval |
lirc_mb376_UHF.o |
UHF |
| Sti5528 Eval |
lirc_mb376_IRB.o |
IRB |
| MB392 |
lirc_mb392_IRB.o |
IRB |
| STm8000 |
lirc_mb379_IRB.o |
IRB |
Using LIRC
Make sure that the LIRC package is installed, for example
stm-sh4-lirc-0.6.6-6.sh4.rpm. Boot the ST40 Linux Kernel on
your target board and perform the following steps:
-
Create the lirc device in your target FS:
target# mkdir /dev/lirc
target# mknod -m 666 /dev/lirc/0 c 61 0
-
Load the generic LIRC device driver into the kernel:
target# insmod -f lirc_dev.o
-
Load the hardware specific device driver using the insmod command.
For example:
-
for the STi5528 Evaluation board (mb376):
- lirc_mb376_UHF.o
- lirc_mb376_IRB.o
The IRB and UHF receivers are identical and independent, except that
the IRB receiver does not use the noise filter.
On this platform the receptors are jumper selectable as following:
- Jumper 81: 1-2: IRDA input; 2-3: UHF input
- Jumper 86 must be set as 1-2 (IRDA input enable)
-
for the Espresso
This platform doesn't require any HW setting; only the UHF receiver
is used.
-
Start the lircd daemon:
target# lircd --device=/dev/lirc/0 /etc/lircd.conf
-
Run now your application or a lirc test (for example irw, it will access the /dev/lircd device
and will print the received data on the stdout).
How-to get the sources
If you like to cosomize the LIRC plugin, download the RPM source
package stm-target-lirc-0.6.6-6.src.rpm.
The plugin sources are in the directory .../lirc-0.6.6/drivers/lirc_stm
(please see the README file for more information).
|