-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathpicocom.8.xml
501 lines (450 loc) · 14.3 KB
/
picocom.8.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
<?xml version="1.0" standalone='no'?>
<!DOCTYPE manpage SYSTEM "xmlmp-1.1.dtd">
<manpage
title="picocom"
section="8"
desc="minimal dumb-terminal emulation program">
<synopsis>
<synel>
picocom [ <arg>options</arg> ] <arg>device</arg>
</synel>
</synopsis>
<description>
<p>
As its name suggests, <cmd>picocom</cmd> is a minimal
dumb-terminal emulation program. It is, in principle, very much
like <manref name="minicom" section="1"/>, only it's "pico"
instead of "mini"! It was designed to serve as a simple, manual,
modem configuration, testing, and debugging tool. It has also
served (quite well) as a low-tech "terminal-window" to allow
operator intervention in PPP connection scripts (something like
the ms-windows "open terminal window before / after dialing"
feature). It could also prove useful in many other similar
tasks.
</p>
<p>
When <cmd>picocom</cmd> starts it opens the terminal (serial
device) given as its non-option argument. Unless the
<arg>--noinit</arg> option is given, it configures the device to
the settings specified by the option-arguments (or to some
default settings), and sets it to "raw" mode. If
<arg>--noinit</arg> is given, the initialization and
configuration is skipped; the device is just opened. Following
this, <cmd>picocom</cmd> sets the standard-input and
standard-output to raw mode. Having done so, it goes in a loop
where it listens for input from stdin, or from the serial
port. Input from the serial port is copied to the standard
output while input from the standard input is copied to the
serial port. <cmd>picocom</cmd> also scans its input stream for
a user-specified control character, called the "escape
character" (being by default "C-a"). If the escape character is
seen, then instead of sending it to the serial-device, the
program enters "command mode" and waits for the next character
(which is called the "function character"). Depending on the
value of the function character, <cmd>picocom</cmd> performs one
of the operations described in the "Commands" section below.
</p>
</description>
<section name="COMMANDS">
<p>
Commands are given to <cmd>picocom</cmd> by first keying the
"espace character" which by default is "C-a" (see "Options"
below on how to change it), and then keying one for the function
(command) characters shown here.
</p>
<dl>
<dt>[escape character]</dt>
<dd>
<p>
Send the escape character to the serial port and return to
"transparent" mode. This means that if the escape character
("C-a", by default) is typed twice, the program sends the
escape character to the serial port, and remains in
transparent mode. This is a new behavior implemented in
v1.4. Previously picocom used to ignore the escape-character
when it was entered as a function character.
</p>
</dd>
<dt>C-x</dt>
<dd>
<p>
Exit the program: if the "--noreset" option was not given
then the serial port is reset to its original settings
before exiting; if it was given the serial port is not
reset.
</p>
</dd>
<dt>C-q</dt>
<dd>
<p>
Quit the program *without* reseting the serial port,
regardless of the "--noreset" option.
</p>
</dd>
<dt>C-p</dt>
<dd>
<p>
Pulse the DTR line. Lower it for 1 sec, and then raise it
again.
</p>
</dd>
<dt>C-t</dt>
<dd>
<p>
Toggle the DTR line. If DTR is up, then lower it. If it is
down, then raise it.
</p>
</dd>
<dt>C-backslash</dt>
<dd>
<p>
Generate a break sequence on the serial line. A break
sequence is usually generated by marking (driving to logical
one) the serial Tx line for an amount of time coresponding
to several character durations.
</p>
</dd>
<dt>C-u</dt>
<dd>
<p>
Baud up. Increase the baud-rate. The list of baud-rates
stepped-through by this command is: 300, 600, 1200, 2400,
4800, 9600, 19200, 38400, 57600, 115200.
</p>
</dd>
<dt>C-d</dt>
<dd>
<p>
Baud down. Decrease the baud-rate. The list of baud-rates
stepped-through by this command is the same as for the
"baud-up" command.
</p>
</dd>
<dt>C-f</dt>
<dd>
<p>
Cycle through flow-control settings (RTS/CTS, XON/XOFF, none).
</p>
</dd>
<dt>C-y</dt>
<dd>
<p>
Cycle through parity settings (even, odd, none).
</p>
</dd>
<dt>C-b</dt>
<dd>
<p>
Cycle through databits-number settings (5, 6, 7, 8).
</p>
</dd>
<dt>C-c</dt>
<dd>
<p>
Toggle local-echo mode.
</p>
</dd>
<dt>C-v</dt>
<dd>
<p>
Show program options (like baud rate, data bits, etc). Only
the options that can be modified online (through commands)
are shown, not those that can only be set at the
command-line.
</p>
</dd>
<dt>C-s</dt>
<dd>
<p>
Send (upload) a file (see "Sending and Receiving Files"
below)
</p>
</dd>
<dt>C-r</dt>
<dd>
<p>
Receive (download) a file (see "Sending and Receiving Files"
below)
</p>
</dd>
</dl>
<p>
After performing one of the above operations the program leaves
the command mode and enters transparent mode. Example: To
increase the baud-rate by two steps, you have to type:
</p>
<p>
C-a, C-u, C-a, C-u
</p>
<p>
assuming of-course that "C-a" is the escape character.
</p>
</section>
<section name = "SENDING AND RECEIVING FILES">
<p>
<cmd>picocom</cmd> can send and receive files over the serial
port using external programs that implement the respective
protocols. In Linux typical programs for this purpose are:
</p>
<ul>
<li><p><manref name="rx" section="1"/>
- receive using the X-MODEM protocol</p></li>
<li><p><manref name="rb" section="1"/>
- receive using the Y-MODEM protocol</p></li>
<li><p><manref name="rz" section="1"/>
- receive using the Z-MODEM protocol</p></li>
<li><p><manref name="sx" section="1"/>
- send using the X-MODEM protocol</p></li>
<li><p><manref name="sb" section="1"/>
- send using the Y-MODEM protocol</p></li>
<li><p><manref name="sz" section="1"/>
- send using the Z-MODEM protocol</p></li>
<li><p><manref name="ascii-xfr" section="1"/>
- receive or transmit ASCII files</p></li>
</ul>
<p>
The name of, and the command-line options to, the program to be
used for transmitting files are given by the "--send-cmd"
option. Similarly the program to receive files, and its
argumets, are given by the "--receive-cmd" option. For example,
in order to start a <cmd>picocom</cmd> session that uses "sz" to
transmit files, and "rz" to receive, you have to say something
like this:
</p>
<p>
picocom --send-cmd "sz -vv" --receive-cmd "rz -vv"
</p>
<p>
During the picocom session, if you key the "send" or "receive"
commands (e.g. by pressing C-a, C-s, or C-a, C-r) you will be
prompted for a filename. At this prompt you can enter one or
more file-names, and any additional arguments to the
transmission or reception program. After that, picocom will
start the the external program as specified by the "--send-cmd",
or "--receive-cmd" option, and with any filenames and additional
arguments you may have supplied. The standard input and output
of the external program will be connected to the serial
port. The standard error of the external program will be
connected to the terminal which---while the program is
running---will revert to canonical mode. Pressing 'C-c' while
the external program is running will prematurely terminate it,
and return control to <cmd>picocom</cmd>. Pressing 'C-c' at any other
time, has no special effect; the character is normally passed to
the serial port.
</p>
</section>
<section name = "INPUT, OUTPUT, AND ECHO MAPPING">
<p>
Using the "--imap", "--omap", and "--emap" options you can make
<cmd>picocom</cmd> map (tranlate, replace) certain special
characters after being read from the serial port (with
<arg>--imap</arg>), before being written to the serial port
(with <arg>--omap</arg>), and before being locally echoed to the
terminal (standard output) if local echo is enabled (with
<arg>--emap</arg>). These mapping options take, each, a single
argument which is a comma-separated list of one or more of the
following identifiers:
</p>
<ul>
<li>crlf: map CR to LF</li>
<li>crcrlf: map CR to CR + LF</li>
<li>igncr: ignore CR</li>
<li>lfcr: map LF to CR</li>
<li>lfcrlf: map LF to CR + LF</li>
<li>ignlf: ignore LF</li>
<li>bsdel: map BS --> DEL</li>
<li>delbs: map DEL --> BS</li>
</ul>
<p>
For example the command:
</p>
<p>
picocom --omap crlf,delbs --imap inglf,bsdel --emap crcrlf ...
</p>
<p>
will: Replace every CR (carriage return, 0x0d) caracter with LF
(line feed, 0x0a) and every DEL (delete, 0x7f) character with BS
(backspace, 0x08) before writing it to the serial port. Ignore
(not write to the terminal) every LF character read from the
serial port and replace every BS character read from the serial
port with DEL. Replace every CR character with CR and LF when
echoing to the terminal (if local-echo is enabled).
</p>
</section>
<section name = "OPTIONS">
<p>
<cmd>picocom</cmd> accepts the following command-line options
</p>
<dl>
<dt>--baud | -b</dt>
<dd>
<p>
Defines the baud-rate to set the serial-port (terminal) to.
</p>
</dd>
<dt>--flow | -f</dt>
<dd>
<p>
Defines the flow-control mode to set the serial-port to. Must be
one of:
</p>
<ul>
<li><p>\'x' for xon/xoff (software) mode</p></li>
<li><p>\'h' for hardware flow control (RTS/CTS)</p></li>
<li><p>\'n' for no flow control</p></li>
</ul>
<p>(Default: 'n')</p>
</dd>
<dt>--parity | -p</dt>
<dd>
<p>
Defines the parity mode to set the serial-port to.
Must be one of:
</p>
<ul>
<li><p>\'o' for odd parity mode.</p></li>
<li><p>\'e' for even parity mode.</p></li>
<li><p>\'n' for no parity, mode.</p></li>
</ul>
<p>(Default: 'n')</p>
</dd>
<dt>--databits | -d</dt>
<dd>
<p>
Defines the number of data bits in every character. Must be one of:
5, 6, 7, 8
</p>
<p>(Default: 8)</p>
</dd>
<dt>--esacpe | -e</dt>
<dd>
<p>
Defines the character that will make picocom enter command-mode
(see description above). If 'x' is given, then C-x will
make picocom enter command mode.
</p>
<p>
(Default: 'a')
</p>
</dd>
<dt>--echo | -c</dt>
<dd>
<p>
Enable local echo. Every character being read from the
terminal (standard input) is echoed to the terminal
(standard output) subject to the echo-mapping configuration
(see <arg>--emap</arg> option.
</p>
<p>
(Default: Disabled)
</p>
</dd>
<dt>--noinit | -i</dt>
<dd>
<p>
If given, <cmd>picocom</cmd> will not initialize, reset, or
otherwise meddle with the serial port at start-up. It will
just open it. This is useful, for example, for connecting
<cmd>picocom</cmd> to already-connected modems, or already
configured ports without terminating the connection, or
altering the settings. If required serial port parameters
can then be adjusted at run-time by commands.
</p>
</dd>
<dt>--noreset | -r</dt>
<dd>
<p>
If given, <cmd>picocom</cmd> will not *reset* the serial
port when exiting. It will just close the filedes and do
nothing more. This is useful, for example, for leaving
modems connected when exiting <cmd>picocom</cmd>. Regardless
whether the "--noreset" option is given the user can exit
<cmd>picocom</cmd> using the "Quit" command (instead of
"Exit"), which never resets the serial port. If "--noreset"
is given then "Quit" and "Exit" behave essentially the same.
</p>
</dd>
<dt>--nolock | -l</dt>
<dd>
<p>
If given, <cmd>picocom</cmd> will *not* attempt to lock the
serial port before opening it. Normally picocom attempts to
get a UUCP-style lock-file (e.g. "/var/lock/LCK..ttyS0")
before opening the port. Failing to do so, results in the
program exiting after emitting an error-message. It is
possible that your picocom binary is compiled without this
option.
</p>
</dd>
<dt>--send-cmd | -s</dt>
<dd>
<p>
Specifies the external program (and any arguments to it)
that will be used for transmitting files.
</p>
<p>
Default: "sz -vv"
</p>
</dd>
<dt>--receive-cmd | -v</dt>
<dd>
<p>
Specifies the external program (and any arguments to it)
that will be used for receiving files.
</p>
<p>
(Default: "rz -vv")
</p>
</dd>
<dt>--imap</dt>
<dd>
<p>
Specifies the input character map (i.e. special characters
to be replaced when read from the serial port). Example:
"--imap crlf,delbs"
</p>
<p>
(Defaul: Empty)
</p>
</dd>
<dt>--omap</dt>
<dd>
<p>
Specifies the output character map (i.e. special characters
to be replaced before being written to serial
port). Example: "--omap crcrlf,bsdel"
</p>
<p>
(Defaul: Empty)
</p>
</dd>
<dt>--emap</dt>
<dd>
<p>
Specifies the local-echo character map (i.e. special
characters to be replaced before being echoed-back to the
terminal, if local-echo is enabled). Example: "--emap
crcrlf,bsdel"
</p>
<p>
(Defaul: delbs,crcrlf)
</p>
</dd>
<dt>--help | -h</dt>
<dd>
<p>
Print a short help message describing the command-line
options.
</p>
</dd>
</dl>
</section>
<section name="AUTHOR">
<p>picocom was written by Nick Patavalis ([email protected])</p>
</section>
<section name="AVAILABILITY">
<p>The latest version of "picocom" can be downloaded from: <url
href="http://code.google.com/p/picocom/" />
</p>
</section>
</manpage>