mirror of
https://github.com/UzixLS/picocom.git
synced 2025-07-19 07:21:18 +03:00
Regenerated documentation
This commit is contained in:
@ -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 "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 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 "raw" 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 "command mode" and waits for the next character (which is called the "function character"). 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 "raw" 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 "command mode" and waits for the next character (which is called the "function character"). 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 "$(echo -e '\r\nATZ\r\n')" /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">
|
||||
<!--
|
||||
|
Reference in New Issue
Block a user