Recent from talks
All channels
Be the first to start a discussion here.
Be the first to start a discussion here.
Be the first to start a discussion here.
Be the first to start a discussion here.
Welcome to the community hub built to collect knowledge and have discussions related to LIRC.
Nothing was collected or created yet.
from Wikipedia
This article needs additional citations for verification. (November 2017) |
| LIRC | |
|---|---|
| Stable release | 0.10.2[1]
/ 4 October 2022 |
| Written in | C |
| Operating system | Linux |
| Size | 653 kB (archived) |
| Type | Infrared remote control |
| License | GNU General Public License |
| Website | https://lirc.org/ |
| Repository | |
LIRC (Linux Infrared remote control) is an open source package that allows users to receive and send infrared signals with a Linux-based computer system.
There is a Microsoft Windows equivalent of LIRC called WinLIRC.
With LIRC and an IR receiver the user can control their computer with almost any infrared remote control (e.g. a TV remote control). The user may for instance control DVD or music playback with their remote control.
One GUI frontend is KDELirc, built on the KDE libraries.
See also
[edit]References
[edit]- ^ "Download Latest Version lirc-0.10.2.tar.bz2 (2.4 MB)". 4 October 2022. Retrieved 26 February 2023.
External links
[edit]from Grokipedia
Overview
Introduction
LIRC, or Linux Infrared Remote Control, is an open-source software package designed for the Linux operating system to facilitate the reception and transmission of infrared signals using compatible hardware.[1][4] It primarily enables users to control Linux-based computers with standard infrared remote controls, such as those typically used for televisions, allowing for applications like multimedia playback including DVD viewing and music control.[5] As an integral part of the Linux ecosystem, LIRC collaborates with infrared receivers to decode and send signals from a wide range of remote devices.[2] LIRC is a userspace package consisting of a daemon (lircd) that interfaces with kernel drivers to handle raw infrared data bi-directionally between user space and kernel space, supporting the emulation of remote control behaviors on computing devices.[2] By focusing on infrared signal processing, LIRC extends the utility of everyday remotes to Linux environments, promoting flexible home automation and media management.[4]History
LIRC, or Linux Infrared Remote Control, originated in the late 1990s as an open-source project aimed at enabling Linux users to receive and transmit infrared signals using compatible hardware. It was initially developed by Karsten Scheibler and Christoph Bartelmus, with the project's copyright dated to 1999. The first notable release, version 0.5.4, was made available on March 3, 1999, marking the beginning of its public development.[1] As an open-source initiative under the GPL license, LIRC quickly embraced collaborative tools, establishing a CVS tree on April 30, 1999, hosted at http://gdev.net, which facilitated community contributions from the outset. The project's official website launched on November 11, 2000, at http://www.lirc.org, further solidifying its presence in the Linux ecosystem. Early development focused on home-brew capture hardware connected via serial or parallel ports, reflecting the DIY ethos of the era's open-source community.[1] Key milestones in LIRC's timeline include a series of releases that expanded its scope: version 0.6.0 on April 2, 2000, followed by 0.6.1 on July 21, 2000, and subsequent updates like 0.6.5 in 2002 and 0.8.0 in 2006. Leadership transitioned in 2010 when Jarod Wilson became the new maintainer after over a decade of prior stewardship, and another change occurred in 2014 with a new maintainer appointed. The project continued evolving with releases such as 0.9.0 in 2011, 0.9.1 in 2014, 0.9.3 in 2015, and the latest version, 0.10.2, on October 4, 2022. These updates have broadened support for infrared remote compatibility, including over 2500 remote controls documented in a community-maintained database.[1] LIRC's evolution has been driven by community enhancements, addressing post-2000s challenges like compatibility with modern Linux kernels, where built-in input device support for some IR remotes has occasionally reduced reliance on LIRC. Despite this, ongoing community-driven improvements, such as hardware driver patches and configuration expansions, have sustained its relevance for multimedia control and beyond. The project is hosted on SourceForge and integrated into major distributions like Debian, Fedora, and Ubuntu, underscoring its enduring open-source impact.[1]Functionality
Core Purpose
LIRC's core purpose is to enable Linux users to control their computers via standard infrared remote controls, allowing the repurposing of consumer-grade remotes originally designed for devices like televisions and DVD players to perform computing tasks such as multimedia playback. This open-source package facilitates the reception and transmission of infrared signals, thereby bridging the gap between everyday remote controls and Linux-based systems for seamless user interaction.[1] In practical applications, LIRC integrates with multimedia software to support functions like starting, pausing, and stopping DVD playback or music control, making it particularly valuable for home theater PC (HTPC) setups where users prefer remote operation over keyboard or mouse input. Through its kernel drivers and user-space daemon, it allows these remotes to send commands to applications via decoded IR signals, enhancing accessibility for tasks ranging from volume adjustment to navigation in media centers.[1] The emphasis on repurposing affordable, widely available consumer IR remotes underscores LIRC's role in democratizing remote control for Linux environments, enabling general computer operation without the need for specialized hardware or proprietary solutions.[1]Key Features
LIRC offers broad compatibility with infrared remote controls, supporting the decoding and transmission of signals from approximately 2500 devices listed in its remote database, and can accommodate nearly any infrared remote when paired with an appropriate receiver and a custom configuration file.[1] This extensibility ensures that users can integrate standard consumer remotes, such as those for televisions or media players, into Linux systems without requiring specialized hardware for each device.[1] The package enables control of various computer functions through user-space applications that interpret infrared signals, including multimedia playback, volume adjustment, application launching, and even system shutdowns.[1] For instance, it facilitates sending X11 events to desktop applications, allowing remote-based navigation and control of software like media centers.[1] Additionally, LIRC supports advanced uses such as emulating an infrared mouse or managing TV tuner cards and CD-ROM drives via simple button presses.[1] As an open-source project under the GPL license, LIRC encourages customization and community contributions, with users able to create and share configuration files, drivers, and extensions through its repositories and forums.[1] This collaborative model has sustained its development, including adaptations for modern hardware like USB infrared dongles and integration with contemporary desktop environments through X11 event handling.[1] It also extends to support for protocols like IrDA, providing flexibility for current infrared applications despite some built-in kernel alternatives.[1]Technical Implementation
Kernel Module Integration
LIRC integrates with the Linux kernel through loadable kernel modules (LKMs) such as lirc_dev, which provide a character device interface (e.g., /dev/lirc0) for infrared signal reception. These modules are typically included in modern Linux kernels and must be loaded to enable LIRC functionality, ensuring compatibility with the specific kernel version installed on the system. This modular approach extends the kernel's capabilities for IR handling without modifying core kernel code, but users may need to verify that the modules match their kernel's configuration and version to avoid loading failures. The lirc_dev module relies on Linux kernel features such as the input subsystem and GPIO (General Purpose Input/Output) interfaces for handling infrared data streams, while hardware-specific modules like lirc_saa713x handle particular devices.[6][7] The setup process for LIRC userspace components begins with downloading the LIRC source code from its official repository, followed by configuring the build environment using tools like ./configure, and compiling with make commands. Kernel headers and development tools like gcc are prerequisites for building LIRC, but kernel modules themselves are not compiled as part of this process; instead, they are loaded from the kernel using modprobe or insmod. For distribution-specific kernels, users may need to enable module signing or use DKMS (Dynamic Kernel Module Support) to manage kernel updates, particularly if custom hardware drivers are required. If a specific kernel module is not available in the distribution's kernel, it may need to be compiled separately using the kernel's build system.[7] Dependencies on kernel features include access to /dev/lirc0 for user-space communication and support for parallel port or USB drivers, which can vary by kernel version and may necessitate enabling options in the kernel config file (e.g., CONFIG_INPUT_EVDEV). Potential challenges arise from kernel version mismatches, where an unavailable or incompatible module fails to load, leading to errors like "invalid module format"; solutions include loading the appropriate module from the kernel, building a custom kernel with the required modules, or using pre-built packages from repositories like those in Ubuntu or Fedora, provided they match the kernel. In cases of persistent issues, verifying kernel symbols with tools like modinfo and ensuring no conflicting modules are loaded can resolve integration problems.[6]Signal Processing
LIRC handles infrared signals through a structured process of reception, decoding, and transmission, primarily managed by its daemon lircd, which interacts with hardware via kernel modules. Upon reception, the hardware captures modulated infrared pulses, typically at carrier frequencies around 38 kHz, and passes raw timing data to LIRC for processing. Decoding occurs by analyzing these pulse durations to identify the underlying protocol, such as RC-5 or NEC, where RC-5 uses a biphase mark coding scheme with fixed 1.778 ms bit lengths, and NEC employs an 8-bit address and command structure preceded by a 9 ms header pulse followed by specific space and pulse timings. This decoding translates the signal into scancodes or key symbols, enabling interpretation as user inputs.[8][9][10] For sending signals, LIRC reverses this process by modulating the decoded or user-specified data into pulse trains according to the target protocol, driving compatible transmitters to emit the infrared output. Protocols like RC-5 and NEC are emulated with precise timing to ensure compatibility with consumer devices, where the daemon lircd constructs the signal waveform based on configuration parameters. This bidirectional capability allows LIRC to both receive commands from remotes and transmit control signals to external IR-controlled devices.[8][9][11] Central to signal interpretation are configuration files, such as .lircd.conf, which define remote-specific mappings by specifying protocol details, pulse timings, and button-to-symbol associations. These files provide timing information in microseconds for decoding raw pulse data into button presses—for instance, detailing the exact durations for pulses and spaces in an NEC protocol sequence—and map those presses to application-usable symbols like "KEY_PLAY". System-wide configurations reside in directories like /etc/lirc/lircd.conf.d/, with each .conf file tailored to a particular remote device for accurate signal mapping.[12][8][13] LIRC supports recording and emulating infrared signals for custom remotes through tools like irrecord, which captures raw pulse timings from an unknown remote and generates a corresponding .lircd.conf file for future use. During recording, the tool measures and logs pulse and space durations in microseconds, allowing users to create configurations for non-standard or proprietary remotes without predefined support. Emulation then leverages these recorded timings to replay signals via transmission, enabling LIRC to mimic custom remotes for controlling devices lacking built-in compatibility.[14][15][14] The core of LIRC's decoding relies on algorithms for pulse-length modulation (PLM), where infrared signals are represented as sequences of on (pulse) and off (space) durations to encode data bits. Decoding algorithms measure these timings with high precision—typically sampling at rates up to 13 microseconds—to distinguish between short and long pulses, as in RC-5's toggle bit or NEC's 562.5 μs bit slots, ensuring accuracy despite noise or variations in transmission. Timing measurements are encoded in the lower 24 bits of LIRC's data format, with pulses indicating active infrared emission and spaces denoting absence, allowing robust reconstruction of the original signal for protocol identification and key extraction.[10][16][17]Hardware Requirements
Compatible Receivers
LIRC supports a variety of hardware receivers, categorized primarily by their interface types, including USB-based devices, serial port (RS-232) receivers, and parallel port devices. These receivers enable the capture of infrared signals for processing by the LIRC software on Linux systems. USB receivers are among the most convenient for modern setups, as they connect directly without requiring additional port configurations, while serial and parallel options are often used in home-brew or legacy hardware builds.[18] Common models of compatible receivers include USB devices such as the ADSTech USBX-707, ATI Remote Wonder II, Microsoft MCE remotes, and USB-UIRT, which adhere to standard USB protocols for infrared signal reception. For serial port receivers, models like the Anir Multimedia Magic, Creative Infra Receiver/CIMR100, and UIRT2 are supported, typically interfacing via 8250-compatible UARTs. Parallel port devices are generally home-brew implementations that connect to standard parallel interfaces for signal input. Standards often involve IR sensors from the TSOP series, such as the Vishay TSOP 1738 and TSOP 1838, which are widely used in these receivers for their reliability in detecting modulated infrared signals at common carrier frequencies like 38 kHz.[18][19] Requirements for receivers to support LIRC's signal capture include compatibility with raw timing modes (e.g., mode2 for pulse detection) and appropriate voltage levels, typically 5V supplied via regulators like the 78L05 for serial setups, derived from the host port's power lines such as the RTS pin on serial ports. Interface compatibility is crucial: serial receivers must align with RS-232 standards and 16x50 UART ports, USB devices follow USB 1.1 or higher specifications, and parallel receivers require standard printer port pinouts. Vishay TSOP sensors, for instance, operate at 5V with varying carrier frequencies (e.g., 36 kHz or 38 kHz), ensuring they can handle most consumer remote control signals without significant range loss.[18][19] When selecting receivers, prioritize those with established Linux kernel module support to ensure seamless integration, such as lirc_serial for serial port devices or lirc_parallel for parallel port setups, which handle signal decoding directly in the kernel. USB receivers often benefit from userspace drivers or modules like lirc_sasem, making them preferable for newer kernels where serial ports may be scarce. Recommendations include opting for 38 kHz TSOP-based sensors for broad compatibility with standard remotes, while verifying kernel version support to avoid compatibility issues with exotic hardware.[18][19]Example Circuit Design
One example of a custom infrared receiver circuit for LIRC involves building a simple serial port-based receiver using readily available components, designed to detect and demodulate infrared signals from standard remote controls. This circuit draws power from the computer's serial port and connects via a DE-9 (9-pin SUB-D) plug, making it suitable for integration with LIRC's serial port driver on Linux systems.[19] The key components include a 5V voltage regulator such as the 78L05 (IC2), which converts the approximately 10V from the serial port's RTS line to a stable 5V supply required by the infrared receiver, ensuring reliable operation even with voltage fluctuations; a diode like the 1N4148 (D1), which protects the circuit from potential negative voltages on the RTS pin by allowing current to flow in only one direction; an electrolytic capacitor of 4.7µF (C1), which stabilizes the power supply to the receiver by filtering out noise and ripples; a resistor of 4.7kΩ (R1), serving as a pull-up resistor to maintain a valid high voltage level on the DCD line when no infrared signal is present, thus preventing false detections; and an infrared receiver module such as the TSOP1738 (IC1), which detects 38kHz modulated infrared signals, demodulates them, and outputs a digital signal while rejecting ambient light interference through its built-in AGC (automatic gain control) and bandpass filtering. These components collectively enable clean signal reception and noise filtering, with the TSOP1738 specifically tuned for common remote control frequencies to minimize errors in LIRC applications.[19][20] Assembly begins by verifying the pinouts of all components, particularly the 78L05 (Pin 1: input, Pin 2: ground, Pin 3: output) and TSOP1738 (Pin 1: ground, Pin 2: supply, Pin 3: output). Connect the output pin (Pin 3) of the TSOP1738 directly to the DCD pin (Pin 1 on DE-9), and connect one end of the 4.7kΩ resistor (R1) to the output (Pin 3) of the 78L05 and the other end to the DCD pin. Ground the ground pin (Pin 1) of the TSOP1738 to the GND pin (Pin 5 on DE-9), and connect its supply pin (Pin 2) to the output (Pin 3) of the 78L05. For power integration, wire the anode of the 1N4148 diode (D1) to the RTS pin (Pin 7 on DE-9) and the cathode to the input (Pin 1) of the 78L05, with the 78L05's ground (Pin 2) also tied to GND; this setup draws and regulates power directly from the serial port. Place the 4.7µF capacitor (C1) across the supply and ground pins of the TSOP1738 for additional noise filtering. The entire circuit can be prototyped on a small perfboard or 5x5 hole-matrix board, with the DE-9 plug soldered for connection to the computer's RS-232 serial port; a basic wiring diagram would show the TSOP1738 facing outward to receive IR signals, with all other elements forming a compact inline module.[19][21] To test the assembled circuit in a Linux environment, first ensure the LIRC kernel module is loaded and configured for the serial port (e.g., vialirc_serial driver), then use tools like mode2 to monitor raw IR signals by pointing a remote at the receiver and verifying output pulses. Troubleshooting may involve checking the RTS line voltage with a multimeter (should be at least 8V for the 78L05 to function properly; if lower, as in some notebooks, substitute a low-dropout regulator like LP2950 or use an external 5V source); confirming the TSOP1738's carrier frequency matches the remote (38kHz standard); inspecting for loose connections or incorrect pinouts that could cause no detection; or adding shielding if ambient light interferes, though the module's design typically mitigates this. If signals are unstable, test with alternative receivers like TSOP1838, and consult LIRC logs for DCD line activity to isolate hardware versus driver issues.[19]
