Tux
Communication
Mailing lists
Documentation
User Manual
Target board info.
Target chip info.
Support
Linux support
Bugzilla
Downloads
STLinux
Updates
Search
Google


The web
stlinux.com
LIRC (Linux Infra-Red Remote Control)
ST Logo

LIRC is a package that allows you to receive, decode and send the infra-red (IR) signals used by many commonly available remote controls. However the current STM implementation of LIRC device is limited to the receive and decode signals.

Detailed information on LIRC project can be found in the official web site: http://www.lirc.org.


Platforms supported

Currently LIRC has been tested on the following STM platforms:

Platform name Receiver type
ST220 Evaluation (MB392) IRB
STi5528 Evaluation (MB376) IRB/UHF
Espresso UHF

Notes:

  • The IRB and UHF receivers are identical and independent, except that the IRB receiver does not use the noise filter.
  • Only on the STi5528 Eval 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)


Requirements

Make sure that the stlinux20-sh4-lirc-0.7.0-5.sh4.rpm package has been installed; it installs daemons, tools and docs.

Starting from ST Linux Rel. 2.0 the LIRC drivers are included in the Kernel source tree.


Configuring LIRC for STM platforms

LIRC support can be used either built-in or as a loadable module. By default the kernel build configure it as a built-in module.

Configuring LIRC as built-in

When configuring the kernel:

  • enter the submenus "Device Drivers --->", "Character devices --->" and "Linux InfraRed Controller --->"
  • enable "Linux InfraRed Controller (NEW)"
  • select and enable the "STM Lirc support"
  • enable also the "Receiver type" (IRB or UHF, driven by the type of selected platform).

Configuring and using LIRC as dynamic module

  • On the host
    • when configuring the kernel, proceed as above described but set to M both: "Linux InfraRed Controller (NEW)" and "STM Lirc support"
    • build the kernel and the drivers doing:
      make ARCH=sh CROSS_COMPILE=sh4-linux- vmlinux
      make ARCH=sh CROSS_COMPILE=sh4-linux- modules
    • copy the driver objects drivers/char/lirc/lirc_dev.ko and drivers/char/lirc/lirc_stm.ko in the target root File System
    • boot the target

  • On the target
    • Load the generic LIRC driver and the STM plugin:
      target# insmod lirc_dev.o
      target# insmod lirc_stm.o


Starting the InfraRed decoding

The most important part of LIRC is the lircd daemon; it decodes IR signals received by the device drivers and provides the information on a socket, available for user applications.

To start it on the target, type:

target# lircd --device=/dev/lirc/0 /etc/lircd.conf

The /etc/lircd.conf is installed by the LIRC package and represents the configuration file used by the daemon to decode the signals received from driver. Current version of the configuration file supports only the FUTARQUE remote control protocol.

To check if the daemon has been correctly launched, we suggest you to run the irw application (provided with the LIRC package). irw will connect the daemon and will print the received data on the stdout.

Note: installing the ST40 Linux distribution Rel. 2.0 the LIRC device will be created automatically. However you can create it as shown below:

target# mkdir /dev/lirc
target# mknod -m 666 /dev/lirc/0 c 61 0

Known limits

  • the STM LIRC plugin supports only the receive function
  • currently only the FUTARQUE remote control protocol is supported (the FUTARQUE remote control equips the Espresso platform kit).
  • the default configuration of the Rel. 2.0 kernel for STb7100 doesn't include the LIRC driver since not yet supported.

Valid HTML 4.01! Last updated: 2007/08/22 10:30:38
© Copyright STMicroelectronics Limited, 2005
Printer