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

Regenerated documentation

This commit is contained in:
Nick Patavalis
2017-12-16 20:15:54 +02:00
parent 9c21667903
commit cea5f644c7
3 changed files with 139 additions and 19 deletions

133
picocom.1
View File

@ -1,6 +1,6 @@
.\" Automatically generated by Pandoc 1.16.0.2
.\"
.TH "PICOCOM" "1" "2017-12-14" "Picocom 2.3a" "User Commands"
.TH "PICOCOM" "1" "2017-12-16" "Picocom 2.3a" "User Commands"
.hy
.SH NAME
.PP
@ -20,17 +20,17 @@ program to allow access to all types of devices that provide serial
consoles.
It could also prove useful in many other similar tasks.
.PP
When picocom starts it opens the terminal (serial device) given as its
When picocom starts it opens the tty (serial port) given as its
non\-option argument.
Unless the \f[B]\-\-noinit\f[] option is given, it configures the device
Unless the \f[B]\-\-noinit\f[] option is given, it configures the port
to the settings specified by the option\-arguments (or to some default
settings), and sets it to "raw" mode.
If \f[B]\-\-noinit\f[] is given, the initialization and configuration is
skipped; the device is just opened.
Following this, picocom 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.
skipped; the port is just opened.
Following this, if standard input is a tty, picocom sets the tty to raw
mode.
Then 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.
Picocom also scans its input stream for a user\-specified control
@ -239,6 +239,15 @@ command mode.
.RS
.RE
.TP
.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.
(Default: Disabled).
.RS
.RE
.TP
.B \f[B]\-\-echo\f[] | \f[B]\-c\f[]
Enable local echo.
Every character being read from the terminal (standard input) is echoed
@ -352,9 +361,10 @@ If local\-echo mode is is enabled (see \f[B]\-\-echo\f[] option and
.TP
.B \f[B]\-\-initstring\f[] | \f[B]\-t\f[]
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, and
thus obeys the \f[B]\-\-omap\f[] output mapping, the \f[B]\-\-echo\f[]
local\-echo setting, and the \f[B]\-emap\f[] local\-echo mapping.
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.
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
@ -389,7 +399,7 @@ Only supported in Linux and OSX.
.RE
.TP
.B \f[B]\-\-exit\-aftrer\f[] | \f[B]\-x\f[]
Exit picocom after remaining idle for the specified time (in
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,
@ -398,10 +408,40 @@ 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 with \f[B]\-\-exit\-after\f[], picocom observes the
\f[B]\-\-noreset\f[] setting as usual.
When exiting after being idle, picocom 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.
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.
.RE
.TP
.B \f[B]\-\-exit\f[] | \f[B]\-X\f[]
Exit picocom immediatelly after opening and configuring the serial port.
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[].
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.
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)
.RS
.RE
.TP
.B \f[B]\-\-quiet\f[] | \f[B]\-q\f[]
@ -416,7 +456,7 @@ printed.
.TP
.B \f[B]\-\-help\f[] | \f[B]\-h\f[]
Print a short help message describing the command\-line options.
Picocom\[aq]s version, ompile\-time options, and enabled features are
Picocom\[aq]s version, compile\-time options, and enabled features are
also shown.
.RS
.RE
@ -581,6 +621,69 @@ with DEL.
.IP \[bu] 2
Replace every CR character with CR and LF when echoing to the terminal
(if local\-echo is enabled).
.SH EXITING PICOCOM
.PP
This section summarizes the conditions under which picocom terminates
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).
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.
If \f[B]\-\-noreset\f[] is given, then picocom exits without reseting
the serial port.
.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[]).
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.
.IP \[bu] 2
The \f[B]\-\-exit\f[] option is given.
See the documentation of this option for a description of what exactly
happens in this case.
.IP \[bu] 2
The \f[B]\-\-exit\-after\f[] option is given.
See the documentation of this option for a description of what exactly
happens in this case.
.IP \[bu] 2
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.
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.
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
amount of time.
It then waits for the O/S serial port output buffer to drain and exits,
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).
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.
If \f[B]\-\-noreset\f[] is given, then picocom exits without reseting
the serial port.
.SH AUTHOR
.PP
Written by Nick Patavalis <npat@efault.net>

View File

@ -19,7 +19,7 @@
<p><strong>picocom</strong> [ <em>options</em> ] <em>device</em></p>
<h1 id="description">DESCRIPTION</h1>
<p>As its name suggests, <strong>picocom(1)</strong> is a minimal dumb-terminal emulation program. It is, in principle, very much like <strong>minicom(1)</strong>, only it's &quot;pico&quot; instead of &quot;mini&quot;! 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 serial communications program to allow access to all types of devices that provide serial consoles. It could also prove useful in many other similar tasks.</p>
<p>When picocom starts it opens the terminal (serial device) given as its non-option argument. Unless the <strong>--noinit</strong> option is given, it configures the device to the settings specified by the option-arguments (or to some default settings), and sets it to &quot;raw&quot; mode. If <strong>--noinit</strong> is given, the initialization and configuration is skipped; the device is just opened. Following this, picocom 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. Picocom also scans its input stream for a user-specified control character, called the <em>escape character</em> (being by default <strong>C-a</strong>). If the escape character is seen, then instead of sending it to the serial-device, the program enters &quot;command mode&quot; and waits for the next character (which is called the &quot;function character&quot;). Depending on the value of the function character, picocom performs one of the operations described in the <strong><a href="#commands">COMMANDS</a></strong> section below.</p>
<p>When picocom starts it opens the tty (serial port) given as its non-option argument. Unless the <strong>--noinit</strong> option is given, it configures the port to the settings specified by the option-arguments (or to some default settings), and sets it to &quot;raw&quot; mode. If <strong>--noinit</strong> is given, the initialization and configuration is skipped; the port is just opened. Following this, if standard input is a tty, picocom sets the tty to raw mode. Then 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. Picocom also scans its input stream for a user-specified control character, called the <em>escape character</em> (being by default <strong>C-a</strong>). If the escape character is seen, then instead of sending it to the serial-device, the program enters &quot;command mode&quot; and waits for the next character (which is called the &quot;function character&quot;). Depending on the value of the function character, picocom performs one of the operations described in the <strong><a href="#commands">COMMANDS</a></strong> section below.</p>
<h1 id="commands">COMMANDS</h1>
<p>Commands are given to picocom by first keying the <em>espace character</em> which by default is <strong>C-a</strong> (see <strong><a href="#options">OPTIONS</a></strong> below for how to change it), and then keying one of the function (command) characters shown here.</p>
<dl>
@ -107,6 +107,9 @@
<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>
<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>
<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>
@ -138,7 +141,7 @@
<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, and thus obeys 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>
<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>
<p>Note, that the init string is not sent if <strong>--noinit</strong> is set. (Default: empty).</p>
</dd>
@ -149,13 +152,17 @@
<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 after remaining 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 with <strong>--exit-after</strong>, picocom observes the <strong>--noreset</strong> setting as usual. (Default: not set).</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 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>
<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>
<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>
</dd>
<dt><strong>--help</strong> | <strong>-h</strong></dt>
<dd><p>Print a short help message describing the command-line options. Picocom's version, ompile-time options, and enabled features are also shown.</p>
<dd><p>Print a short help message describing the command-line options. Picocom's version, compile-time options, and enabled features are also shown.</p>
</dd>
</dl>
<h1 id="display-of-options-and-port-settings">DISPLAY OF OPTIONS AND PORT SETTINGS</h1>
@ -201,6 +208,16 @@
<li><p>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.</p></li>
<li><p>Replace every CR character with CR and LF when echoing to the terminal (if local-echo is enabled).</p></li>
</ul>
<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 <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>
</ul>
<h1 id="author">AUTHOR</h1>
<p>Written by Nick Patavalis <script type="text/javascript">
<!--

Binary file not shown.