Skip to content

Commit 5c1d7c9

Browse files
committed
Make README a bit clearer
Signed-off-by: Sean Young <[email protected]>
1 parent a7f93aa commit 5c1d7c9

File tree

2 files changed

+46
-16
lines changed

2 files changed

+46
-16
lines changed

Diff for: README.md

+45-15
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,18 @@
11
# cir - a new implementation of linux infrared tools
22

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
75
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.
99

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:
1111

1212
- Pronto hex codes
1313
- IRP support
1414
- lircd.conf remote definition support
15+
- daemon-less (using BPF)
1516

1617
Pronto hex codes are a fairly straightforward way of encoding raw IR,
1718
NEC, RC-5 and a few others.
@@ -22,15 +23,37 @@ express [any IR protocol](http://hifi-remote.com/wiki/index.php/DecodeIR).
2223
The aim is parse IRP and compile a decoder to BPF. So, any protocol can
2324
be supported directly.
2425

25-
## Listing IR devices
26+
## Listing IR devices (cir config)
2627

2728
This is the cir equivalent of both `ir-keytable` with no arguments and `ir-ctl -f`.
2829

2930
```
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)
3457

3558
If you have a `.lircd.conf` file or `.toml` keymap, you can send with the following
3659
command:
@@ -57,7 +80,7 @@ to avoid sending.
5780
cir transmit irp -n -fF=2 '{40k,600}<1,-1|2,-1>(4,-1,F:8,^45m)[F:0..255]'
5881
```
5982

60-
## Decoding
83+
## Decoding (cir decode)
6184

6285
Use this if have a `.lircd.conf` file or `.toml` keymap, and want to decode the IR, without changing
6386
any configation.
@@ -74,8 +97,15 @@ or
7497
```
7598
cir decode keymap foo.lircd.conf -f input-file
7699
```
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`).
77107

78-
## Configuration
108+
## Configuration (cir config -w)
79109

80110
This is the cir equivalent of `ir-keytable -w`.
81111

@@ -90,7 +120,7 @@ On startup, `ir-keytable -a -s rc0` read the correct keymap from `/etc/rc_maps.c
90120
cir auto -s rc0
91121
```
92122

93-
## Test configuration
123+
## Test configuration (cir test)
94124

95125
This is the cir equivalent of `ir-keytable -t`
96126

@@ -109,5 +139,5 @@ On Linux, cir depends on llvm for BPF code generation. On Fedora you
109139
need the `llvm-devel` package install and `llvm-dev` on Ubuntu.
110140

111141
```
112-
cargo install --git https://github.com/seanyoung/cir
142+
cargo install --git https://github.com/seanyoung/cir cir
113143
```

Diff for: src/bin/commands/config.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -479,8 +479,8 @@ fn print_rc_dev(list: &[rcdev::Rcdev], config: &crate::Config) {
479479

480480
println!(
481481
"\tVendor/product\t\t: {:04x}:{:04x} version 0x{:04x}",
482-
id.product(),
483482
id.vendor(),
483+
id.product(),
484484
id.version()
485485
);
486486

0 commit comments

Comments
 (0)