1
0
mirror of https://github.com/UzixLS/picocom.git synced 2025-07-19 07:21:18 +03:00

Updated manual and regenerated docs

This commit is contained in:
Nick Patavalis
2017-12-20 11:11:14 +02:00
parent 89be292023
commit 0ec7213956
4 changed files with 177 additions and 133 deletions

114
picocom.1
View File

@ -1,6 +1,6 @@
.\" Automatically generated by Pandoc 1.16.0.2
.\"
.TH "PICOCOM" "1" "2017-12-16" "Picocom 2.3a" "User Commands"
.TH "PICOCOM" "1" "2017-12-20" "Picocom 2.3a" "User Commands"
.hy
.SH NAME
.PP
@ -58,15 +58,19 @@ and remains in transparent mode.
.RE
.TP
.B \f[B]C\-x\f[]
Exit the program: if the \f[B]\-\-noreset\f[] 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.
Exit the program.
If the \f[B]\-\-noreset\f[] option is \f[I]not\f[] given, then the
serial port is reset to its original settings before exiting, and the
modem control lines (typically DTR and RTS) are cleared (lowered)
signaling a modem hangup; if \f[B]\-\-noreset\f[] is given, then the
serial port settings are not reset, and the modem control lines remain
unaffected.
.RS
.RE
.TP
.B \f[B]C\-q\f[]
Quit the program \f[I]without\f[] resetting the serial port, regardless
of the \f[B]\-\-noreset\f[] option.
Quit the program \f[I]without\f[] resetting the serial port, exactly as
if the \f[B]\-\-noreset\f[] option was given.
.RS
.RE
.TP
@ -235,6 +239,7 @@ Defines the character that will make picocom enter command\-mode (see
description above).
If \f[B]x\f[] is given, then \f[B]C\-x\f[] will make picocom enter
command mode.
See also the \f[B]\-\-no\-escape\f[] option.
(Default: \f[B]a\f[])
.RS
.RE
@ -242,8 +247,8 @@ command mode.
.B \f[B]\-\-no\-escape\f[] | \f[B]\-n\f[]
Disables the escape character.
Picocom will never enter command\-mode if this option is enabled.
To exit picocom, either close its standard input, or send it the TERM or
INT signal.
To exit picocom, you must either close its standard input, or send it
the TERM or INT signal.
(Default: Disabled).
.RS
.RE
@ -258,30 +263,44 @@ configuration (see \f[B]\-\-emap\f[] option).
.RE
.TP
.B \f[B]\-\-noinit\f[] | \f[B]\-i\f[]
If given, picocom will not initialize, reset, or otherwise meddle with
the serial port at start\-up.
If given, picocom will not initialize, configure, or otherwise meddle
with the serial port at start\-up.
It will just open it.
This is useful, for example, for connecting picocom to
already\-connected modems, or already configured ports without
terminating the connection, or altering the settings.
terminating the connection, or altering their settings.
If required, serial port parameters can then be adjusted at run\-time by
commands.
See also the \f[B]\-\-noreset\f[] option.
(Default: Disabled)
.RS
.RE
.TP
.B \f[B]\-\-noreset\f[] | \f[B]\-r\f[]
If given, picocom will not reset the serial port when exiting.
It will just close the filedes and do nothing more.
It will just close the respective file descriptor and do nothing more.
The serial port settings will \f[I]not\f[] be restored to their original
values and the modem\-control lines will \f[I]not\f[] be affected.
This is useful, for example, for leaving modems connected when exiting
picocom.
Regardless whether the \f[B]\-\-noreset\f[] option is given, the user
can exit picocom using the "Quit" command (instead of "Exit"), which
never resets the serial port.
never resets the serial port (i.e makes picocom behave exactly as if
\f[B]\-\-noreset\f[] was given).
If \f[B]\-\-noreset\f[] is given then "Quit" and "Exit" behave
essentially the same.
(Default: Disabled)
.RS
.PP
NOTICE: Picocom will always set the HUPCL control bit of the serial
port, according to the \f[B]\-\-noreset\f[] option.
If \f[B]\-\-noreset\f[] is given, then HUPCL for the port is cleared,
and will remain so after exiting picocom.
If \f[B]\-\-noreset\f[] is \f[I]not\f[] given, then HUPCL is set for the
port, and will remain so after exiting picocom.
This is true, regardless of the way picocom terminates (command, read
zero\-bytes from standard input, killed by signal, fatal error, etc),
and regardless of the \f[B]\-\-noinit\f[] option.
.RE
.TP
.B \f[B]\-\-nolock\f[] | \f[B]\-l\f[]
@ -364,7 +383,7 @@ Send the provided string after opening and configuring the serial port.
The init string is sent exactly as if it was input at the terminal.
Sending the init string, picocom observes the \f[B]\-\-omap\f[] output
mapping, the \f[B]\-\-echo\f[] local\-echo setting, and the
\f[B]\-emap\f[] local\-echo mapping.
\f[B]\-\-emap\f[] local\-echo mapping.
This feature is useful, for example, if the serial device needs some
special magic strings to start responding.
Use \f[B]echo(1)\f[] or \f[B]xxd(1)\f[] to generate special characters
@ -374,7 +393,7 @@ Example:
.IP
.nf
\f[C]
picocom\ \-t\ "$(echo\ \-e\ \[aq]\\r\\nATZ\\r\\n\[aq])"\ /dev/ttsyS0
picocom\ \-t\ "$(echo\ \-e\ \[aq]AAATZ\\r\\n\[aq])"\ /dev/ttyS0
\f[]
.fi
.PP
@ -403,22 +422,24 @@ Exit picocom if it remains idle for the specified time (in
milliseconds).
Picocom is considered idle if: Nothing is read (received) from the
serial port, AND there is nothing to write (send) to the serial port,
AND nothing is read from the terminal.
AND nothing is read from the standard input (terminal).
If \f[B]\-\-exit\-after\f[] is set to zero, then picocom exits after
opening and configuring the serial port, after sending the init string
(if any, see option \f[B]\-\-initstring\f[]), and imediatelly when it
becomes idle.
When exiting after being idle, picocom observes the \f[B]\-\-noreset\f[]
setting as usual.
When exiting after being idle, picocom drains the O/S serial port ouput
buffer (i.e.
waits for data already written to the port to be transmitted) and
observes the \f[B]\-\-noreset\f[] setting as usual.
(Default: not set).
.RS
.PP
NOTICE: If \f[B]\-\-exit\-after\f[] is set, reading zero bytes from the
standard input (which usually means that whatever was connected there
has been closed), will \f[I]not\f[] cause picocom to exit.
Instead, picocom will keep running, without reading from stdin, and will
exit only when it becomes idle for the specified time, or if it is
killed by a signal.
Instead, picocom will keep running, \f[I]without\f[] reading from stdin,
and will exit only when it becomes idle for the specified time, or if it
is killed by a signal.
If \f[B]\-\-exit\-after\f[] is \f[I]not\f[] set, then reading zero bytes
from the standard input causes picocom to exit, after the contents of
its output queue have been transmitted.
@ -430,14 +451,14 @@ Do \f[I]not\f[] read \f[I]anything\f[] from the standard input or from
the serial port.
When exiting the \f[B]\-\-noreset\f[] option is observed as usual.
With \f[B]\-\-exit\f[] and \f[B]\-\-noreset\f[] picocom can be used as a
crude replacement of \f[B]stty(1)\f[].
very crude replacement of \f[B]stty(1)\f[].
If an init string is also given (see \f[B]\-\-initstring\f[] option),
picocom exits imediatelly after sending (writing) the init string to the
serial port.
In this case, before exiting, picocom drains the O/S serial port output
buffer (i.e.
waits for data written to the port to be transmitted).
Again, nothing is read from the standard input, or from the serial port.
The ouput map (see \f[B]\-\-omap\f[]), the local echo option (see
\f[B]\-\-echo\f[]), and the local\-echo map (see \f[B]\-\-emap\f[]) are
observed when sending the init string.
The \f[B]\-\-exit\f[] option, overrides the \f[B]\-\-exit\-after\f[]
option.
(Default: Disabled)
@ -628,23 +649,25 @@ its operation and what happens on each such condition:
.IP \[bu] 2
The exit command is seen in the standard input.
That is, the escape character is seen (default \f[B]C\-a\f[]), followed
by the exit command character (default: \f[B]C\-x\f[]).
In this case: The contents of the output queue are discarded and the
contents of the O/S serial port output buffer (data already written to
the port) are drained (i.e.
picocom waits for them to be transmitted).
by the exit command character (default \f[B]C\-x\f[]).
In this case: The contents of the output queue (data read from the
standard input, but not yet written to the port) as well as the contents
of the O/S serial port output buffer (data already written to the port,
but not yet transmitted) are discarded (flushed).
Then, if the \f[B]\-\-noreset\f[] option is \f[I]not\f[] given, the
serial port is reset to the settings it had when picocom started, and
picocom exits.
the modem control lines (typically DTR and RTS) are cleared (lowered),
signaling a modem hangup.
Picocom then exits.
If \f[B]\-\-noreset\f[] is given, then picocom exits without reseting
the serial port.
the serial port and without affecting the modem control lines.
.IP \[bu] 2
The quit command is seen in the standard input.
That is, the escape character is seen (default \f[B]C\-a\f[]), followed
by the quit command character (default: \f[B]C\-q\f[]).
by the quit command character (default \f[B]C\-q\f[]).
The behavior in this case is similar to that of the exit command, with
one difference: The serial port is \f[I]not\f[] reset to its original
settings, regardless of the \f[B]\-\-noreset\f[] option.
one difference: Picocom behaves as if the \f[B]\-\-noreset\f[] option is
given (regardless if it actualy is, or not).
.IP \[bu] 2
The \f[B]\-\-exit\f[] option is given.
See the documentation of this option for a description of what exactly
@ -658,14 +681,15 @@ Zero bytes are read from the standard input.
This usually means that whatever was connected to picocom\[aq]s standard
input has been closed or, if a file was connected, that picocom has read
up to the end of the file.
In this case, if the \f[B]\-\-exit\-after\f[] option is not given,
picocom stops reading from the standard input, and keeps operating
normally (i.e.
In this case, if the \f[B]\-\-exit\-after\f[] option is \f[I]not\f[]
given, picocom stops reading from the standard input, and keeps
operating normally (i.e.
writing to, and reading from, the serial port) until its output queue is
emptied.
When this happens, picocom waits for the O/S serial port output buffer
to drain and then (subject to the \f[B]\-\-noreset\f[] option) resets
the serial port to it\[aq]s initial settings and exits.
the serial port to it\[aq]s initial settings, clears the modem\-control
lines, and exits.
If the \f[B]\-\-exit\-after\f[] option is given then, again, picocom
stops reading from the standard input and continues operating normally
but, in this case, it does so until it becomes idle for the specified
@ -675,15 +699,13 @@ observing the \f[B]\-\-noreset\f[] option as usual.
.IP \[bu] 2
Picocom is killed by the TERM or INT signal.
In this case picocom behaves as if it had received the exit command,
that is: The contents of the output queue are discarded and the contents
of the O/S serial port output buffer (data already written to the port)
are drained (i.e.
picocom waits for them to be transmitted).
that is: The contents of the output queue and the contents of the O/S
serial port output buffer are discarded (flushed).
Then, if the \f[B]\-\-noreset\f[] option is \f[I]not\f[] given, the
serial port is reset to the settings it had when picocom started, and
picocom exits.
serial port is reset to the settings it had when picocom started, the
modem control lines are cleared, and picocom exits.
If \f[B]\-\-noreset\f[] is given, then picocom exits without reseting
the serial port.
the serial port or affecting the modem control lines.
.SH AUTHOR
.PP
Written by Nick Patavalis <npat@efault.net>

View File

@ -27,10 +27,10 @@
<dd><p>Send the escape character to the serial port and return to &quot;transparent&quot; mode. This means that if the escape character (<strong>C-a</strong>, by default) is typed twice, the program sends the escape character to the serial port, and remains in transparent mode.</p>
</dd>
<dt><strong>C-x</strong></dt>
<dd><p>Exit the program: if the <strong>--noreset</strong> 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><p>Exit the program. If the <strong>--noreset</strong> option is <em>not</em> given, then the serial port is reset to its original settings before exiting, and the modem control lines (typically DTR and RTS) are cleared (lowered) signaling a modem hangup; if <strong>--noreset</strong> is given, then the serial port settings are not reset, and the modem control lines remain unaffected.</p>
</dd>
<dt><strong>C-q</strong></dt>
<dd><p>Quit the program <em>without</em> resetting the serial port, regardless of the <strong>--noreset</strong> option.</p>
<dd><p>Quit the program <em>without</em> resetting the serial port, exactly as if the <strong>--noreset</strong> option was given.</p>
</dd>
<dt><strong>C-p</strong></dt>
<dd><p>Pulse the DTR line. Lower it for 1 sec, and then raise it again.</p>
@ -105,19 +105,20 @@
<dd><p>Defines the number of stop bits in every character. Must be one of: <strong>1</strong>, or <strong>2</strong>. (Default: <strong>1</strong>)</p>
</dd>
<dt><strong>--escape</strong> | <strong>-e</strong></dt>
<dd><p>Defines the character that will make picocom enter command-mode (see description above). If <strong>x</strong> is given, then <strong>C-x</strong> will make picocom enter command mode. (Default: <strong>a</strong>)</p>
<dd><p>Defines the character that will make picocom enter command-mode (see description above). If <strong>x</strong> is given, then <strong>C-x</strong> will make picocom enter command mode. See also the <strong>--no-escape</strong> option. (Default: <strong>a</strong>)</p>
</dd>
<dt><strong>--no-escape</strong> | <strong>-n</strong></dt>
<dd><p>Disables the escape character. Picocom will never enter command-mode if this option is enabled. To exit picocom, either close its standard input, or send it the TERM or INT signal. (Default: Disabled).</p>
<dd><p>Disables the escape character. Picocom will never enter command-mode if this option is enabled. To exit picocom, you must either close its standard input, or send it the TERM or INT signal. (Default: Disabled).</p>
</dd>
<dt><strong>--echo</strong> | <strong>-c</strong></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 <strong>--emap</strong> option). (Default: Disabled)</p>
</dd>
<dt><strong>--noinit</strong> | <strong>-i</strong></dt>
<dd><p>If given, picocom 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 picocom 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. (Default: Disabled)</p>
<dd><p>If given, picocom will not initialize, configure, or otherwise meddle with the serial port at start-up. It will just open it. This is useful, for example, for connecting picocom to already-connected modems, or already configured ports without terminating the connection, or altering their settings. If required, serial port parameters can then be adjusted at run-time by commands. See also the <strong>--noreset</strong> option. (Default: Disabled)</p>
</dd>
<dt><strong>--noreset</strong> | <strong>-r</strong></dt>
<dd><p>If given, picocom 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 picocom. Regardless whether the <strong>--noreset</strong> option is given, the user can exit picocom using the &quot;Quit&quot; command (instead of &quot;Exit&quot;), which never resets the serial port. If <strong>--noreset</strong> is given then &quot;Quit&quot; and &quot;Exit&quot; behave essentially the same. (Default: Disabled)</p>
<dd><p>If given, picocom will not reset the serial port when exiting. It will just close the respective file descriptor and do nothing more. The serial port settings will <em>not</em> be restored to their original values and the modem-control lines will <em>not</em> be affected. This is useful, for example, for leaving modems connected when exiting picocom. Regardless whether the <strong>--noreset</strong> option is given, the user can exit picocom using the &quot;Quit&quot; command (instead of &quot;Exit&quot;), which never resets the serial port (i.e makes picocom behave exactly as if <strong>--noreset</strong> was given). If <strong>--noreset</strong> is given then &quot;Quit&quot; and &quot;Exit&quot; behave essentially the same. (Default: Disabled)</p>
<p>NOTICE: Picocom will always set the HUPCL control bit of the serial port, according to the <strong>--noreset</strong> option. If <strong>--noreset</strong> is given, then HUPCL for the port is cleared, and will remain so after exiting picocom. If <strong>--noreset</strong> is <em>not</em> given, then HUPCL is set for the port, and will remain so after exiting picocom. This is true, regardless of the way picocom terminates (command, read zero-bytes from standard input, killed by signal, fatal error, etc), and regardless of the <strong>--noinit</strong> option.</p>
</dd>
<dt><strong>--nolock</strong> | <strong>-l</strong></dt>
<dd><p>If given, picocom will <em>not</em> attempt to lock the serial port before opening it. Normally, depending on how it's compiled, picocom attempts to get a UUCP-style lock-file (e.g. '/var/lock/LCK..ttyS0') before opening the port, or attempts to lock the port device-node using <strong>flock(2)</strong>. Failing to do so, results in the program exiting after emitting an error-message. It is possible that your picocom binary is compiled without support for locking. In this case the <strong>--nolock</strong> option is accepted, but has no effect. (Default: Disabled)</p>
@ -141,8 +142,8 @@
<dd><p>Use specified file for logging (recording) serial input, and possibly serial output. If the file exists, it is appended to. Every character read from the serial port is written to the specified file (before input mapping is performed). If local-echo mode is is enabled (see <strong>--echo</strong> option and <strong>C-c</strong> command), then every character written to the serial port (after output mapping is performed) is also logged to the same file. (Default: no logging)</p>
</dd>
<dt><strong>--initstring</strong> | <strong>-t</strong></dt>
<dd><p>Send the provided string after opening and configuring the serial port. The init string is sent exactly as if it was input at the terminal. Sending the init string, picocom observes the <strong>--omap</strong> output mapping, the <strong>--echo</strong> local-echo setting, and the <strong>-emap</strong> local-echo mapping. This feature is useful, for example, if the serial device needs some special magic strings to start responding. Use <strong>echo(1)</strong> or <strong>xxd(1)</strong> to generate special characters like a CR or binary data. Example:</p>
<pre><code>picocom -t &quot;$(echo -e '\r\nATZ\r\n')&quot; /dev/ttsyS0</code></pre>
<dd><p>Send the provided string after opening and configuring the serial port. The init string is sent exactly as if it was input at the terminal. Sending the init string, picocom observes the <strong>--omap</strong> output mapping, the <strong>--echo</strong> local-echo setting, and the <strong>--emap</strong> local-echo mapping. This feature is useful, for example, if the serial device needs some special magic strings to start responding. Use <strong>echo(1)</strong> or <strong>xxd(1)</strong> to generate special characters like a CR or binary data. Example:</p>
<pre><code>picocom -t &quot;$(echo -e 'AAATZ\r\n')&quot; /dev/ttyS0</code></pre>
<p>Note, that the init string is not sent if <strong>--noinit</strong> is set. (Default: empty).</p>
</dd>
<dt><strong>--lower-rts</strong></dt>
@ -152,11 +153,11 @@
<dd><p>Lower the DTR control signal after opening the serial port (by default DTR is raised after open). Only supported in Linux and OSX.</p>
</dd>
<dt><strong>--exit-aftrer</strong> | <strong>-x</strong></dt>
<dd><p>Exit picocom if it remains idle for the specified time (in milliseconds). Picocom is considered idle if: Nothing is read (received) from the serial port, AND there is nothing to write (send) to the serial port, AND nothing is read from the terminal. If <strong>--exit-after</strong> is set to zero, then picocom exits after opening and configuring the serial port, after sending the init string (if any, see option <strong>--initstring</strong>), and imediatelly when it becomes idle. When exiting after being idle, picocom observes the <strong>--noreset</strong> setting as usual. (Default: not set).</p>
<p>NOTICE: If <strong>--exit-after</strong> is set, reading zero bytes from the standard input (which usually means that whatever was connected there has been closed), will <em>not</em> cause picocom to exit. Instead, picocom will keep running, without reading from stdin, and will exit only when it becomes idle for the specified time, or if it is killed by a signal. If <strong>--exit-after</strong> is <em>not</em> set, then reading zero bytes from the standard input causes picocom to exit, after the contents of its output queue have been transmitted.</p>
<dd><p>Exit picocom if it remains idle for the specified time (in milliseconds). Picocom is considered idle if: Nothing is read (received) from the serial port, AND there is nothing to write (send) to the serial port, AND nothing is read from the standard input (terminal). If <strong>--exit-after</strong> is set to zero, then picocom exits after opening and configuring the serial port, after sending the init string (if any, see option <strong>--initstring</strong>), and imediatelly when it becomes idle. When exiting after being idle, picocom drains the O/S serial port ouput buffer (i.e. waits for data already written to the port to be transmitted) and observes the <strong>--noreset</strong> setting as usual. (Default: not set).</p>
<p>NOTICE: If <strong>--exit-after</strong> is set, reading zero bytes from the standard input (which usually means that whatever was connected there has been closed), will <em>not</em> cause picocom to exit. Instead, picocom will keep running, <em>without</em> reading from stdin, and will exit only when it becomes idle for the specified time, or if it is killed by a signal. If <strong>--exit-after</strong> is <em>not</em> set, then reading zero bytes from the standard input causes picocom to exit, after the contents of its output queue have been transmitted.</p>
</dd>
<dt><strong>--exit</strong> | <strong>-X</strong></dt>
<dd><p>Exit picocom immediatelly after opening and configuring the serial port. Do <em>not</em> read <em>anything</em> from the standard input or from the serial port. When exiting the <strong>--noreset</strong> option is observed as usual. With <strong>--exit</strong> and <strong>--noreset</strong> picocom can be used as a crude replacement of <strong>stty(1)</strong>. If an init string is also given (see <strong>--initstring</strong> option), picocom exits imediatelly after sending (writing) the init string to the serial port. Again, nothing is read from the standard input, or from the serial port. The ouput map (see <strong>--omap</strong>), the local echo option (see <strong>--echo</strong>), and the local-echo map (see <strong>--emap</strong>) are observed when sending the init string. The <strong>--exit</strong> option, overrides the <strong>--exit-after</strong> option. (Default: Disabled)</p>
<dd><p>Exit picocom immediatelly after opening and configuring the serial port. Do <em>not</em> read <em>anything</em> from the standard input or from the serial port. When exiting the <strong>--noreset</strong> option is observed as usual. With <strong>--exit</strong> and <strong>--noreset</strong> picocom can be used as a very crude replacement of <strong>stty(1)</strong>. If an init string is also given (see <strong>--initstring</strong> option), picocom exits imediatelly after sending (writing) the init string to the serial port. In this case, before exiting, picocom drains the O/S serial port output buffer (i.e. waits for data written to the port to be transmitted). Again, nothing is read from the standard input, or from the serial port. The <strong>--exit</strong> option, overrides the <strong>--exit-after</strong> option. (Default: Disabled)</p>
</dd>
<dt><strong>--quiet</strong> | <strong>-q</strong></dt>
<dd><p>Forces picocom to be quiet. Suppresses the output of the initial status and options information, as well as any other information or messages not explicitly requested by the user. Responses to user commands and any error or warning messages are still printed.</p>
@ -211,12 +212,12 @@
<h1 id="exiting-picocom">EXITING PICOCOM</h1>
<p>This section summarizes the conditions under which picocom terminates its operation and what happens on each such condition:</p>
<ul>
<li><p>The exit command is seen in the standard input. That is, the escape character is seen (default <strong>[C-a]</strong>), followed by the exit command character (default: <strong>[C-x]</strong>). In this case: The contents of the output queue are discarded and the contents of the O/S serial port output buffer (data already written to the port) are drained (i.e. picocom waits for them to be transmitted). Then, if the <strong>--noreset</strong> option is <em>not</em> given, the serial port is reset to the settings it had when picocom started, and picocom exits. If <strong>--noreset</strong> is given, then picocom exits without reseting the serial port.</p></li>
<li><p>The quit command is seen in the standard input. That is, the escape character is seen (default <strong>[C-a]</strong>), followed by the quit command character (default: <strong>[C-q]</strong>). The behavior in this case is similar to that of the exit command, with one difference: The serial port is <em>not</em> reset to its original settings, regardless of the <strong>--noreset</strong> option.</p></li>
<li><p>The exit command is seen in the standard input. That is, the escape character is seen (default <strong>C-a</strong>), followed by the exit command character (default <strong>C-x</strong>). In this case: The contents of the output queue (data read from the standard input, but not yet written to the port) as well as the contents of the O/S serial port output buffer (data already written to the port, but not yet transmitted) are discarded (flushed). Then, if the <strong>--noreset</strong> option is <em>not</em> given, the serial port is reset to the settings it had when picocom started, and the modem control lines (typically DTR and RTS) are cleared (lowered), signaling a modem hangup. Picocom then exits. If <strong>--noreset</strong> is given, then picocom exits without reseting the serial port and without affecting the modem control lines.</p></li>
<li><p>The quit command is seen in the standard input. That is, the escape character is seen (default <strong>C-a</strong>), followed by the quit command character (default <strong>C-q</strong>). The behavior in this case is similar to that of the exit command, with one difference: Picocom behaves as if the <strong>--noreset</strong> option is given (regardless if it actualy is, or not).</p></li>
<li><p>The <strong>--exit</strong> option is given. See the documentation of this option for a description of what exactly happens in this case.</p></li>
<li><p>The <strong>--exit-after</strong> option is given. See the documentation of this option for a description of what exactly happens in this case.</p></li>
<li><p>Zero bytes are read from the standard input. This usually means that whatever was connected to picocom's standard input has been closed or, if a file was connected, that picocom has read up to the end of the file. In this case, if the <strong>--exit-after</strong> option is not given, picocom stops reading from the standard input, and keeps operating normally (i.e. writing to, and reading from, the serial port) until its output queue is emptied. When this happens, picocom waits for the O/S serial port output buffer to drain and then (subject to the <strong>--noreset</strong> option) resets the serial port to it's initial settings and exits. If the <strong>--exit-after</strong> option is given then, again, picocom stops reading from the standard input and continues operating normally but, in this case, it does so until it becomes idle for the specified amount of time. It then waits for the O/S serial port output buffer to drain and exits, observing the <strong>--noreset</strong> option as usual.</p></li>
<li><p>Picocom is killed by the TERM or INT signal. In this case picocom behaves as if it had received the exit command, that is: The contents of the output queue are discarded and the contents of the O/S serial port output buffer (data already written to the port) are drained (i.e. picocom waits for them to be transmitted). Then, if the <strong>--noreset</strong> option is <em>not</em> given, the serial port is reset to the settings it had when picocom started, and picocom exits. If <strong>--noreset</strong> is given, then picocom exits without reseting the serial port.</p></li>
<li><p>Zero bytes are read from the standard input. This usually means that whatever was connected to picocom's standard input has been closed or, if a file was connected, that picocom has read up to the end of the file. In this case, if the <strong>--exit-after</strong> option is <em>not</em> given, picocom stops reading from the standard input, and keeps operating normally (i.e. writing to, and reading from, the serial port) until its output queue is emptied. When this happens, picocom waits for the O/S serial port output buffer to drain and then (subject to the <strong>--noreset</strong> option) resets the serial port to it's initial settings, clears the modem-control lines, and exits. If the <strong>--exit-after</strong> option is given then, again, picocom stops reading from the standard input and continues operating normally but, in this case, it does so until it becomes idle for the specified amount of time. It then waits for the O/S serial port output buffer to drain and exits, observing the <strong>--noreset</strong> option as usual.</p></li>
<li><p>Picocom is killed by the TERM or INT signal. In this case picocom behaves as if it had received the exit command, that is: The contents of the output queue and the contents of the O/S serial port output buffer are discarded (flushed). Then, if the <strong>--noreset</strong> option is <em>not</em> given, the serial port is reset to the settings it had when picocom started, the modem control lines are cleared, and picocom exits. If <strong>--noreset</strong> is given, then picocom exits without reseting the serial port or affecting the modem control lines.</p></li>
</ul>
<h1 id="author">AUTHOR</h1>
<p>Written by Nick Patavalis <script type="text/javascript">

View File

@ -56,14 +56,17 @@ here.
**C-x**
: 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.
: Exit the program. If the **--noreset** option is *not* given, then
the serial port is reset to its original settings before exiting,
and the modem control lines (typically DTR and RTS) are cleared
(lowered) signaling a modem hangup; if **--noreset** is given,
then the serial port settings are not reset, and the modem control
lines remain unaffected.
**C-q**
: Quit the program _without_ resetting the serial port, regardless of
the **--noreset** option.
: Quit the program *without* resetting the serial port, exactly as
if the **--noreset** option was given.
**C-p**
@ -195,13 +198,14 @@ Picocom accepts the following command-line options.
: 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. (Default: **a**)
picocom enter command mode. See also the **--no-escape**
option. (Default: **a**)
**--no-escape** | **-n**
: Disables the escape character. Picocom will never enter
command-mode if this option is enabled. To exit picocom, either
close its standard input, or send it the TERM or INT
command-mode if this option is enabled. To exit picocom, you must
either close its standard input, or send it the TERM or INT
signal. (Default: Disabled).
**--echo** | **-c**
@ -213,24 +217,38 @@ Picocom accepts the following command-line options.
**--noinit** | **-i**
: If given, picocom 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 picocom 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.
(Default: Disabled)
: If given, picocom will not initialize, configure, or otherwise
meddle with the serial port at start-up. It will just open
it. This is useful, for example, for connecting picocom to
already-connected modems, or already configured ports without
terminating the connection, or altering their settings. If
required, serial port parameters can then be adjusted at run-time
by commands. See also the **--noreset** option. (Default:
Disabled)
**--noreset** | **-r**
: If given, picocom 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
picocom. Regardless whether the **--noreset** option is given, the
user can exit picocom 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. (Default: Disabled)
will just close the respective file descriptor and do nothing
more. The serial port settings will *not* be restored to their
original values and the modem-control lines will *not* be
affected. This is useful, for example, for leaving modems
connected when exiting picocom. Regardless whether the
**--noreset** option is given, the user can exit picocom using the
"Quit" command (instead of "Exit"), which never resets the serial
port (i.e makes picocom behave exactly as if **--noreset** was
given). If **--noreset** is given then "Quit" and "Exit" behave
essentially the same. (Default: Disabled)
NOTICE: Picocom will always set the HUPCL control bit of the
serial port, according to the **--noreset** option. If
**--noreset** is given, then HUPCL for the port is cleared, and
will remain so after exiting picocom. If **--noreset** is *not*
given, then HUPCL is set for the port, and will remain so after
exiting picocom. This is true, regardless of the way picocom
terminates (command, read zero-bytes from standard input, killed
by signal, fatal error, etc), and regardless of the **--noinit**
option.
**--nolock** | **-l**
@ -295,10 +313,10 @@ Picocom accepts the following command-line options.
port. The init string is sent exactly as if it was input at the
terminal. Sending the init string, picocom observes the **--omap**
output mapping, the **--echo** local-echo setting, and the
**-emap** local-echo mapping. This feature is useful, for example,
if the serial device needs some special magic strings to start
responding. Use **echo(1)** or **xxd(1)** to generate special
characters like a CR or binary data. Example:
**--emap** local-echo mapping. This feature is useful, for
example, if the serial device needs some special magic strings to
start responding. Use **echo(1)** or **xxd(1)** to generate
special characters like a CR or binary data. Example:
picocom -t "$(echo -e 'AAATZ\r\n')" /dev/ttyS0
@ -323,17 +341,19 @@ Picocom accepts the following command-line options.
: Exit picocom if it remains idle for the specified time (in
milliseconds). Picocom is considered idle if: Nothing is read
(received) from the serial port, AND there is nothing to write
(send) to the serial port, AND nothing is read from the
terminal. If **--exit-after** is set to zero, then picocom exits
after opening and configuring the serial port, after sending the
init string (if any, see option **--initstring**), and imediatelly
when it becomes idle. When exiting after being idle, picocom
observes the **--noreset** setting as usual. (Default: not set).
(send) to the serial port, AND nothing is read from the standard
input (terminal). If **--exit-after** is set to zero, then picocom
exits after opening and configuring the serial port, after sending
the init string (if any, see option **--initstring**), and
imediatelly when it becomes idle. When exiting after being idle,
picocom drains the O/S serial port ouput buffer (i.e. waits for
data already written to the port to be transmitted) and observes
the **--noreset** setting as usual. (Default: not set).
NOTICE: If **--exit-after** is set, reading zero bytes from the
standard input (which usually means that whatever was connected
there has been closed), will *not* cause picocom to exit. Instead,
picocom will keep running, without reading from stdin, and will
picocom will keep running, *without* reading from stdin, and will
exit only when it becomes idle for the specified time, or if it is
killed by a signal. If **--exit-after** is *not* set, then reading
zero bytes from the standard input causes picocom to exit, after
@ -345,14 +365,14 @@ Picocom accepts the following command-line options.
serial port. Do *not* read *anything* from the standard input or
from the serial port. When exiting the **--noreset** option is
observed as usual. With **--exit** and **--noreset** picocom can
be used as a crude replacement of **stty(1)**. If an init string
is also given (see **--initstring** option), picocom exits
be used as a very crude replacement of **stty(1)**. If an init
string is also given (see **--initstring** option), picocom exits
imediatelly after sending (writing) the init string to the serial
port. Again, nothing is read from the standard input, or from the
serial port. The ouput map (see **--omap**), the local echo
option (see **--echo**), and the local-echo map (see **--emap**)
are observed when sending the init string. The **--exit** option,
overrides the **--exit-after** option. (Default: Disabled)
port. In this case, before exiting, picocom drains the O/S serial
port output buffer (i.e. waits for data written to the port to be
transmitted). Again, nothing is read from the standard input, or
from the serial port. The **--exit** option, overrides the
**--exit-after** option. (Default: Disabled)
**--quiet** | **-q**
@ -495,22 +515,24 @@ This section summarizes the conditions under which picocom terminates
its operation and what happens on each such condition:
- The exit command is seen in the standard input. That is, the escape
character is seen (default **[C-a]**), followed by the exit command
character (default: **[C-x]**). In this case: The contents of the
output queue are discarded and the contents of the O/S serial port
output buffer (data already written to the port) are drained
(i.e. picocom waits for them to be transmitted). Then, if the
**--noreset** option is *not* given, the serial port is reset to the
settings it had when picocom started, and picocom exits. If
character is seen (default **C-a**), followed by the exit command
character (default **C-x**). In this case: The contents of the
output queue (data read from the standard input, but not yet written
to the port) as well as the contents of the O/S serial port output
buffer (data already written to the port, but not yet transmitted)
are discarded (flushed). Then, if the **--noreset** option is *not*
given, the serial port is reset to the settings it had when picocom
started, and the modem control lines (typically DTR and RTS) are
cleared (lowered), signaling a modem hangup. Picocom then exits. If
**--noreset** is given, then picocom exits without reseting the
serial port.
serial port and without affecting the modem control lines.
- The quit command is seen in the standard input. That is, the escape
character is seen (default **[C-a]**), followed by the quit command
character (default: **[C-q]**). The behavior in this case is similar
to that of the exit command, with one difference: The serial port is
*not* reset to its original settings, regardless of the
**--noreset** option.
character is seen (default **C-a**), followed by the quit command
character (default **C-q**). The behavior in this case is similar to
that of the exit command, with one difference: Picocom behaves as if
the **--noreset** option is given (regardless if it actualy is, or
not).
- The **--exit** option is given. See the documentation of this option
for a description of what exactly happens in this case.
@ -521,28 +543,27 @@ its operation and what happens on each such condition:
- Zero bytes are read from the standard input. This usually means that
whatever was connected to picocom's standard input has been closed
or, if a file was connected, that picocom has read up to the end of
the file. In this case, if the **--exit-after** option is not given,
picocom stops reading from the standard input, and keeps operating
normally (i.e. writing to, and reading from, the serial port) until
its output queue is emptied. When this happens, picocom waits for
the O/S serial port output buffer to drain and then (subject to the
**--noreset** option) resets the serial port to it's initial
settings and exits. If the **--exit-after** option is given then,
again, picocom stops reading from the standard input and continues
operating normally but, in this case, it does so until it becomes
idle for the specified amount of time. It then waits for the O/S
serial port output buffer to drain and exits, observing the
**--noreset** option as usual.
the file. In this case, if the **--exit-after** option is *not*
given, picocom stops reading from the standard input, and keeps
operating normally (i.e. writing to, and reading from, the serial
port) until its output queue is emptied. When this happens, picocom
waits for the O/S serial port output buffer to drain and then
(subject to the **--noreset** option) resets the serial port to it's
initial settings, clears the modem-control lines, and exits. If the
**--exit-after** option is given then, again, picocom stops reading
from the standard input and continues operating normally but, in
this case, it does so until it becomes idle for the specified amount
of time. It then waits for the O/S serial port output buffer to
drain and exits, observing the **--noreset** option as usual.
- Picocom is killed by the TERM or INT signal. In this case picocom
behaves as if it had received the exit command, that is: The
contents of the output queue are discarded and the contents of the
O/S serial port output buffer (data already written to the port) are
drained (i.e. picocom waits for them to be transmitted). Then, if
the **--noreset** option is *not* given, the serial port is reset to
the settings it had when picocom started, and picocom exits. If
**--noreset** is given, then picocom exits without reseting the
serial port.
contents of the output queue and the contents of the O/S serial port
output buffer are discarded (flushed). Then, if the **--noreset**
option is *not* given, the serial port is reset to the settings it
had when picocom started, the modem control lines are cleared, and
picocom exits. If **--noreset** is given, then picocom exits without
reseting the serial port or affecting the modem control lines.
# AUTHOR

Binary file not shown.