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-21 15:36:07 +02:00
parent 26522309a3
commit a35a9cb1b7
5 changed files with 200 additions and 149 deletions

View File

@ -65,7 +65,7 @@ doc : picocom.1.html picocom.1 picocom.1.pdf
picocom.1 : picocom.1.md
sed 's/\*\*\[/\*\*/g;s/\]\*\*/\*\*/g' $? \
| pandoc -s -t man \
-Vfooter="Picocom $(VERSION)" -Vdate="`date -I`" \
-Vfooter="Picocom $(VERSION)" -Vdate="`date -I`" \
-Vadjusting='l' \
-Vhyphenate='' \
-o $@
@ -74,9 +74,9 @@ picocom.1.html : picocom.1.md
pandoc -s -t html \
--template ~/.pandoc/tmpl/manpage.html \
-c ~/.pandoc/css/normalize-noforms.css \
-c ~/.pandoc/css/manpage.css \
--self-contained \
-Vversion="v$(VERSION)" -Vdate="`date -I`" \
-c ~/.pandoc/css/manpage.css \
--self-contained \
-Vversion="v$(VERSION)" -Vdate="`date -I`" \
-o $@ $?
picocom.1.pdf : picocom.1

136
picocom.1
View File

@ -1,7 +1,8 @@
.\" Automatically generated by Pandoc 1.16.0.2
.\"
.TH "PICOCOM" "1" "2017-12-20" "Picocom 2.3a" "User Commands"
.hy
.ad l
.TH "PICOCOM" "1" "2017-12-21" "Picocom 3.0a" "User Commands"
.nh \" Turn off hyphenation by default.
.SH NAME
.PP
picocom \- minimal dumb\-terminal emulation program
@ -62,15 +63,24 @@ 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.
signaling a modem hangup.
If \f[B]\-\-noreset\f[] is given (and \f[B]\-\-hangup\f[] is not), then
the serial port settings are not reset, and the modem control lines
remain unaffected.
If both \f[B]\-\-noreset\f[] and \f[B]\-\-hangup\f[] are given, then the
serial port settings are not reset, but the modem\-control lines
\f[I]are\f[] cleared.
.RS
.RE
.TP
.B \f[B]C\-q\f[]
Quit the program \f[I]without\f[] resetting the serial port, exactly as
Quit the program \f[I]without\f[] resetting the serial port to its
original settings.
Terminating with the Quit command, picocom behaves \f[I]exactly\f[] as
if the \f[B]\-\-noreset\f[] option was given.
The serial port is \f[I]not\f[] reset to its original settings, and the
modem control lines remain unaffected or are cleared, subject to the
\f[B]\-\-hangup\f[] option.
.RS
.RE
.TP
@ -246,9 +256,9 @@ See also the \f[B]\-\-no\-escape\f[] option.
.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, you must either close its standard input, or send it
the TERM or INT signal.
Picocom will never enter command\-mode if this option is given.
To exit picocom, in this case, you must either close its standard input,
or send it the TERM or INT signal.
(Default: Disabled).
.RS
.RE
@ -263,15 +273,15 @@ configuration (see \f[B]\-\-emap\f[] option).
.RE
.TP
.B \f[B]\-\-noinit\f[] | \f[B]\-i\f[]
If given, picocom will not initialize, configure, or otherwise meddle
with the serial port at start\-up.
If given, picocom will not initialize, configure, or otherwise mess 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 \f[B]\-\-noreset\f[] option.
See also the \f[B]\-\-noreset\f[] and \f[B]\-\-hangup\f[] options.
(Default: Disabled)
.RS
.RE
@ -280,29 +290,43 @@ See also the \f[B]\-\-noreset\f[] option.
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 \f[I]not\f[] be restored to their original
values and the modem\-control lines will \f[I]not\f[] be affected.
values and, unless the \f[B]\-\-hangup\f[] option is also given, 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 (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.
makes picocom behave \f[I]exactly\f[] as if \f[B]\-\-noreset\f[] was
given.
See also the \f[B]\-\-hangup\f[] option.
(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.
port, according to the \f[B]\-\-noreset\f[] and \f[B]\-\-hangup\f[]
options.
If \f[B]\-\-noreset\f[] is given and \f[B]\-\-hangup\f[] is not, 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, or if both
\f[B]\-\-noreset\f[] and \f[B]\-\-hangup\f[] are 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]\-\-hangup\f[] | \f[B]\-u\f[]
If given together with \f[B]\-\-noreset\f[], picocom will not reset the
serial port to it\[aq]s original settings on exit, but it \f[I]will\f[]
clear the modem control lines (typically DTR and RTS) to signal a modem
hangup.
Without the \f[B]\-\-noreset\f[] option (explicitly given, or implied by
extiting with the "Quit" command) \f[B]\-\-hangup\f[] has no effect
(without \f[B]\-\-noreset\f[] picocom always clears the modem control
lines on exit, anyway).
.RS
.RE
.TP
.B \f[B]\-\-nolock\f[] | \f[B]\-l\f[]
If given, picocom will \f[I]not\f[] attempt to lock the serial port
before opening it.
@ -393,11 +417,11 @@ Example:
.IP
.nf
\f[C]
picocom\ \-t\ "$(echo\ \-e\ \[aq]AAATZ\\r\\n\[aq])"\ /dev/ttyS0
picocom\ \-t\ "$(echo\ \-ne\ \[aq]AAATZ\\r\\n\[aq])"\ /dev/ttyS0
\f[]
.fi
.PP
Note, that the init string is not sent if \f[B]\-\-noinit\f[] is set.
Note, that the init string is not sent if \f[B]\-\-noinit\f[] is given.
(Default: empty).
.RE
.TP
@ -425,12 +449,13 @@ serial port, AND there is nothing to write (send) to the serial port,
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
(if any, see option \f[B]\-\-initstring\f[]) 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 \f[B]\-\-noreset\f[] setting as usual.
observes the \f[B]\-\-noreset\f[] and \f[B]\-\-hangup\f[] options as
usual.
(Default: not set).
.RS
.PP
@ -449,15 +474,15 @@ its output queue have been transmitted.
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
very crude replacement of \f[B]stty(1)\f[].
When exiting the \f[B]\-\-noreset\f[] and \f[B]\-\-hangup\f[] options
are observed as usual.
With \f[B]\-\-exit\f[] and \f[B]\-\-noreset\f[] (and possibly
\f[B]\-\-hangup\f[]) picocom can be used as a 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).
serial port and draining the O/S serial port output buffer (i.e.
waiting for data written to the port to be transmitted).
Again, nothing is read from the standard input, or from the serial port.
The \f[B]\-\-exit\f[] option, overrides the \f[B]\-\-exit\-after\f[]
option.
@ -644,8 +669,8 @@ 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:
This section summarizes the conditions in which picocom terminates its
operation and what happens in 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
@ -654,13 +679,10 @@ 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
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 and without affecting the modem control lines.
Then the serial port is reset to it\[aq]s original settings, and the
modem\-control lines are cleared signaling a modem reset, subject to the
\f[B]\-\-noreset\f[] and the \f[B]\-\-hangup\f[] options.
After that picocom exits with a success status.
.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
@ -672,40 +694,40 @@ given (regardless if it actualy is, or not).
The \f[B]\-\-exit\f[] option is given.
See the documentation of this option for a description of what exactly
happens in this case.
Picocom exits with a success exit status.
.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.
Picocom exits with a success exit status.
.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
input has been closed or, if a file was connected, then picocom has read
up to the end of the file.
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.
writing to, and reading from, the serial port) until its output queue
empties.
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, clears the modem\-control
lines, and exits.
to drain and then (subject to the \f[B]\-\-noreset\f[] and
\f[B]\-\-hangup\f[] options) resets 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
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.
amount of time, before exiting.
Picocom exits with a success exit status.
.IP \[bu] 2
Picocom is killed by the TERM or INT signal.
Picocom is killed by the TERM or INT signal, or an unrecoverable error
occurs.
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 \f[B]\-\-noreset\f[] option is \f[I]not\f[] given, the
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 or affecting the modem control lines.
Then, subject to the \f[B]\-\-noreset\f[] and \f[B]\-\-hangup\f[]
options, the serial port is reset to its original settings, the modem
control lines are cleared, and picocom exits with a failure status.
.SH AUTHOR
.PP
Written by Nick Patavalis <npat@efault.net>

View File

@ -7,11 +7,11 @@
<title>PICOCOM(1)</title>
<style type="text/css">code{white-space: pre;}</style>
<link href="data:text/css;charset=utf-8,%0A%0Ahtml%20%7B%0Afont%2Dfamily%3A%20sans%2Dserif%3B%20%0A%2Dms%2Dtext%2Dsize%2Dadjust%3A%20100%25%3B%20%0A%2Dwebkit%2Dtext%2Dsize%2Dadjust%3A%20100%25%3B%20%0A%7D%0A%0Abody%20%7B%0Amargin%3A%200%3B%0A%7D%0A%0A%0Aarticle%2C%0Aaside%2C%0Adetails%2C%0Afigcaption%2C%0Afigure%2C%0Afooter%2C%0Aheader%2C%0Ahgroup%2C%0Amain%2C%0Amenu%2C%0Anav%2C%0Asection%2C%0Asummary%20%7B%0Adisplay%3A%20block%3B%0A%7D%0A%0Aaudio%2C%0Acanvas%2C%0Aprogress%2C%0Avideo%20%7B%0Adisplay%3A%20inline%2Dblock%3B%20%0Avertical%2Dalign%3A%20baseline%3B%20%0A%7D%0A%0Aaudio%3Anot%28%5Bcontrols%5D%29%20%7B%0Adisplay%3A%20none%3B%0Aheight%3A%200%3B%0A%7D%0A%0A%5Bhidden%5D%2C%0Atemplate%20%7B%0Adisplay%3A%20none%3B%0A%7D%0A%0A%0Aa%20%7B%0Abackground%2Dcolor%3A%20transparent%3B%0A%7D%0A%0Aa%3Aactive%2C%0Aa%3Ahover%20%7B%0Aoutline%3A%200%3B%0A%7D%0A%0A%0Aabbr%5Btitle%5D%20%7B%0Aborder%2Dbottom%3A%201px%20dotted%3B%0A%7D%0A%0Ab%2C%0Astrong%20%7B%0Afont%2Dweight%3A%20bold%3B%0A%7D%0A%0Adfn%20%7B%0Afont%2Dstyle%3A%20italic%3B%0A%7D%0A%0Ah1%20%7B%0Afont%2Dsize%3A%202em%3B%0Amargin%3A%200%2E67em%200%3B%0A%7D%0A%0Amark%20%7B%0Abackground%3A%20%23ff0%3B%0Acolor%3A%20%23000%3B%0A%7D%0A%0Asmall%20%7B%0Afont%2Dsize%3A%2080%25%3B%0A%7D%0A%0Asub%2C%0Asup%20%7B%0Afont%2Dsize%3A%2075%25%3B%0Aline%2Dheight%3A%200%3B%0Aposition%3A%20relative%3B%0Avertical%2Dalign%3A%20baseline%3B%0A%7D%0Asup%20%7B%0Atop%3A%20%2D0%2E5em%3B%0A%7D%0Asub%20%7B%0Abottom%3A%20%2D0%2E25em%3B%0A%7D%0A%0A%0Aimg%20%7B%0Aborder%3A%200%3B%0A%7D%0A%0Asvg%3Anot%28%3Aroot%29%20%7B%0Aoverflow%3A%20hidden%3B%0A%7D%0A%0A%0Afigure%20%7B%0Amargin%3A%201em%2040px%3B%0A%7D%0A%0Ahr%20%7B%0A%2Dmoz%2Dbox%2Dsizing%3A%20content%2Dbox%3B%0Abox%2Dsizing%3A%20content%2Dbox%3B%0Aheight%3A%200%3B%0A%7D%0A%0Apre%20%7B%0Aoverflow%3A%20auto%3B%0A%7D%0A%0Acode%2C%0Akbd%2C%0Apre%2C%0Asamp%20%7B%0Afont%2Dfamily%3A%20monospace%2C%20monospace%3B%0Afont%2Dsize%3A%201em%3B%0A%7D%0A%0A%0Atable%20%7B%0Aborder%2Dcollapse%3A%20collapse%3B%0Aborder%2Dspacing%3A%200%3B%0A%7D%0Atd%2C%0Ath%20%7B%0Apadding%3A%200%3B%0A%7D%0A" rel="stylesheet" type="text/css" />
<link href="data:text/css;charset=utf-8,%0Ahtml%20%7B%0Abackground%3A%20%23cccccc%3B%0A%7D%0Abody%20%7B%0Afont%2Dfamily%3A%20%22Open%20Sans%22%2C%20sans%2Dserif%3B%0Amax%2Dwidth%3A45em%3B%0Apadding%3A%201em%203em%201em%203em%3B%0Amargin%3A%201em%203em%201em%203em%3B%0Abackground%3A%20%23ffffff%3B%0A%7D%0Apre%2Ccode%2Ckbd%2Csamp%2Ctt%20%7B%0Afont%2Dfamily%3A%20%22Inconsolata%22%2C%20monospace%3B%0A%7D%0Ap%2Cpre%20%7B%0Amargin%2Dtop%3A%2E5em%3B%0Amargin%2Dbottom%3A%2E5em%3B%0A%7D%0Apre%2Cblockquote%20%7B%0Aborder%3A1px%20solid%20%23ddd%3B%0Abackground%2Dcolor%3A%23f1f1f1%3B%0A%2Dwebkit%2Dborder%2Dradius%3A6px%3B%0A%2Dmoz%2Dborder%2Dradius%3A6px%3B%0Aborder%2Dradius%3A6px%3B%0Apadding%3A10px%3B%0A%7D%0Ablockquote%20%7B%0Amargin%3A1em%202%2E5em%3B%0A%7D%0Apre%20%7B%0Amargin%2Dtop%3A%201em%3B%0Amargin%2Dbottom%3A%201em%3B%0A%7D%0Acode%20%7B%0Acolor%3A%2320639b%3B%0Abackground%3A%23f1f1f1%3B%0A%7D%0Aa%20%7B%0Acolor%3A%20blue%3B%0A%7D%0Aa%3Avisited%20%7B%0Acolor%3A%20darkblue%3B%0A%7D%0Ah1%2Ch2%2Ch3%2Ch4%2Ch5%2Ch6%20%7B%0Afont%2Dweight%3A%20bold%3B%0Acolor%3A%20%2320639b%3B%0Amargin%3A%201em%200%3B%0A%7D%0Ah1%20%7B%0Afont%2Dsize%3A140%25%3B%0Aborder%2Dbottom%3A2px%20dotted%20%23ddd%3B%0A%7D%0Ah2%20%7B%0Afont%2Dsize%3A120%25%3B%0A%7D%0Ah3%20%7B%0Afont%2Dsize%3A110%25%3B%0A%7D%0Ah4%20%7B%0Afont%2Dsize%3A100%25%3B%0A%7D%0Ah5%20%7B%0Afont%2Dsize%3A95%25%3B%0A%7D%0Ah6%20%7B%0Afont%2Dsize%3A90%25%3B%0Acolor%3A%23999%3B%0A%7D%0Aol%2Cul%20%7B%0Alist%2Dstyle%3Anone%3B%0Apadding%3A%200%3B%0Amargin%3A1em%3B%0Amargin%2Dleft%3A2em%3B%0A%7D%0Aol%20%7B%0Alist%2Dstyle%3Adecimal%20outside%3B%0A%7D%0Aul%20%7B%0Alist%2Dstyle%3Adisc%20outside%3B%0A%7D%0Adl%20%7B%0Amargin%3A0%200%201%2E125em%3B%0A%7D%0Adl%20dd%20%7B%0Amargin%2Dleft%3A2em%3B%0A%7D%0Adt%20%7B%0Aline%2Dheight%3A1%2E125em%3B%0A%7D%0A%0Aol%5Btype%3D1%5D%20%7B%0Alist%2Dstyle%2Dtype%3Adecimal%3B%0A%7D%0Aol%5Btype%3Da%5D%20%7B%0Alist%2Dstyle%2Dtype%3Alower%2Dalpha%3B%0A%7D%0Aol%5Btype%3DA%5D%20%7B%0Alist%2Dstyle%2Dtype%3Aupper%2Dalpha%3B%0A%7D%0Aol%5Btype%3DI%5D%20%7B%0Alist%2Dstyle%2Dtype%3Aupper%2Droman%3B%0A%7D%0Aol%5Btype%3Di%5D%20%7B%0Alist%2Dstyle%2Dtype%3Alower%2Droman%3B%0A%7D%0A" rel="stylesheet" type="text/css" />
<link href="data:text/css;charset=utf-8,%0Ahtml%20%7B%0Abackground%3A%20%23cccccc%3B%0A%7D%0Abody%20%7B%0Afont%2Dfamily%3A%20%22Open%20Sans%22%2C%20sans%2Dserif%3B%0Amax%2Dwidth%3A45em%3B%0Apadding%3A%201em%203em%201em%203em%3B%0Amargin%3A%201em%203em%201em%203em%3B%0Abackground%3A%20%23ffffff%3B%0A%7D%0Apre%2Ccode%2Ckbd%2Csamp%2Ctt%20%7B%0Afont%2Dfamily%3A%20%22Inconsolata%22%2C%20monospace%3B%0A%7D%0Ap%2Cpre%20%7B%0Amargin%2Dtop%3A%2E5em%3B%0Amargin%2Dbottom%3A%2E5em%3B%0A%7D%0Apre%2Cblockquote%20%7B%0Aborder%3A1px%20solid%20%23ddd%3B%0Abackground%2Dcolor%3A%23f1f1f1%3B%0A%2Dwebkit%2Dborder%2Dradius%3A6px%3B%0A%2Dmoz%2Dborder%2Dradius%3A6px%3B%0Aborder%2Dradius%3A6px%3B%0Apadding%3A10px%3B%0A%7D%0Ablockquote%20%7B%0Amargin%3A1em%202%2E5em%3B%0A%7D%0Apre%20%7B%0Amargin%2Dtop%3A%201em%3B%0Amargin%2Dbottom%3A%201em%3B%0A%7D%0Acode%20%7B%0Acolor%3A%2320639b%3B%0Abackground%3A%23f1f1f1%3B%0A%7D%0Aa%20%7B%0Acolor%3A%20blue%3B%0A%7D%0Aa%3Avisited%20%7B%0Acolor%3A%20darkblue%3B%0A%7D%0Ah1%2Ch2%2Ch3%2Ch4%2Ch5%2Ch6%20%7B%0Afont%2Dweight%3A%20bold%3B%0Acolor%3A%20%2320639b%3B%0Amargin%3A%201em%200%3B%0A%7D%0Ah1%20%7B%0Afont%2Dsize%3A140%25%3B%0Aborder%2Dbottom%3A2px%20dotted%20%23ddd%3B%0A%7D%0Ah2%20%7B%0Afont%2Dsize%3A120%25%3B%0A%7D%0Ah3%20%7B%0Afont%2Dsize%3A110%25%3B%0A%7D%0Ah4%20%7B%0Afont%2Dsize%3A100%25%3B%0A%7D%0Ah5%20%7B%0Afont%2Dsize%3A95%25%3B%0A%7D%0Ah6%20%7B%0Afont%2Dsize%3A90%25%3B%0Acolor%3A%23999%3B%0A%7D%0Adiv%23pgname%20%7B%0Adisplay%3Ainline%2Dblock%3B%0Awidth%3A50%25%0A%7D%0Adiv%23version%20%7B%0Adisplay%3Ainline%2Dblock%3B%0Awidth%3A50%25%3B%0Atext%2Dalign%3Aright%3B%0Afont%2Dsize%3A65%25%3B%0A%7D%0Aol%2Cul%20%7B%0Alist%2Dstyle%3Anone%3B%0Apadding%3A%200%3B%0Amargin%3A1em%3B%0Amargin%2Dleft%3A2em%3B%0A%7D%0Aol%20%7B%0Alist%2Dstyle%3Adecimal%20outside%3B%0A%7D%0Aul%20%7B%0Alist%2Dstyle%3Adisc%20outside%3B%0A%7D%0Adl%20%7B%0Amargin%3A0%200%201%2E125em%3B%0A%7D%0Adl%20dd%20%7B%0Amargin%2Dleft%3A2em%3B%0A%7D%0Adt%20%7B%0Aline%2Dheight%3A1%2E125em%3B%0A%7D%0A%0Aol%5Btype%3D1%5D%20%7B%0Alist%2Dstyle%2Dtype%3Adecimal%3B%0A%7D%0Aol%5Btype%3Da%5D%20%7B%0Alist%2Dstyle%2Dtype%3Alower%2Dalpha%3B%0A%7D%0Aol%5Btype%3DA%5D%20%7B%0Alist%2Dstyle%2Dtype%3Aupper%2Dalpha%3B%0A%7D%0Aol%5Btype%3DI%5D%20%7B%0Alist%2Dstyle%2Dtype%3Aupper%2Droman%3B%0A%7D%0Aol%5Btype%3Di%5D%20%7B%0Alist%2Dstyle%2Dtype%3Alower%2Droman%3B%0A%7D%0A" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="header">
<h1 class="title">PICOCOM(1)</h1>
<h1 class="title"><div id="pgname">PICOCOM(1)</div><div id="version">v3.0a / 2017-12-21</div></h1>
</div>
<h1 id="name">NAME</h1>
<p>picocom - minimal dumb-terminal emulation program</p>
@ -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 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><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 (and <strong>--hangup</strong> is not), then the serial port settings are not reset, and the modem control lines remain unaffected. If both <strong>--noreset</strong> and <strong>--hangup</strong> are given, then the serial port settings are not reset, but the modem-control lines <em>are</em> cleared.</p>
</dd>
<dt><strong>C-q</strong></dt>
<dd><p>Quit the program <em>without</em> resetting the serial port, exactly as if the <strong>--noreset</strong> option was given.</p>
<dd><p>Quit the program <em>without</em> resetting the serial port to its original settings. Terminating with the Quit command, picocom behaves <em>exactly</em> as if the <strong>--noreset</strong> option was given. The serial port is <em>not</em> reset to its original settings, and the modem control lines remain unaffected or are cleared, subject to the <strong>--hangup</strong> option.</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>
@ -108,17 +108,20 @@
<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, you must 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 given. To exit picocom, in this case, 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, 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><p>If given, picocom will not initialize, configure, or otherwise mess 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> and <strong>--hangup</strong> options. (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 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><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, unless the <strong>--hangup</strong> option is also given, 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 makes picocom behave <em>exactly</em> as if <strong>--noreset</strong> was given. See also the <strong>--hangup</strong> option. (Default: Disabled)</p>
<p>NOTICE: Picocom will always set the HUPCL control bit of the serial port, according to the <strong>--noreset</strong> and <strong>--hangup</strong> options. If <strong>--noreset</strong> is given and <strong>--hangup</strong> is not, then HUPCL for the port is cleared and will remain so after exiting picocom. If <strong>--noreset</strong> is <em>not</em> given, or if both <strong>--noreset</strong> and <strong>--hangup</strong> are 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>--hangup</strong> | <strong>-u</strong></dt>
<dd><p>If given together with <strong>--noreset</strong>, picocom will not reset the serial port to it's original settings on exit, but it <em>will</em> clear the modem control lines (typically DTR and RTS) to signal a modem hangup. Without the <strong>--noreset</strong> option (explicitly given, or implied by extiting with the &quot;Quit&quot; command) <strong>--hangup</strong> has no effect (without <strong>--noreset</strong> picocom always clears the modem control lines on exit, anyway).</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>
@ -143,8 +146,8 @@
</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 '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>
<pre><code>picocom -t &quot;$(echo -ne 'AAATZ\r\n')&quot; /dev/ttyS0</code></pre>
<p>Note, that the init string is not sent if <strong>--noinit</strong> is given. (Default: empty).</p>
</dd>
<dt><strong>--lower-rts</strong></dt>
<dd><p>Lower the RTS control signal after opening the serial port (by default RTS is raised after open). Only supported when flow-control mode is not set to RTS/CTS, ignored otherwise. Only supported in Linux and OSX.</p>
@ -153,11 +156,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 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>
<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> and <strong>--hangup</strong> options 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 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><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> and <strong>--hangup</strong> options are observed as usual. With <strong>--exit</strong> and <strong>--noreset</strong> (and possibly <strong>--hangup</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 and draining the O/S serial port output buffer (i.e. waiting 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>
@ -210,14 +213,14 @@
<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>
<p>This section summarizes the conditions in which picocom terminates its operation and what happens in 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 (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 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 the serial port is reset to it's original settings, and the modem-control lines are cleared signaling a modem reset, subject to the <strong>--noreset</strong> and the <strong>--hangup</strong> options. After that picocom exits with a success status.</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 <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>
<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. Picocom exits with a success exit status.</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. Picocom exits with a success exit status.</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, then 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 empties. When this happens, picocom waits for the O/S serial port output buffer to drain and then (subject to the <strong>--noreset</strong> and <strong>--hangup</strong> options) 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, before exiting. Picocom exits with a success exit status.</p></li>
<li><p>Picocom is killed by the TERM or INT signal, or an unrecoverable error occurs. 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, subject to the <strong>--noreset</strong> and <strong>--hangup</strong> options, the serial port is reset to its original settings, the modem control lines are cleared, and picocom exits with a failure status.</p></li>
</ul>
<h1 id="author">AUTHOR</h1>
<p>Written by Nick Patavalis <script type="text/javascript">

View File

@ -8,10 +8,12 @@ header: User Commands
picocom - minimal dumb-terminal emulation program
# SYNOPSIS
**picocom** [ _options_ ] _device_
# DESCRIPTION
As its name suggests, **picocom(1)** is a minimal dumb-terminal
@ -40,6 +42,7 @@ called the "function character"). Depending on the value of the
function character, picocom performs one of the operations described
in the **[COMMANDS]** section below.
# COMMANDS
Commands are given to picocom by first keying the *espace character*
@ -59,14 +62,20 @@ here.
: 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.
(lowered) signaling a modem hangup. If **--noreset** is given (and
**--hangup** is not), then the serial port settings are not reset,
and the modem control lines remain unaffected. If both
**--noreset** and **--hangup** are given, then the serial port
settings are not reset, but the modem-control lines *are* cleared.
**C-q**
: Quit the program *without* resetting the serial port, exactly as
if the **--noreset** option was given.
: Quit the program *without* resetting the serial port to its
original settings. Terminating with the Quit command, picocom
behaves *exactly* as if the **--noreset** option was given. The
serial port is *not* reset to its original settings, and the modem
control lines remain unaffected or are cleared, subject to the
**--hangup** option.
**C-p**
@ -163,6 +172,7 @@ baud-rate by two steps, you have to type:
assuming of-course that **C-a** is the escape character.
# OPTIONS
Picocom accepts the following command-line options.
@ -204,9 +214,9 @@ Picocom accepts the following command-line options.
**--no-escape** | **-n**
: 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).
command-mode if this option is given. To exit picocom, in this
case, you must either close its standard input, or send it the
TERM or INT signal. (Default: Disabled).
**--echo** | **-c**
@ -218,37 +228,47 @@ Picocom accepts the following command-line options.
**--noinit** | **-i**
: 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
mess 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)
by commands. See also the **--noreset** and **--hangup**
options. (Default: Disabled)
**--noreset** | **-r**
: 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 *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)
original values and, unless the **--hangup** option is also given,
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 makes picocom behave *exactly* as if **--noreset**
was given. See also the **--hangup** option. (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.
serial port, according to the **--noreset** and **--hangup**
options. If **--noreset** is given and **--hangup** is not, then
HUPCL for the port is cleared and will remain so after exiting
picocom. If **--noreset** is *not* given, or if both **--noreset**
and **--hangup** are 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.
**--hangup** | **-u**
: If given together with **--noreset**, picocom will not reset the
serial port to it's original settings on exit, but it *will* clear
the modem control lines (typically DTR and RTS) to signal a modem
hangup. Without the **--noreset** option (explicitly given, or
implied by extiting with the "Quit" command) **--hangup** has no
effect (without **--noreset** picocom always clears the modem
control lines on exit, anyway).
**--nolock** | **-l**
@ -318,10 +338,10 @@ Picocom accepts the following command-line options.
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
picocom -t "$(echo -ne 'AAATZ\r\n')" /dev/ttyS0
Note, that the init string is not sent if **--noinit** is
set. (Default: empty).
given. (Default: empty).
**--lower-rts**
@ -344,11 +364,12 @@ Picocom accepts the following command-line options.
(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
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).
the **--noreset** and **--hangup** options 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
@ -363,16 +384,17 @@ Picocom accepts the following command-line options.
: Exit picocom immediatelly after opening and configuring the
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 very crude replacement of **stty(1)**. If an init
string is also given (see **--initstring** option), picocom exits
from the serial port. When exiting the **--noreset** and
**--hangup** options are observed as usual. With **--exit** and
**--noreset** (and possibly **--hangup**) picocom can 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. 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)
port and draining the O/S serial port output buffer (i.e. waiting
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**
@ -509,10 +531,11 @@ will:
- Replace every CR character with CR and LF when echoing to the
terminal (if local-echo is enabled).
# EXITING PICOCOM
This section summarizes the conditions under which picocom terminates
its operation and what happens on each such condition:
This section summarizes the conditions in which picocom terminates its
operation and what happens in 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
@ -520,13 +543,11 @@ its operation and what happens on each such condition:
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 and without affecting the modem control lines.
are discarded (flushed). Then the serial port is reset to it's
original settings, and the modem-control lines are cleared signaling
a modem reset, subject to the **--noreset** and the **--hangup**
options. After that picocom exits with a success status.
- 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
@ -535,45 +556,50 @@ its operation and what happens on each such condition:
not).
- The **--exit** option is given. See the documentation of this option
for a description of what exactly happens in this case.
for a description of what exactly happens in this case. Picocom
exits with a success exit status.
- The **--exit-after** option is given. See the documentation of this
option for a description of what exactly happens in this case.
option for a description of what exactly happens in this
case. Picocom exits with a success exit status.
- 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
or, if a file was connected, then 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
port) until its output queue empties. 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.
(subject to the **--noreset** and **--hangup** options) 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, before exiting. Picocom exits
with a success exit status.
- Picocom is killed by the TERM or INT signal, or an unrecoverable
error occurs. 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, subject to the **--noreset** and **--hangup**
options, the serial port is reset to its original settings, the
modem control lines are cleared, and picocom exits with a failure
status.
- 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 **--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
Written by Nick Patavalis <npat@efault.net>
# AVAILABILITY
Download the latest release from:
<https://github.com/npat-efault/picocom/releases>
# COPYRIGHT
Copyright (c) 2004-2017 Nick Patavalis

Binary file not shown.