LIRC: Difference between revisions

From VDR Wiki
Jump to navigation Jump to search
(Category)
(Move some content to the new page Raspberry Pi)
 
(5 intermediate revisions by 5 users not shown)
Line 1: Line 1:
==Description==
==LIRC - Linux Infrared Remote Control==
'''LIRC''' ('''''L'''inux '''I'''nfrared '''R'''emote '''C'''ontrol'') is a software to control ones computer through nearly every (unused) [[remote control]]. Therefore a small electronic device is necessary. You can buy one for ca. 15 Euro, or you can build your own. It consists of only a few components and schematics are on the LIRC homepage.


===Description===
==Miscellaneous==
'''LIRC''' (Linux Infrared Remote Control) is a software to control ones computer through nearly every (unused) [[remote control]]. Therefor a small electronic device is necessary. You can buy one for ca. 15 Euro, or you can build your own. It consists of only a few components and schematics are on the LIRC homepage.
For installation of the software see [[LIRC installation]].


=== Kernel driver /dev/lirc* and ir-keytable ===
===Miscellaneous===

It is possible to operate LIRC with two infrared receiver devices. But in
LIRC was initially developed as a user-space driver based on various bit-banging interfaces, such as some flow control lines of RS-232 interfaces. The Linux kernel also includes drivers on its own that can directly interface with various types of hardware. The Linux kernel driver includes both an input event driver (similar to a keyboard) and a lower-level <code>/dev/lirc*</code> driver. The driver can be configured by installing the package <code>ir-keytable</code> and editing the file <code>/etc/rc_maps.cfg</code>.
this example not independently from one another, only in parallel.

The sophisticated <code>LIRC_MODE_SCANCODE</code> mode that was introduced in Linux 4.16 includes both timing information, raw scancodes and decoded keycodes. It is supported by VDR since version 2.6.2:
<code>vdr --no-kbd --lirc=/dev/lirc0</code>. The earliest Linux kernel version where it was confirmed to work is 5.10. On Linux 5.4 on a 32-bit ARM system ([[Raspberry Pi]]), the interface would not deliver any data in this mode.

For example, to use the remote control unit of an old Hauppauge tuner, you can add the following line to <code>/etc/rc_maps.cfg</code>:
<pre>* * hauppauge.toml</pre>
You can test it with the following command:
<pre>ir-keytable -t</pre>

===Cable length===
The length of the cable between receiver and computer can be up to 25m.

===Parallel operation of two LIRC receiver===
It is possible to operate LIRC with two infrared receiver devices at one COM port. But not independently from one another, only in parallel.


<pre>
<pre>
Line 30: Line 43:
| [1]
| [1]
| http://www.lirc.org
| http://www.lirc.org
| LIRC projekt homepage
| LIRC project homepage
|-
|-
| [2]
| [2]
Line 40: Line 53:
| Commercial infrared receiver (~ 14 Euro)
| Commercial infrared receiver (~ 14 Euro)
|}
|}



[[Category:Software]]
[[Category:Software]]


{{i18n|LIRC}}
<!-- Link to german wiki page -->
[[de:LIRC]]

Latest revision as of 19:29, 28 December 2022

Description

LIRC (Linux Infrared Remote Control) is a software to control ones computer through nearly every (unused) remote control. Therefore a small electronic device is necessary. You can buy one for ca. 15 Euro, or you can build your own. It consists of only a few components and schematics are on the LIRC homepage.

Miscellaneous

Kernel driver /dev/lirc* and ir-keytable

LIRC was initially developed as a user-space driver based on various bit-banging interfaces, such as some flow control lines of RS-232 interfaces. The Linux kernel also includes drivers on its own that can directly interface with various types of hardware. The Linux kernel driver includes both an input event driver (similar to a keyboard) and a lower-level /dev/lirc* driver. The driver can be configured by installing the package ir-keytable and editing the file /etc/rc_maps.cfg.

The sophisticated LIRC_MODE_SCANCODE mode that was introduced in Linux 4.16 includes both timing information, raw scancodes and decoded keycodes. It is supported by VDR since version 2.6.2: vdr --no-kbd --lirc=/dev/lirc0. The earliest Linux kernel version where it was confirmed to work is 5.10. On Linux 5.4 on a 32-bit ARM system (Raspberry Pi), the interface would not deliver any data in this mode.

For example, to use the remote control unit of an old Hauppauge tuner, you can add the following line to /etc/rc_maps.cfg:

* * hauppauge.toml

You can test it with the following command:

ir-keytable -t

Cable length

The length of the cable between receiver and computer can be up to 25m.

Parallel operation of two LIRC receiver

It is possible to operate LIRC with two infrared receiver devices at one COM port. But not independently from one another, only in parallel.

                 o +12V 
                 |
                 -
                | | 10k
                | |
                 -  
Output 1         |   Input
o----------|<----*----o
                 |
Output 2         |
o----------|<----

Ground               Ground
o---------------------o

Links

[1] http://www.lirc.org LIRC project homepage
[2] http://lnx.manoweb.com/lirc/?partType=section&partName=introduction Detailed construction manual with source for a complete infrared receiver
[3] http://www.zapway.de Commercial infrared receiver (~ 14 Euro)