Hubbry Logo
LIRCLIRCMain
Open search
LIRC
Community hub
LIRC
logo
7 pages, 0 posts
0 subscribers
Be the first to start a discussion here.
Be the first to start a discussion here.
LIRC
LIRC
from Wikipedia
LIRC
Stable release
0.10.2[1] / 4 October 2022; 3 years ago (4 October 2022)
Written inC
Operating systemLinux
Size653 kB (archived)
TypeInfrared remote control
LicenseGNU General Public License
Websitehttps://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]
[edit]
Revisions and contributorsEdit on WikipediaRead on Wikipedia
from Grokipedia
LIRC, or Linux Infrared Remote Control, is an for the Linux operating system that enables the decoding and transmission of signals from compatible using supported hardware. Developed in the by co-creators Karsten Scheibler and Christoph Bartelmus, it primarily allows users to control Linux-based computers with standard , such as those for or , facilitating tasks like playback control, system shutdown, or interfacing with hardware like and . At its core, LIRC operates through the lircd daemon, which receives raw from , decodes them, and exposes the data via a for to act upon, such as sending or launching programs. It supports a bi-directional interface for both receiving and transmitting IR signals, making it suitable for scenarios beyond simple input, like programming external devices such as or satellite tuners. The package includes a comprehensive database of over 2,500 preconfigured , along with tools for learning new ones, and has evolved to accommodate a wide range of hardware, from early home-brew serial/parallel port setups to modern and . Historically, LIRC's first versions appeared in 1999, with version 0.5.4 released on March 3 of that year, and its online presence established by November 2000; the project has seen ongoing maintenance, including a major handover to Jarod Wilson in 2014, and the latest stable release, version 0.10.2, on October 4, 2022. Licensed under the , LIRC is distributed in major Linux package repositories like those for , , and , and even features ports such as WinLIRC for and specialized drivers for platforms like . While modern Linux kernels provide built-in support for some as standard input devices, LIRC remains valuable for its flexibility in handling complex decoding, custom configurations, and legacy or specialized hardware.

Overview

Introduction

LIRC, or Linux Infrared Remote Control, is an designed for the Linux operating system to facilitate the reception and transmission of using compatible hardware. It primarily enables users to control Linux-based computers with standard , such as those typically used for , allowing for applications like including and music control. As an integral part of the Linux ecosystem, LIRC collaborates with to decode and send signals from a wide range of . LIRC is a consisting of a daemon (lircd) that interfaces with to handle raw infrared data bi-directionally between and , supporting the emulation of on computing devices. By focusing on infrared signal processing, LIRC extends the utility of to Linux environments, promoting flexible and .

History

LIRC, or Linux Infrared Remote Control, originated in the as an aimed at enabling Linux users to receive and transmit using compatible hardware. It was initially developed by Karsten Scheibler and Christoph Bartelmus, with the project's copyright dated to . The first notable release, version 0.5.4, was made available on March 3, 1999, marking the beginning of its public development. As an under the , LIRC quickly embraced , establishing a 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 connected via serial or parallel ports, reflecting the of the era's open-source community. 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 , including over 2500 documented in a community-maintained database. LIRC's evolution has been driven by community enhancements, addressing post-2000s challenges like compatibility with modern , where built-in input device support for some 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 and integrated into major distributions like , , and , underscoring its enduring impact.

Functionality

Core Purpose

LIRC's core purpose is to enable users to control their computers via standard , allowing the repurposing of consumer-grade remotes originally designed for devices like and to perform computing tasks such as . This package facilitates the reception and transmission of , thereby bridging the gap between everyday remote controls and Linux-based systems for seamless user interaction. In practical applications, LIRC integrates with to support functions like starting, pausing, and stopping or music control, making it particularly valuable for setups where users prefer over . Through its and user-space daemon, it allows these remotes to send commands to applications via decoded , enhancing accessibility for tasks ranging from volume adjustment to navigation in . The emphasis on repurposing affordable, widely available underscores LIRC's role in democratizing for Linux environments, enabling general computer operation without the need for specialized hardware or .

Key Features

LIRC offers broad compatibility with , 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. This extensibility ensures that users can integrate standard consumer remotes, such as those for or , into Linux systems without requiring specialized hardware for each device. The package enables control of various computer functions through that interpret , including , volume adjustment, , and even system shutdowns. For instance, it facilitates sending to desktop applications, allowing remote-based navigation and control of software like . Additionally, LIRC supports advanced uses such as emulating an or managing and via simple button presses. As an under the , LIRC encourages customization and community contributions, with users able to create and share configuration files, drivers, and extensions through its and . This collaborative model has sustained its development, including adaptations for modern hardware like and integration with contemporary through event handling. It also extends to support for protocols like IrDA, providing flexibility for current infrared applications despite some built-in kernel alternatives.

Technical Implementation

Kernel Module Integration

LIRC integrates with the through such as lirc_dev, which provide a (e.g., ) for . These modules are typically included in and must be loaded to enable LIRC functionality, ensuring compatibility with the specific installed on the system. This extends the kernel's capabilities for IR handling without modifying , but users may need to verify that the modules match their kernel's configuration and version to avoid . The lirc_dev module relies on Linux kernel features such as the and interfaces for handling infrared data streams, while like handle particular devices. The setup process for LIRC begins with downloading the LIRC source code from its official repository, followed by configuring the build environment using tools like , and compiling with make commands. Kernel headers and development tools like are prerequisites for building LIRC, but themselves are not compiled as part of this process; instead, they are loaded from the kernel using or insmod. For , users may need to enable module signing or use to manage , particularly if are required. If a specific is not available in the , it may need to be compiled separately using the . Dependencies on kernel features include access to /dev/lirc0 for communication and support for or drivers, which can vary by and may necessitate enabling options in the (e.g., ). Potential challenges arise from kernel version mismatches, where an unavailable or incompatible fails to load, leading to errors like "invalid module format"; solutions include loading the appropriate module from the kernel, building a with the required modules, or using from like those in or , provided they match the kernel. In cases of persistent issues, verifying with tools like modinfo and ensuring no conflicting modules are loaded can resolve integration problems.

Signal Processing

LIRC handles through a structured process of reception, decoding, and transmission, primarily managed by its daemon lircd, which interacts with hardware via . Upon reception, the hardware captures modulated infrared pulses, typically at around , and passes raw timing data to LIRC for processing. Decoding occurs by analyzing these to identify the underlying protocol, such as or NEC, where RC-5 uses a biphase mark coding scheme with fixed , 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 or key symbols, enabling interpretation as user inputs. For sending signals, LIRC reverses this process by modulating the decoded or user-specified data into according to the target protocol, driving compatible transmitters to emit the . Protocols like and NEC are emulated with precise timing to ensure compatibility with , where the daemon lircd constructs the based on configuration parameters. This bidirectional capability allows LIRC to both receive commands from and transmit control signals to external . Central to signal interpretation are , such as .lircd.conf, which define remote-specific mappings by specifying , , and . These files provide timing information in for decoding into —for instance, detailing the exact durations for in an NEC protocol sequence—and map those presses to application-usable symbols like "KEY_PLAY". reside in directories like /etc/lirc/lircd.conf.d/, with each tailored to a particular for accurate signal mapping. LIRC supports recording and emulating for through tools like irrecord, which captures from an unknown remote and generates a corresponding .lircd.conf file for future use. During recording, the tool measures and logs in , allowing users to create configurations for non-standard or without predefined support. then leverages these recorded timings to replay signals via transmission, enabling LIRC to mimic custom remotes for controlling devices lacking built-in compatibility. The core of LIRC's decoding relies on algorithms for pulse-length modulation (PLM), where 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 's 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.

Hardware Requirements

Compatible Receivers

LIRC supports a variety of hardware receivers, categorized primarily by their interface types, including , receivers, and devices. These receivers enable the capture of 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 builds. Common models of compatible receivers include such as the ADSTech USBX-707, ATI Remote Wonder II, , and USB-UIRT, which adhere to standard for . For serial port receivers, models like the Anir Multimedia Magic, Creative Infra Receiver/CIMR100, and UIRT2 are supported, typically interfacing via . are generally home-brew implementations that connect to standard for signal input. Standards often involve 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 at common like 38 kHz. 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 for , derived from the host port's power lines such as the on . Interface compatibility is crucial: serial receivers must align with standards and ports, USB devices follow or higher specifications, and parallel receivers require standard . Vishay TSOP sensors, for instance, operate at 5V with varying (e.g., or ), ensuring they can handle most without significant range loss. When selecting receivers, prioritize those with established module support to ensure seamless integration, such as lirc_serial for or lirc_parallel for , which handle directly in the . USB receivers often benefit from userspace drivers or modules like lirc_sasem, making them preferable for where may be scarce. Recommendations include opting for TSOP-based sensors for broad compatibility with , while verifying to avoid compatibility issues with exotic hardware.

Example Circuit Design

One example of a custom for LIRC involves building a simple -based receiver using readily available components, designed to detect and demodulate from standard . This circuit draws power from the computer's serial port and connects via a () plug, making it suitable for integration with LIRC's serial port driver on Linux systems. The key components include a 5V voltage regulator such as the (IC2), which converts the approximately 10V from the 's to a stable 5V supply required by the , ensuring reliable operation even with voltage fluctuations; a diode like the (D1), which protects the circuit from potential negative voltages on the by allowing current to flow in only one direction; an 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 to maintain a valid high voltage level on the when no is present, thus preventing false detections; and an such as the TSOP1738 (IC1), which detects , demodulates them, and outputs a digital signal while rejecting ambient light interference through its built-in () and . These components collectively enable clean signal reception and noise filtering, with the TSOP1738 specifically tuned for common to minimize errors in LIRC applications. Assembly begins by verifying the of all components, particularly the (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 (Pin 1 on ), and connect one end of the (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 ), and connect its supply pin (Pin 2) to the output (Pin 3) of the 78L05. For power integration, wire the of the (D1) to the (Pin 7 on ) and the 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 . Place the (C1) across the supply and ground pins of the TSOP1738 for additional noise filtering. The entire circuit can be prototyped on a small or 5x5 hole-matrix board, with the plug soldered for connection to the computer's ; a basic wiring diagram would show the TSOP1738 facing outward to receive , with all other elements forming a compact inline module. To test the assembled circuit in a environment, first ensure the LIRC is loaded and configured for the (e.g., via lirc_serial driver), then use tools like mode2 to monitor raw by pointing a at the and verifying output pulses. Troubleshooting may involve checking the RTS line voltage with a (should be at least 8V for the to function properly; if lower, as in some , substitute a like LP2950 or use an external 5V source); confirming the TSOP1738's matches the remote ( standard); inspecting for loose connections or incorrect 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 activity to isolate hardware versus driver issues.

WinLIRC

WinLIRC is an software package that serves as the Windows port of LIRC, enabling the reception and transmission of on to allow users to control their computers with . Developed as a direct equivalent to LIRC for non-Linux environments, it supports similar core functionalities such as decoding from various and mapping them to system commands, making it suitable for applications like on . Key similarities between WinLIRC and LIRC include support for compatible , such as those using or , and the ability to process and decode using comparable protocols and for . Both packages feature remote configuration files that define for specific devices, allowing users to map button presses to or , thereby facilitating seamless infrared-based computer control. This shared approach ensures that many LIRC-compatible remotes and receivers can be adapted to WinLIRC with minimal modifications, promoting across . Differences arise primarily from WinLIRC's adaptation to the , where it relies on and rather than , eliminating the need for kernel compilation or integration steps required in LIRC. Unlike LIRC, which is tightly coupled with the for , WinLIRC operates through and may require additional helper applications for certain , such as those connected via , to handle signal input effectively. This design choice makes WinLIRC more accessible for Windows users without advanced system modification skills, though it may introduce dependencies on and . The development history of WinLIRC is closely tied to LIRC, originating as a port initiated in the to extend LIRC's infrared capabilities to and later versions, with maintenance by developers including Jim Paris (original developer through version 0.6) and later Ian Curtis, incorporating elements from LIRC's , such as and , up to version 0.9.0i released on May 12, 2014. Shared codebase elements include foundational infrared protocol support and , which evolved in parallel to ensure mutual enhancements benefited both projects up to that point, though WinLIRC has been hosted independently on platforms like for distribution and community contributions. This collaborative evolution allowed WinLIRC to serve as a viable counterpart to LIRC as of 2014, with version 0.9.0 aligning closely with LIRC's feature set at that time for ; however, WinLIRC has not received updates since 2014, while LIRC has continued development to version 0.10.2 in 2022.

Alternatives and Extensions

One prominent Linux-native alternative to LIRC is ir-keytable, a kernel-level tool included in the that allows users to map infrared remote control keys directly to kernel events without requiring a separate daemon like LIRC. Unlike LIRC, which operates as a application for decoding and sending , ir-keytable provides a simpler setup for basic remote control integration, such as mapping IR inputs to media keys or system commands, making it suitable for straightforward scenarios like control. This approach leverages the kernel's remote control (rc) subsystem, reducing overhead and avoiding the need for LIRC's configuration files and daemons, though it lacks LIRC's advanced features for custom signal processing or multi-protocol support. For users seeking alternatives, EventGhost serves as a versatile tool that supports via compatible receivers, enabling for tasks like or device control. EventGhost integrates with hardware such as USB-UIRT for both receiving and transmitting , offering a plugin-based architecture that allows customization without deep kernel modifications, in contrast to LIRC's -specific compilation requirements. Its pros include ease of use for non-technical users through a , but it may require additional setup for complex compared to LIRC's depth in signal customization. Community-driven extensions enhance LIRC's functionality, such as the python-lirc package, a -based Python binding that allows scripting interactions directly in Python applications for tasks like . This extension facilitates integration with modern frameworks by treating IR events similarly to keyboard inputs, though it notes that kernel-level IR handling has reduced the need for traditional LIRC clients in newer distributions. Another example is HARCToolbox, a Java-based suite that builds on LIRC by providing tools for IR signal analysis and conversion, enabling developers to extend LIRC configurations for broader hardware compatibility in . and community projects further extend LIRC, including on that incorporate and for contemporary hardware, ensuring ongoing support beyond the original project's scope. Overall, while alternatives like ir-keytable prioritize simplicity and efficiency, LIRC's extensions maintain its role in scenarios demanding precise handling.
Add your contribution
Related Hubs
User Avatar
No comments yet.