1
1
# cir - a new implementation of linux infrared tools
2
2
3
- aka as "daemon-less lircd, ir-keytable, ir-ctl combined and much more".
4
-
5
- For Linux, there are two tools to interact with any infrared hardware:
6
- ir-ctl and ir-keytable. These tools can load simple infrared keymaps
3
+ For Linux, there are tools to interact with any infrared hardware:
4
+ ` ir-ctl ` and ` ir-keytable ` . These tools can load simple infrared keymaps
7
5
and load decoders, and transmit simple IR. The IR decoders are hardcoded
8
- and a small set is included.
6
+ and a small hardcoded set is included with the kernel.
7
+ There is also the lirc daemon and its tools, which supports many more IR
8
+ protocols but certainly not all.
9
9
10
- This tool replaced both those tools, but with three major new features:
10
+ This tool replaces all those tools, but with major new features:
11
11
12
12
- Pronto hex codes
13
13
- IRP support
14
14
- lircd.conf remote definition support
15
+ - daemon-less (using BPF)
15
16
16
17
Pronto hex codes are a fairly straightforward way of encoding raw IR,
17
18
NEC, RC-5 and a few others.
@@ -22,15 +23,37 @@ express [any IR protocol](http://hifi-remote.com/wiki/index.php/DecodeIR).
22
23
The aim is parse IRP and compile a decoder to BPF. So, any protocol can
23
24
be supported directly.
24
25
25
- ## Listing IR devices
26
+ ## Listing IR devices (cir config)
26
27
27
28
This is the cir equivalent of both ` ir-keytable ` with no arguments and ` ir-ctl -f ` .
28
29
29
30
```
30
- cir config
31
- ```
32
-
33
- ## Transmit/Send
31
+ $ cir config
32
+ rc0:
33
+ Device Name : Media Center Ed. eHome Infrared Remote Transceiver (1784:0008)
34
+ Driver : mceusb
35
+ Default Keymap : rc-rc6-mce
36
+ Input Device : /dev/input/event10
37
+ Bus : USB
38
+ Vendor/product : 1784:0008 version 0x0101
39
+ Repeat : delay 500 ms, period 125 ms
40
+ LIRC Device : /dev/lirc0
41
+ LIRC Receiver : raw receiver
42
+ LIRC Resolution : 50 microseconds
43
+ LIRC Timeout : 125000 microseconds
44
+ LIRC Timeout Range : 50 to 1250000 microseconds
45
+ LIRC Wideband Receiver : yes
46
+ LIRC Measure Carrier : yes
47
+ LIRC Transmitter : yes
48
+ LIRC Set Tx Carrier : yes
49
+ LIRC Set Tx Duty Cycle : no
50
+ LIRC Transmitters : 2
51
+ BPF protocols :
52
+ Supported Protocols : rc-5 nec rc-6 jvc sony rc-5-sz sanyo sharp mce_kbd xmp imon rc-mm
53
+ Enabled Protocols :
54
+ ```
55
+
56
+ ## Transmit/Send (cir transmit)
34
57
35
58
If you have a ` .lircd.conf ` file or ` .toml ` keymap, you can send with the following
36
59
command:
@@ -57,7 +80,7 @@ to avoid sending.
57
80
cir transmit irp -n -fF=2 '{40k,600}<1,-1|2,-1>(4,-1,F:8,^45m)[F:0..255]'
58
81
```
59
82
60
- ## Decoding
83
+ ## Decoding (cir decode)
61
84
62
85
Use this if have a ` .lircd.conf ` file or ` .toml ` keymap, and want to decode the IR, without changing
63
86
any configation.
74
97
```
75
98
cir decode keymap foo.lircd.conf -f input-file
76
99
```
100
+ If you wish to decode using IRP Notation that is possible too:
101
+
102
+ ```
103
+ cir decode irp '{40k,600}<1,-1|2,-1>(4,-1,F:8,^45m)[F:0..255]'
104
+ ```
105
+ Like above the input can be from a lirc device (optionally specify the device with
106
+ ` -d /dev/lirc1 ` or ` -s rc ` ), on the command line (` -r '+100 -200 +100' ` ) or a file (` -f filename ` ).
77
107
78
- ## Configuration
108
+ ## Configuration (cir config -w)
79
109
80
110
This is the cir equivalent of ` ir-keytable -w ` .
81
111
@@ -90,7 +120,7 @@ On startup, `ir-keytable -a -s rc0` read the correct keymap from `/etc/rc_maps.c
90
120
cir auto -s rc0
91
121
```
92
122
93
- ## Test configuration
123
+ ## Test configuration (cir test)
94
124
95
125
This is the cir equivalent of ` ir-keytable -t `
96
126
@@ -109,5 +139,5 @@ On Linux, cir depends on llvm for BPF code generation. On Fedora you
109
139
need the ` llvm-devel ` package install and ` llvm-dev ` on Ubuntu.
110
140
111
141
```
112
- cargo install --git https://github.com/seanyoung/cir
142
+ cargo install --git https://github.com/seanyoung/cir cir
113
143
```
0 commit comments