1IRRECORD(1) User Commands IRRECORD(1)
2
3
4
6 irrecord - IR-codes recording tool for usage with LIRC
7
9 irrecord [-f] [-n] [-H driver] [-d device] [file]
10
11 irrecord -a <file>
12
13 irrecord -l
14
15 irrecord --help | --version
16
17
19 This program will record the signals from your remote control and cre‐
20 ate a config file for lircd. Although a good deal of effort is put in
21 this program it is often not possible to automatically recognize all
22 features of a remote control. See USAGE NOTES below.
23
24 If file is not specified it defaults to "irrecord.lircd.conf"
25
26 If file already exists and contains a valid config irrecord will use
27 the protocol description found there and will only try to record the
28 buttons.
29
30
32 -a --analyse
33 Analyse a raw_codes config file, trying to convert it to a regu‐
34 lar configuration.
35
36 -u --update
37 Add new buttons to an existing config file. No protocol informa‐
38 tion is updated.
39
40 -f --force
41 Force raw mode. Use this if recording fails otherwise. This cre‐
42 ates a raw codes configuration file which can be used as-is or
43 converted using the -a option.
44
45 -n --disable-namespace
46 Disable namespace checks.
47
48 -l --list-namespace
49 List valid button names.
50
51 -H --driver=driver
52 Use given driver. -H help lists available drivers.
53
54 -d --device=device
55 Read from given device. Use mode2(1) --list-devices to list
56 available devices for a driver.
57
58 -U --plugindir=directory
59 Load drivers from directory. See DRIVER LOADING.
60
61 -k --keep-root
62 Don't drop root privileges after opening device. See RUNNING AS
63 ROOT.
64
65 -A, --driver-options key:value[|key:value...]
66 Set one or more options for the driver. The argument is a list
67 of key:value pairs delimited by '|'. The key can not contain
68 spaces, but such are allowed in the value part. Certain charac‐
69 ters including '#' and ';' are used as comment markers in the
70 config file and are not allowed anywhere.
71
72 -D --loglevel=level
73 Determine the amount of logging information. [level] can be a
74 symbolic syslog level: 'error','warning, 'info', 'notice' or
75 'debug'. lirc also defines three additional levels 'trace',
76 'trace1' and 'trace2' which gives even more messages ('trace2'
77 bringing the most). However, in the log these messages are
78 marked as 'debug'. The level can also be an integer in the
79 range 3 (almost no messages) to 10.
80
81 -O, --options-file <path>
82 File containing default values for all options. A relative path
83 is interpreted from current directory. See [FILES] below.
84
85 -h --help
86 Display this message.
87
88 -v --version
89 Display version.
90
91
93 The primary options are --driver and usually also --device (some driv‐
94 ers does not need --device). These could be verified using mode2(1) if
95 irrecord runs into trouble.
96
97 When driver and device is known it saves some work to update
98 lirc_options.conf with the new values. irrecord uses the [lircd] sec‐
99 tion as a fallback, so with a proper lirc_options.conf irrecord could
100 be run without command line options.
101
102 Using an existing file as a template can sometimes be required for
103 irrecord to work. If using one of the generic templates it can also
104 provide better timing. See PROTOCOL PARAMETERS AND TEMPLATES.
105
106 If the program fails to recognize the protocol of the remote control
107 you could use the --force option to at least create a config file in
108 raw mode.
109
110
112 After recording some buttons with irrecord, you should check the repeat
113 masks. These are needed in order to handle repeated button presses,
114 which are very common
115
116 Using the config file, start lircd and irw. Keeping a button pressed
117 down, you should see something like:<
118
119 0000000000f40bf0 00 KEY_1 ANIMAX
120 0000000000f40bf0 01 KEY_1 ANIMAX
121 0000000000f40bf0 02 KEY_1 ANIMAX
122 0000000000f40bf0 03 KEY_1 ANIMAX
123 0000000000f40bf0 04 KEY_1 ANIMAX
124 0000000000f40bf0 05 KEY_1 ANIMAX
125
126 Note how the second field gets incremented. This must work for correct
127 operation.
128
129
131 irrecord actually works in two phases. In the first, it tries to iden‐
132 tify the protocol used by the remote. Although this often works quite
133 well, there are advantages using an existing file as a template.
134
135 One reason to use a template is when irrecord fails to recognize the
136 protocol in the beginning. In such cases, try to find an existing con‐
137 figuration from the same vendor using something like:
138
139 $ irdb-get find motorola
140 # lots of remotes listed...
141 $ irdb-get download motorola/VIP_1200.lircd.conf # Pick any
142 $ cp VIP_1200.lircd.conf my_remote.lircd.conf
143 $ irrecord my_remote.lircd.conf
144
145 Invoking irrecord this way re-uses the existing protocol which usually
146 works (vendors seldom changes protocol parameters).
147
148 Another reason to use an existing file is to get more exact timing,
149 important when planning to also transmit (blast). In such cases, using
150 a generic template found using irdb-get find generic has advantages
151 since the timing values here are hand-crafted from specifications. To
152 use these, you need to know which protocol your remote uses, though.
153
154 If decoding of IR commands does not work reliably you can try to modify
155 the eps and aeps values in the lircd config file to adjust the toler‐
156 ance of signal lengths. aeps is an absolute value while eps is a rela‐
157 tive value expressed in percent. See lircd.conf(5)
158
159
161 Multiple-personalities remotes
162 Some remotes actually emulates two or more remotes. irrecord runs into
163 trouble if buttons from different logical remotes are mixed in the
164 same run, in particular in the initial protocol identification. For
165 such devices, irrecord must be invoked once for every logical device
166 using only buttons from this device during the run.
167
168
169 Un-printable garbage when using default driver
170 If there is various non-printable garbage on the screen when running
171 irrecord when using the default driver the rc protocol needs to be set.
172 With a single device the protocol can be set and inspected using
173
174 sudo sh -c "echo 'lirc' > /sys/class/rc/rc0/protocol"
175 cat /sys/class/rc/rc0/protocol
176
177
178 Physical disturbances
179 As for physical disturbances, the primary source is fluorescent light.
180 You should not have any such light around when using irrecord. It's
181 also important to have a suitable distance between the remote and the
182 capture device, which often is smaller than in typical, normal usage.
183 However, making the distance too small might cause other problems. At
184 a first try use a foot or two.
185
186
188 Drivers are loaded dynamically. This is done from a traditional *ux
189 ´:´-separated path where each component in the path is searched (lead‐
190 ing part first, trailing last).
191
192 The path used for this is determined by (falling priority):
193
194 - The --plugindir option.
195
196 - The 'plugindir' entry in the [lircd] section of the
197 lirc_options.conf file.
198
199 - The environment variable LIRC_PLUGINDIR.
200
201 - A hardcoded default (/usr/lib64/lirc/plugins).
202
203
205 In many cases irrecord needs to run as root to access devices not
206 available to regular users. On the other hand, running as root creates
207 problems such as log files owned by root, security concerns etc.
208
209 In order to cope with this, irrecord by default drops root privileges
210 after opening the input device. This support is based on that root per‐
211 missions are accquired using sudo(1) e. g., using
212
213 $ sudo irrecord --device /dev/lirc0 --driver default
214
215 If not using sudo, the same behaviour could be accomplished using the
216 SUDO_USER environment variable e. g.,
217
218 # SUDO_USER=$LOGNAME irrecord --device /dev/lirc0 --driver default
219
220 The --keep-root option will make irrecord to keep root privileges for
221 the complete run.
222
223
224
225
227 /etc/lirc/lirc_options.conf
228 The options file holding default values for command line options in
229 the [irrecord] section. For some values including debug, plugindir,
230 driver and device irrecord falls back to the [lircd] section if not
231 found in [irrecord].
232
233 - The location of this file can be changed using the -O/--options-
234 file command-line option or using the environment variable
235 LIRC_OPTIONS_PATH.
236
237
238 ~/.cache/irrecord.log
239 Debug output. Setting the XDG_CACHE_HOME environment variable relo‐
240 cates this file to $XDG_CACHE_HOME/irrecord.log
241
242
244 https://sourceforge.net/p/lirc-remotes/wiki
245 irdb-get(1)
246 mode2(1)
247 lircd.conf(5)
248
249
250
251irrecord 0.10.0 Last change: May 2017 IRRECORD(1)