mirror of
https://github.com/UzixLS/picocom.git
synced 2025-07-19 07:21:18 +03:00
- Added support for the linenoise library, which allows line-editing
and path completion when entering filenames for receive- and send- file operations. Support can be compiled-out if you wish. See Makefile. - When entering a filename for receive- or send- file operations, pressing C-c cancels the operation. This works regardless of whether linenoise support (see above) has been compiled in or not - Use debian's xmltoman to convert manual page form xml to man.
This commit is contained in:
11
CONTRIBUTORS
11
CONTRIBUTORS
@ -1,5 +1,6 @@
|
||||
|
||||
The following people contributed suggestions, comments, and fixes:
|
||||
The following people contributed improvements, fixes, suggestions, and
|
||||
comments:
|
||||
|
||||
- Oliver Kurth (oku@debian.org) contributed bug fixes and the manual
|
||||
page for picocm.
|
||||
@ -25,3 +26,11 @@ The following people contributed suggestions, comments, and fixes:
|
||||
|
||||
- Scott Tsai (scott.tw@gmail.com) suggested better UUCP_LOCK_DIR definition
|
||||
|
||||
- Josh Handley (https://github.com/jhandley) added support for
|
||||
line-editing, autocompletion and history when entering "send" and
|
||||
"receive" file names. Editing support uses the "linenoise"
|
||||
library. See: https://github.com/jhandley/picocom
|
||||
|
||||
- Salvatore Sanfilippo (https://github.com/antirez) is the author of
|
||||
the linenoise line-editing library. See:
|
||||
https://github.com/antirez/linenoise
|
||||
|
30
Makefile
30
Makefile
@ -1,40 +1,52 @@
|
||||
|
||||
VERSION=1.8
|
||||
|
||||
UUCP_LOCK_DIR=/var/lock
|
||||
|
||||
# CC = gcc
|
||||
CPPFLAGS=-DVERSION_STR=\"$(VERSION)\" \
|
||||
-DUUCP_LOCK_DIR=\"$(UUCP_LOCK_DIR)\" \
|
||||
-DHIGH_BAUD
|
||||
CPPFLAGS=-DVERSION_STR=\"$(VERSION)\"
|
||||
CFLAGS = -Wall -g
|
||||
|
||||
# LD = gcc
|
||||
LDFLAGS = -g
|
||||
LDLIBS =
|
||||
|
||||
## Comment this out to disable high-baudrate support
|
||||
CPPFLAGS += -DHIGH_BAUD
|
||||
|
||||
## Comment these out to disable UUCP-style lockdirs
|
||||
UUCP_LOCK_DIR=/var/lock
|
||||
CPPFLAGS += -DUUCP_LOCK_DIR=\"$(UUCP_LOCK_DIR)\"
|
||||
|
||||
## Comment these out to disable "linenoise"-library support
|
||||
SEND_RECEIVE_HISTFILE = .picocom_send_receive
|
||||
CPPFLAGS += -DSEND_RECEIVE_HISTFILE=\"$(SEND_RECEIVE_HISTFILE)\" \
|
||||
-DLINENOISE
|
||||
picocom : linenoise-1.0/linenoise.o
|
||||
linenoise-1.0/linenoise.o : linenoise-1.0/linenoise.c linenoise-1.0/linenoise.h
|
||||
|
||||
|
||||
picocom : picocom.o term.o
|
||||
# $(LD) $(LDFLAGS) -o $@ $+ $(LDLIBS)
|
||||
|
||||
picocom.o : picocom.c term.h
|
||||
term.o : term.c term.h
|
||||
|
||||
|
||||
doc : picocom.8 picocom.8.html picocom.8.ps
|
||||
|
||||
changes :
|
||||
changes :
|
||||
svn log -v . > CHANGES
|
||||
|
||||
picocom.8 : picocom.8.xml
|
||||
xmlmp2man < $< > $@
|
||||
xmltoman $< > $@
|
||||
|
||||
picocom.8.html : picocom.8.xml
|
||||
xmlmp2html < $< > $@
|
||||
xmlmantohtml $< > $@
|
||||
|
||||
picocom.8.ps : picocom.8
|
||||
groff -mandoc -Tps $< > $@
|
||||
|
||||
clean:
|
||||
rm -f picocom.o term.o
|
||||
rm -f picocom.o term.o linenoise-1.0/linenoise.o
|
||||
rm -f *~
|
||||
rm -f \#*\#
|
||||
|
||||
|
3
linenoise-1.0/.gitignore
vendored
Normal file
3
linenoise-1.0/.gitignore
vendored
Normal file
@ -0,0 +1,3 @@
|
||||
linenoise_example
|
||||
*.dSYM
|
||||
history.txt
|
25
linenoise-1.0/LICENSE
Normal file
25
linenoise-1.0/LICENSE
Normal file
@ -0,0 +1,25 @@
|
||||
Copyright (c) 2010-2014, Salvatore Sanfilippo <antirez at gmail dot com>
|
||||
Copyright (c) 2010-2013, Pieter Noordhuis <pcnoordhuis at gmail dot com>
|
||||
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions are met:
|
||||
|
||||
* Redistributions of source code must retain the above copyright notice,
|
||||
this list of conditions and the following disclaimer.
|
||||
|
||||
* Redistributions in binary form must reproduce the above copyright notice,
|
||||
this list of conditions and the following disclaimer in the documentation
|
||||
and/or other materials provided with the distribution.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
|
||||
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
|
||||
ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
7
linenoise-1.0/Makefile
Normal file
7
linenoise-1.0/Makefile
Normal file
@ -0,0 +1,7 @@
|
||||
linenoise_example: linenoise.h linenoise.c
|
||||
|
||||
linenoise_example: linenoise.c example.c
|
||||
$(CC) -Wall -W -Os -g -o linenoise_example linenoise.c example.c
|
||||
|
||||
clean:
|
||||
rm -f linenoise_example
|
52
linenoise-1.0/README.markdown
Normal file
52
linenoise-1.0/README.markdown
Normal file
@ -0,0 +1,52 @@
|
||||
# Linenoise
|
||||
|
||||
A minimal, zero-config, BSD licensed, readline replacement used in Redis,
|
||||
MongoDB, and Android.
|
||||
|
||||
* Single and multi line editing mode with the usual key bindings implemented.
|
||||
* History handling.
|
||||
* Completion.
|
||||
* About 1,100 lines of BSD license source code.
|
||||
* Only uses a subset of VT100 escapes (ANSI.SYS compatible).
|
||||
|
||||
## Can a line editing library be 20k lines of code?
|
||||
|
||||
Line editing with some support for history is a really important feature for command line utilities. Instead of retyping almost the same stuff again and again it's just much better to hit the up arrow and edit on syntax errors, or in order to try a slightly different command. But apparently code dealing with terminals is some sort of Black Magic: readline is 30k lines of code, libedit 20k. Is it reasonable to link small utilities to huge libraries just to get a minimal support for line editing?
|
||||
|
||||
So what usually happens is either:
|
||||
|
||||
* Large programs with configure scripts disabling line editing if readline is not present in the system, or not supporting it at all since readline is GPL licensed and libedit (the BSD clone) is not as known and available as readline is (Real world example of this problem: Tclsh).
|
||||
* Smaller programs not using a configure script not supporting line editing at all (A problem we had with Redis-cli for instance).
|
||||
|
||||
The result is a pollution of binaries without line editing support.
|
||||
|
||||
So I spent more or less two hours doing a reality check resulting in this little library: is it *really* needed for a line editing library to be 20k lines of code? Apparently not, it is possibe to get a very small, zero configuration, trivial to embed library, that solves the problem. Smaller programs will just include this, supporing line editing out of the box. Larger programs may use this little library or just checking with configure if readline/libedit is available and resorting to linenoise if not.
|
||||
|
||||
## Terminals, in 2010.
|
||||
|
||||
Apparently almost every terminal you can happen to use today has some kind of support for basic VT100 escape sequences. So I tried to write a lib using just very basic VT100 features. The resulting library appears to work everywhere I tried to use it, and now can work even on ANSI.SYS compatible terminals, since no
|
||||
VT220 specific sequences are used anymore.
|
||||
|
||||
The library is currently about 1100 lines of code. In order to use it in your project just look at the *example.c* file in the source distribution, it is trivial. Linenoise is BSD code, so you can use both in free software and commercial software.
|
||||
|
||||
## Tested with...
|
||||
|
||||
* Linux text only console ($TERM = linux)
|
||||
* Linux KDE terminal application ($TERM = xterm)
|
||||
* Linux xterm ($TERM = xterm)
|
||||
* Linux Buildroot ($TERM = vt100)
|
||||
* Mac OS X iTerm ($TERM = xterm)
|
||||
* Mac OS X default Terminal.app ($TERM = xterm)
|
||||
* OpenBSD 4.5 through an OSX Terminal.app ($TERM = screen)
|
||||
* IBM AIX 6.1
|
||||
* FreeBSD xterm ($TERM = xterm)
|
||||
* ANSI.SYS
|
||||
|
||||
Please test it everywhere you can and report back!
|
||||
|
||||
## Let's push this forward!
|
||||
|
||||
Patches should be provided in the respect of linenoise sensibility for small
|
||||
easy to understand code.
|
||||
|
||||
Send feedbacks to antirez at gmail
|
64
linenoise-1.0/example.c
Normal file
64
linenoise-1.0/example.c
Normal file
@ -0,0 +1,64 @@
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include "linenoise.h"
|
||||
|
||||
|
||||
void completion(const char *buf, linenoiseCompletions *lc) {
|
||||
if (buf[0] == 'h') {
|
||||
linenoiseAddCompletion(lc,"hello");
|
||||
linenoiseAddCompletion(lc,"hello there");
|
||||
}
|
||||
}
|
||||
|
||||
int main(int argc, char **argv) {
|
||||
char *line;
|
||||
char *prgname = argv[0];
|
||||
|
||||
/* Parse options, with --multiline we enable multi line editing. */
|
||||
while(argc > 1) {
|
||||
argc--;
|
||||
argv++;
|
||||
if (!strcmp(*argv,"--multiline")) {
|
||||
linenoiseSetMultiLine(1);
|
||||
printf("Multi-line mode enabled.\n");
|
||||
} else if (!strcmp(*argv,"--keycodes")) {
|
||||
linenoisePrintKeyCodes();
|
||||
exit(0);
|
||||
} else {
|
||||
fprintf(stderr, "Usage: %s [--multiline] [--keycodes]\n", prgname);
|
||||
exit(1);
|
||||
}
|
||||
}
|
||||
|
||||
/* Set the completion callback. This will be called every time the
|
||||
* user uses the <tab> key. */
|
||||
linenoiseSetCompletionCallback(completion);
|
||||
|
||||
/* Load history from file. The history file is just a plain text file
|
||||
* where entries are separated by newlines. */
|
||||
linenoiseHistoryLoad("history.txt"); /* Load the history at startup */
|
||||
|
||||
/* Now this is the main loop of the typical linenoise-based application.
|
||||
* The call to linenoise() will block as long as the user types something
|
||||
* and presses enter.
|
||||
*
|
||||
* The typed string is returned as a malloc() allocated string by
|
||||
* linenoise, so the user needs to free() it. */
|
||||
while((line = linenoise("hello> ")) != NULL) {
|
||||
/* Do something with the string. */
|
||||
if (line[0] != '\0' && line[0] != '/') {
|
||||
printf("echo: '%s'\n", line);
|
||||
linenoiseHistoryAdd(line); /* Add to the history. */
|
||||
linenoiseHistorySave("history.txt"); /* Save the history on disk. */
|
||||
} else if (!strncmp(line,"/historylen",11)) {
|
||||
/* The "/historylen" command will change the history len. */
|
||||
int len = atoi(line+11);
|
||||
linenoiseHistorySetMaxLen(len);
|
||||
} else if (line[0] == '/') {
|
||||
printf("Unreconized command: %s\n", line);
|
||||
}
|
||||
free(line);
|
||||
}
|
||||
return 0;
|
||||
}
|
1107
linenoise-1.0/linenoise.c
Normal file
1107
linenoise-1.0/linenoise.c
Normal file
File diff suppressed because it is too large
Load Diff
68
linenoise-1.0/linenoise.h
Normal file
68
linenoise-1.0/linenoise.h
Normal file
@ -0,0 +1,68 @@
|
||||
/* linenoise.h -- VERSION 1.0
|
||||
*
|
||||
* Guerrilla line editing library against the idea that a line editing lib
|
||||
* needs to be 20,000 lines of C code.
|
||||
*
|
||||
* See linenoise.c for more information.
|
||||
*
|
||||
* ------------------------------------------------------------------------
|
||||
*
|
||||
* Copyright (c) 2010-2014, Salvatore Sanfilippo <antirez at gmail dot com>
|
||||
* Copyright (c) 2010-2013, Pieter Noordhuis <pcnoordhuis at gmail dot com>
|
||||
*
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are
|
||||
* met:
|
||||
*
|
||||
* * Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
*
|
||||
* * Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
* HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#ifndef __LINENOISE_H
|
||||
#define __LINENOISE_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
typedef struct linenoiseCompletions {
|
||||
size_t len;
|
||||
char **cvec;
|
||||
} linenoiseCompletions;
|
||||
|
||||
typedef void(linenoiseCompletionCallback)(const char *, linenoiseCompletions *);
|
||||
void linenoiseSetCompletionCallback(linenoiseCompletionCallback *);
|
||||
void linenoiseAddCompletion(linenoiseCompletions *, const char *);
|
||||
|
||||
char *linenoise(const char *prompt);
|
||||
int linenoiseHistoryAdd(const char *line);
|
||||
int linenoiseHistorySetMaxLen(int len);
|
||||
int linenoiseHistorySave(const char *filename);
|
||||
int linenoiseHistoryLoad(const char *filename);
|
||||
void linenoiseClearScreen(void);
|
||||
void linenoiseSetMultiLine(int ml);
|
||||
void linenoisePrintKeyCodes(void);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* __LINENOISE_H */
|
386
picocom.8
386
picocom.8
@ -1,279 +1,129 @@
|
||||
.TH "picocom" "8" "" "" ""
|
||||
.TH picocom 8 User Manuals
|
||||
.SH NAME
|
||||
picocom \- minimal dumb-terminal emulation program
|
||||
.SH SYNOPSIS
|
||||
.B picocom [
|
||||
.I options
|
||||
.B ]
|
||||
.I device
|
||||
.br
|
||||
\fBpicocom [ \fIoptions\fB ] \fIdevice\fB
|
||||
\f1
|
||||
.SH DESCRIPTION
|
||||
As its name suggests,
|
||||
.B picocom
|
||||
is a minimal dumb-terminal emulation program. It is, in principle, very much like
|
||||
.B minicom(1)
|
||||
, only it's "pico" instead of "mini"! It was designed to serve as a simple, manual, modem configuration, testing, and debugging tool. It has also served (quite well) as a low-tech "terminal-window" to allow operator intervention in PPP connection scripts (something like the ms-windows "open terminal window before / after dialing" feature). It could also prove useful in many other similar tasks.
|
||||
.br
|
||||
.sp 0.6v
|
||||
When
|
||||
.B picocom
|
||||
starts it opens the terminal (serial device) given as its non-option argument. Unless the
|
||||
.I --noinit
|
||||
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
|
||||
.I --noinit
|
||||
is given, the initialization and configuration is skipped; the device is just opened. Following this,
|
||||
.B 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.
|
||||
.B picocom
|
||||
also scans its input stream for a user-specified control character, called the "escape character" (being by default "C-a"). If the escape character is seen, then instead of sending it to the serial-device, the program enters "command mode" and waits for the next character (which is called the "function character"). Depending on the value of the function character,
|
||||
.B picocom
|
||||
performs one of the operations described in the "Commands" section below.
|
||||
.br
|
||||
.sp 0.6v
|
||||
As its name suggests, picocom is a minimal dumb-terminal emulation program. It is, in principle, very much like \fBminicom(1)\f1, only it's "pico" instead of "mini"! It was designed to serve as a simple, manual, modem configuration, testing, and debugging tool. It has also served (quite well) as a low-tech "terminal-window" to allow operator intervention in PPP connection scripts (something like the ms-windows "open terminal window before / after dialing" feature). It could also prove useful in many other similar tasks.
|
||||
|
||||
When picocom starts it opens the terminal (serial device) given as its non-option argument. Unless the \fI--noinit\f1 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 \fI--noinit\f1 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 "escape character" (being by default "C-a"). If the escape character is seen, then instead of sending it to the serial-device, the program enters "command mode" and waits for the next character (which is called the "function character"). Depending on the value of the function character, picocom performs one of the operations described in the "Commands" section below.
|
||||
.SH COMMANDS
|
||||
Commands are given to
|
||||
.B picocom
|
||||
by first keying the "espace character" which by default is "C-a" (see "Options" below on how to change it), and then keying one for the function (command) characters shown here.
|
||||
.TP 3
|
||||
.B [escape character]
|
||||
Send the escape character to the serial port and return to "transparent" mode. This means that if the escape character ("C-a", by default) is typed twice, the program sends the escape character to the serial port, and remains in transparent mode. This is a new behavior implemented in v1.4. Previously picocom used to ignore the escape-character when it was entered as a function character.
|
||||
.TP 3
|
||||
.B 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.
|
||||
.TP 3
|
||||
.B C-q
|
||||
Quit the program *without* reseting the serial port, regardless of the "--noreset" option.
|
||||
.TP 3
|
||||
.B C-p
|
||||
Pulse the DTR line. Lower it for 1 sec, and then raise it again.
|
||||
.TP 3
|
||||
.B C-t
|
||||
Toggle the DTR line. If DTR is up, then lower it. If it is down, then raise it.
|
||||
.TP 3
|
||||
.B C-backslash
|
||||
Generate a break sequence on the serial line. A break sequence is usually generated by marking (driving to logical one) the serial Tx line for an amount of time coresponding to several character durations.
|
||||
.TP 3
|
||||
.B C-u
|
||||
Baud up. Increase the baud-rate. The list of baud-rates stepped-through by this command is: 300, 600, 1200, 2400, 4800, 9600, 19200, 38400, 57600, 115200.
|
||||
.TP 3
|
||||
.B C-d
|
||||
Baud down. Decrease the baud-rate. The list of baud-rates stepped-through by this command is the same as for the "baud-up" command.
|
||||
.TP 3
|
||||
.B C-f
|
||||
Cycle through flow-control settings (RTS/CTS, XON/XOFF, none).
|
||||
.TP 3
|
||||
.B C-y
|
||||
Cycle through parity settings (even, odd, none).
|
||||
.TP 3
|
||||
.B C-b
|
||||
Cycle through databits-number settings (5, 6, 7, 8).
|
||||
.TP 3
|
||||
.B C-c
|
||||
Toggle local-echo mode.
|
||||
.TP 3
|
||||
.B C-v
|
||||
Show program options (like baud rate, data bits, etc). Only the options that can be modified online (through commands) are shown, not those that can only be set at the command-line.
|
||||
.TP 3
|
||||
.B C-s
|
||||
Send (upload) a file (see "Sending and Receiving Files" below)
|
||||
.TP 3
|
||||
.B C-r
|
||||
Receive (download) a file (see "Sending and Receiving Files" below)
|
||||
.PP
|
||||
After performing one of the above operations the program leaves the command mode and enters transparent mode. Example: To increase the baud-rate by two steps, you have to type:
|
||||
.br
|
||||
.sp 0.6v
|
||||
C-a, C-u, C-a, C-u
|
||||
.br
|
||||
.sp 0.6v
|
||||
assuming of-course that "C-a" is the escape character.
|
||||
.br
|
||||
.sp 0.6v
|
||||
Commands are given to picocom by first keying the "espace character" which by default is "C-a" (see "Options" below on how to change it), and then keying one for the function (command) characters shown here.
|
||||
|
||||
[escape character]: Send the escape character to the serial port and return to "transparent" mode. This means that if the escape character ("C-a", by default) is typed twice, the program sends the escape character to the serial port, and remains in transparent mode. This is a new behavior implemented in v1.4. Previously picocom used to ignore the escape-character when it was entered as a function character.
|
||||
|
||||
[C-x]: Exit the program: if the \fI--noreset\f1 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.
|
||||
|
||||
[C-q]: Quit the program *without* reseting the serial port, regardless of the \fI--noreset\f1 option.
|
||||
|
||||
[C-p]: Pulse the DTR line. Lower it for 1 sec, and then raise it again.
|
||||
|
||||
[C-t]: Toggle the DTR line. If DTR is up, then lower it. If it is down, then raise it.
|
||||
|
||||
[C-backslash]: Generate a break sequence on the serial line. A break sequence is usually generated by marking (driving to logical one) the serial Tx line for an amount of time coresponding to several character durations.
|
||||
|
||||
[C-u]: Baud up. Increase the baud-rate. The list of baud-rates stepped-through by this command is: 300, 600, 1200, 2400, 4800, 9600, 19200, 38400, 57600, 115200.
|
||||
|
||||
[C-d]: Baud down. Decrease the baud-rate. The list of baud-rates stepped-through by this command is the same as for the "baud-up" command.
|
||||
|
||||
[C-f]: Cycle through flow-control settings (RTS/CTS, XON/XOFF, none).
|
||||
|
||||
[C-y]: Cycle through parity settings (even, odd, none).
|
||||
|
||||
[C-b]: Cycle through databits-number settings (5, 6, 7, 8).
|
||||
|
||||
[C-c]: Toggle local-echo mode.
|
||||
|
||||
[C-v]: Show program options (like baud rate, data bits, etc). Only the options that can be modified online (through commands) are shown, not those that can only be set at the command-line.
|
||||
|
||||
[C-s]: Send (upload) a file (see "Sending and Receiving Files" below)
|
||||
|
||||
[C-r]: Receive (download) a file (see "Sending and Receiving Files" below)
|
||||
|
||||
After performing one of the above operations the program leaves the command mode and enters transparent mode. Example: To increase the baud-rate by two steps, you have to type:
|
||||
|
||||
C-a, C-u, C-a, C-u
|
||||
|
||||
assuming of-course that "C-a" is the escape character.
|
||||
.SH SENDING AND RECEIVING FILES
|
||||
.B picocom
|
||||
can send and receive files over the serial port using external programs that implement the respective protocols. In Linux typical programs for this purpose are:
|
||||
.IP \(em 3
|
||||
.B rx(1)
|
||||
- receive using the X-MODEM protocol
|
||||
.IP \(em 3
|
||||
.B rb(1)
|
||||
- receive using the Y-MODEM protocol
|
||||
.IP \(em 3
|
||||
.B rz(1)
|
||||
- receive using the Z-MODEM protocol
|
||||
.IP \(em 3
|
||||
.B sx(1)
|
||||
- send using the X-MODEM protocol
|
||||
.IP \(em 3
|
||||
.B sb(1)
|
||||
- send using the Y-MODEM protocol
|
||||
.IP \(em 3
|
||||
.B sz(1)
|
||||
- send using the Z-MODEM protocol
|
||||
.IP \(em 3
|
||||
.B ascii-xfr(1)
|
||||
- receive or transmit ASCII files
|
||||
.PP
|
||||
The name of, and the command-line options to, the program to be used for transmitting files are given by the "--send-cmd" option. Similarly the program to receive files, and its argumets, are given by the "--receive-cmd" option. For example, in order to start a
|
||||
.B picocom
|
||||
session that uses "sz" to transmit files, and "rz" to receive, you have to say something like this:
|
||||
.br
|
||||
.sp 0.6v
|
||||
picocom --send-cmd "sz -vv" --receive-cmd "rz -vv"
|
||||
.br
|
||||
.sp 0.6v
|
||||
During the picocom session, if you key the "send" or "receive" commands (e.g. by pressing C-a, C-s, or C-a, C-r) you will be prompted for a filename. At this prompt you can enter one or more file-names, and any additional arguments to the transmission or reception program. After that, picocom will start the the external program as specified by the "--send-cmd", or "--receive-cmd" option, and with any filenames and additional arguments you may have supplied. The standard input and output of the external program will be connected to the serial port. The standard error of the external program will be connected to the terminal which---while the program is running---will revert to canonical mode. Pressing 'C-c' while the external program is running will prematurely terminate it, and return control to
|
||||
.B picocom
|
||||
. Pressing 'C-c' at any other time, has no special effect; the character is normally passed to the serial port.
|
||||
.br
|
||||
.sp 0.6v
|
||||
picocom can send and receive files over the serial port using external programs that implement the respective protocols. In Linux typical programs for this purpose are:
|
||||
|
||||
\fBrx(1)\f1 - receive using the X-MODEM protocol
|
||||
|
||||
\fBrb(1)\f1 - receive using the Y-MODEM protocol
|
||||
|
||||
\fBrz(1)\f1 - receive using the Z-MODEM protocol
|
||||
|
||||
\fBsx(1)\f1 - send using the X-MODEM protocol
|
||||
|
||||
\fBsb(1)\f1 - send using the Y-MODEM protocol
|
||||
|
||||
\fBsz(1)\f1 - send using the Z-MODEM protocol
|
||||
|
||||
\fBascii-xfr(1)\f1 - receive or transmit ASCII files
|
||||
|
||||
The name of, and the command-line options to, the program to be used for transmitting files are given by the \fI--send-cmd\f1 option. Similarly the program to receive files, and its argumets, are given by the \fI--receive-cmd\f1 option. For example, in order to start a picocom session that uses "sz" to transmit files, and "rz" to receive, you have to say something like this:
|
||||
|
||||
picocom --send-cmd "sz -vv" --receive-cmd "rz -vv"
|
||||
|
||||
During the picocom session, if you key the "send" or "receive" commands (e.g. by pressing C-a, C-s, or C-a, C-r) you will be prompted for a filename. At this prompt you can enter one or more file-names, and any additional arguments to the transmission or reception program. Command-line editing and pathname completion are available at this prompt, if you have compiled picocom with support for the linenoise library. Pressing 'C-c' at this prompt will cancel the file transfer command and return to normal picocom operation. After entering a filename (and / or additional transmission or reception program arguments) and assuming you have not canceled the operation by pressing C-c, picocom will start the the external program as specified by the \fI--send-cmd\f1, or \fI--receive-cmd\f1 option, and with any filenames and additional arguments you may have supplied. The standard input and output of the external program will be connected to the serial port. The standard error of the external program will be connected to the terminal which---while the program is running---will revert to canonical mode. Pressing 'C-c' while the external program is running will prematurely terminate it, and return control to picocom. Pressing 'C-c' at any other time, has no special effect; the character is normally passed to the serial port.
|
||||
.SH INPUT, OUTPUT, AND ECHO MAPPING
|
||||
Using the "--imap", "--omap", and "--emap" options you can make
|
||||
.B picocom
|
||||
map (tranlate, replace) certain special characters after being read from the serial port (with
|
||||
.I --imap
|
||||
), before being written to the serial port (with
|
||||
.I --omap
|
||||
), and before being locally echoed to the terminal (standard output) if local echo is enabled (with
|
||||
.I --emap
|
||||
). These mapping options take, each, a single argument which is a comma-separated list of one or more of the following identifiers:
|
||||
.IP \(em 3
|
||||
crlf: map CR to LF
|
||||
.IP \(em 3
|
||||
crcrlf: map CR to CR + LF
|
||||
.IP \(em 3
|
||||
igncr: ignore CR
|
||||
.IP \(em 3
|
||||
lfcr: map LF to CR
|
||||
.IP \(em 3
|
||||
lfcrlf: map LF to CR + LF
|
||||
.IP \(em 3
|
||||
ignlf: ignore LF
|
||||
.IP \(em 3
|
||||
bsdel: map BS --> DEL
|
||||
.IP \(em 3
|
||||
delbs: map DEL --> BS
|
||||
.PP
|
||||
For example the command:
|
||||
.br
|
||||
.sp 0.6v
|
||||
picocom --omap crlf,delbs --imap inglf,bsdel --emap crcrlf ...
|
||||
.br
|
||||
.sp 0.6v
|
||||
will: Replace every CR (carriage return, 0x0d) caracter with LF (line feed, 0x0a) and every DEL (delete, 0x7f) character with BS (backspace, 0x08) before writing it to the serial port. Ignore (not write to the terminal) every LF character read from the serial port and replace every BS character read from the serial port with DEL. Replace every CR character with CR and LF when echoing to the terminal (if local-echo is enabled).
|
||||
.br
|
||||
.sp 0.6v
|
||||
Using the \fI--imap\f1, \fI--omap\f1, and \fI--emap\f1 options you can make picocom map (tranlate, replace) certain special characters after being read from the serial port (with \fI--imap\f1), before being written to the serial port (with \fI--omap\f1), and before being locally echoed to the terminal (standard output) if local echo is enabled (with \fI--emap\f1). These mapping options take, each, a single argument which is a comma-separated list of one or more of the following identifiers: "crlf" (map CR to LF), "crcrlf" (map CR to CR + LF), "igncr" (ignore CR), "lfcr" (map LF to CR), "lfcrlf" (map LF to CR + LF), "ignlf" (ignore LF), "bsdel" (map BS --> DEL), "delbs" (map DEL --> BS)
|
||||
|
||||
For example the command:
|
||||
|
||||
picocom --omap crlf,delbs --imap inglf,bsdel --emap crcrlf ...
|
||||
|
||||
will: Replace every CR (carriage return, 0x0d) caracter with LF (line feed, 0x0a) and every DEL (delete, 0x7f) character with BS (backspace, 0x08) before writing it to the serial port. Ignore (not write to the terminal) every LF character read from the serial port and replace every BS character read from the serial port with DEL. Replace every CR character with CR and LF when echoing to the terminal (if local-echo is enabled).
|
||||
.SH OPTIONS
|
||||
.B picocom
|
||||
accepts the following command-line options
|
||||
.TP 3
|
||||
.B --baud | -b
|
||||
Defines the baud-rate to set the serial-port (terminal) to.
|
||||
.TP 3
|
||||
.B --flow | -f
|
||||
Defines the flow-control mode to set the serial-port to. Must be one of:
|
||||
.RS 3
|
||||
.IP \(em 3
|
||||
\'x' for xon/xoff (software) mode
|
||||
.IP \(em 3
|
||||
\'h' for hardware flow control (RTS/CTS)
|
||||
.IP \(em 3
|
||||
\'n' for no flow control
|
||||
.PP
|
||||
(Default: 'n')
|
||||
.RE
|
||||
.TP 3
|
||||
.B --parity | -p
|
||||
Defines the parity mode to set the serial-port to. Must be one of:
|
||||
.RS 3
|
||||
.IP \(em 3
|
||||
\'o' for odd parity mode.
|
||||
.IP \(em 3
|
||||
\'e' for even parity mode.
|
||||
.IP \(em 3
|
||||
\'n' for no parity, mode.
|
||||
.PP
|
||||
(Default: 'n')
|
||||
.RE
|
||||
.TP 3
|
||||
.B --databits | -d
|
||||
Defines the number of data bits in every character. Must be one of: 5, 6, 7, 8
|
||||
.br
|
||||
.sp 0.6v
|
||||
(Default: 8)
|
||||
.TP 3
|
||||
.B --esacpe | -e
|
||||
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.
|
||||
.br
|
||||
.sp 0.6v
|
||||
(Default: 'a')
|
||||
.TP 3
|
||||
.B --echo | -c
|
||||
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
|
||||
.I --emap
|
||||
option.
|
||||
.br
|
||||
.sp 0.6v
|
||||
(Default: Disabled)
|
||||
.TP 3
|
||||
.B --noinit | -i
|
||||
If given,
|
||||
.B 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
|
||||
.B 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.
|
||||
.TP 3
|
||||
.B --noreset | -r
|
||||
If given,
|
||||
.B 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
|
||||
.B picocom
|
||||
. Regardless whether the "--noreset" option is given the user can exit
|
||||
.B 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.
|
||||
.TP 3
|
||||
.B --nolock | -l
|
||||
If given,
|
||||
.B picocom
|
||||
will *not* attempt to lock the serial port before opening it. Normally picocom attempts to get a UUCP-style lock-file (e.g. "/var/lock/LCK..ttyS0") before opening the port. Failing to do so, results in the program exiting after emitting an error-message. It is possible that your picocom binary is compiled without this option.
|
||||
.TP 3
|
||||
.B --send-cmd | -s
|
||||
Specifies the external program (and any arguments to it) that will be used for transmitting files.
|
||||
.br
|
||||
.sp 0.6v
|
||||
Default: "sz -vv"
|
||||
.TP 3
|
||||
.B --receive-cmd | -v
|
||||
Specifies the external program (and any arguments to it) that will be used for receiving files.
|
||||
.br
|
||||
.sp 0.6v
|
||||
(Default: "rz -vv")
|
||||
.TP 3
|
||||
.B --imap
|
||||
Specifies the input character map (i.e. special characters to be replaced when read from the serial port). Example: "--imap crlf,delbs"
|
||||
.br
|
||||
.sp 0.6v
|
||||
(Defaul: Empty)
|
||||
.TP 3
|
||||
.B --omap
|
||||
Specifies the output character map (i.e. special characters to be replaced before being written to serial port). Example: "--omap crcrlf,bsdel"
|
||||
.br
|
||||
.sp 0.6v
|
||||
(Defaul: Empty)
|
||||
.TP 3
|
||||
.B --emap
|
||||
Specifies the local-echo character map (i.e. special characters to be replaced before being echoed-back to the terminal, if local-echo is enabled). Example: "--emap crcrlf,bsdel"
|
||||
.br
|
||||
.sp 0.6v
|
||||
(Defaul: delbs,crcrlf)
|
||||
.TP 3
|
||||
.B --help | -h
|
||||
Print a short help message describing the command-line options.
|
||||
.PP
|
||||
picocom accepts the following command-line options
|
||||
.TP
|
||||
\fB--baud | -b
|
||||
\f1Defines the baud-rate to set the serial-port (terminal) to.
|
||||
.TP
|
||||
\fB--flow | -f
|
||||
\f1Defines the flow-control mode to set the serial-port to. Must be one of: 'x' for xon/xoff (software) mode, 'h' for hardware flow control (RTS/CTS), 'n' for no flow control. (Default: 'n')
|
||||
.TP
|
||||
\fB--parity | -p
|
||||
\f1Defines the parity mode to set the serial-port to. Must be one of: 'o' for odd parity mode, 'e' for even parity mode, 'n' for no parity mode. (Default: 'n')
|
||||
.TP
|
||||
\fB--databits | -d
|
||||
\f1Defines the number of data bits in every character. Must be one of: 5, 6, 7, 8. (Default: 8)
|
||||
.TP
|
||||
\fB--esacpe | -e
|
||||
\f1Defines 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')
|
||||
.TP
|
||||
\fB--echo | -c
|
||||
\f1Enable 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 \fI--emap\f1 option. (Default: Disabled)
|
||||
.TP
|
||||
\fB--noinit | -i
|
||||
\f1If 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.
|
||||
.TP
|
||||
\fB--noreset | -r
|
||||
\f1If 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 \fI--noreset\f1 option is given the user can exit picocom using the "Quit" command (instead of "Exit"), which never resets the serial port. If \fI--noreset\f1 is given then "Quit" and "Exit" behave essentially the same.
|
||||
.TP
|
||||
\fB--nolock | -l
|
||||
\f1If given, picocom will *not* attempt to lock the serial port before opening it. Normally picocom attempts to get a UUCP-style lock-file (e.g. "/var/lock/LCK..ttyS0") before opening the port. Failing to do so, results in the program exiting after emitting an error-message. It is possible that your picocom binary is compiled without this option.
|
||||
.TP
|
||||
\fB--send-cmd | -s
|
||||
\f1Specifies the external program (and any arguments to it) that will be used for transmitting files. (Default: "sz -vv")
|
||||
.TP
|
||||
\fB--receive-cmd | -v
|
||||
\f1Specifies the external program (and any arguments to it) that will be used for receiving files. (Default: "rz -vv")
|
||||
.TP
|
||||
\fB--imap
|
||||
\f1Specifies the input character map (i.e. special characters to be replaced when read from the serial port). Example: "--imap crlf,delbs". (Defaul: Empty)
|
||||
.TP
|
||||
\fB--omap
|
||||
\f1Specifies the output character map (i.e. special characters to be replaced before being written to serial port). Example: "--omap crcrlf,bsdel". (Defaul: Empty)
|
||||
.TP
|
||||
\fB--emap
|
||||
\f1Specifies the local-echo character map (i.e. special characters to be replaced before being echoed-back to the terminal, if local-echo is enabled). Example: "--emap crcrlf,bsdel". (Defaul: delbs,crcrlf)
|
||||
.TP
|
||||
\fB--help | -h
|
||||
\f1Print a short help message describing the command-line options.
|
||||
.SH AUTHOR
|
||||
picocom was written by Nick Patavalis (npat@efault.net)
|
||||
.br
|
||||
.sp 0.6v
|
||||
.SH AVAILABILITY
|
||||
The latest version of "picocom" can be downloaded from:
|
||||
.B http://code.google.com/p/picocom/
|
||||
The latest version of "picocom" can be downloaded from: \fBhttp://code.google.com/p/picocom/\f1
|
||||
|
1063
picocom.8.html
1063
picocom.8.html
File diff suppressed because it is too large
Load Diff
533
picocom.8.ps
533
picocom.8.ps
@ -1,10 +1,10 @@
|
||||
%!PS-Adobe-3.0
|
||||
%%Creator: groff version 1.21
|
||||
%%CreationDate: Tue Feb 21 10:04:53 2012
|
||||
%%Creator: groff version 1.22.2
|
||||
%%CreationDate: Thu Aug 6 22:53:21 2015
|
||||
%%DocumentNeededResources: font Times-Roman
|
||||
%%+ font Times-Bold
|
||||
%%+ font Times-Italic
|
||||
%%DocumentSuppliedResources: procset grops 1.21 0
|
||||
%%DocumentSuppliedResources: procset grops 1.22 2
|
||||
%%Pages: 4
|
||||
%%PageOrder: Ascend
|
||||
%%DocumentMedia: Default 612 792 0 () ()
|
||||
@ -14,7 +14,7 @@
|
||||
%%PageMedia: Default
|
||||
%%EndDefaults
|
||||
%%BeginProlog
|
||||
%%BeginResource: procset grops 1.21 0
|
||||
%%BeginResource: procset grops 1.22 2
|
||||
%!PS-Adobe-3.0 Resource-ProcSet
|
||||
/setpacking where{
|
||||
pop
|
||||
@ -235,18 +235,18 @@ def/PL 792 def/LS false def/ENC0[/asciicircum/asciitilde/Scaron/Zcaron
|
||||
%%BeginPageSetup
|
||||
BP
|
||||
%%EndPageSetup
|
||||
/F0 10/Times-Roman@0 SF 373.3(picocom\(8\) picocom\(8\))72 48 R/F1 10.95
|
||||
/Times-Bold@0 SF -.219(NA)72 84 S(ME).219 E F0
|
||||
/F0 10/Times-Roman@0 SF 131.795(picocom\(8\) System)72 48 R(Manager')2.5
|
||||
E 2.5(sM)-.55 G 131.795(anual picocom\(8\))-2.5 F/F1 10.95/Times-Bold@0
|
||||
SF -.219(NA)72 84 S(ME).219 E F0
|
||||
(picocom \255 minimal dumb-terminal emulation program)108 96 Q F1
|
||||
(SYNOPSIS)72 112.8 Q/F2 10/Times-Bold@0 SF(picocom [)108 124.8 Q/F3 10
|
||||
/Times-Italic@0 SF(options)2.73 E F2(])2.77 E F3(de)2.85 E(vice)-.15 E
|
||||
F1(DESCRIPTION)72 141.6 Q F0 1.423(As its name suggests,)108 153.6 R F2
|
||||
(picocom)3.923 E F0 1.423
|
||||
(is a minimal dumb-terminal emulation program. It is, in principle, v)
|
||||
3.923 F(ery)-.15 E .938(much lik)108 165.6 R(e)-.1 E F2(minicom\(1\))
|
||||
3.438 E F0 3.439(,o)3.439 G .939(nly it')-3.439 F 3.439(s")-.55 G .939
|
||||
(pico" instead of "mini"! It w)-3.439 F .939(as designed to serv)-.1 F
|
||||
3.439(ea)-.15 G 3.439(sas)-3.439 G .939(imple, manual,)-3.439 F .757
|
||||
/Times-Italic@0 SF(options)2.5 E F2(])2.5 E F3(de)2.5 E(vice)-.15 E F1
|
||||
(DESCRIPTION)72 141.6 Q F0 1.497(As its name suggests, picocom is a min\
|
||||
imal dumb-terminal emulation program. It is, in principle, v)108 153.6 R
|
||||
(ery)-.15 E 1.141(much lik)108 165.6 R(e)-.1 E F2(minicom\(1\))3.641 E
|
||||
F0 3.641(,o)C 1.141(nly it')-3.641 F 3.641(s")-.55 G 1.141
|
||||
(pico" instead of "mini"! It w)-3.641 F 1.141(as designed to serv)-.1 F
|
||||
3.641(ea)-.15 G 3.642(sas)-3.641 G 1.142(imple, manual,)-3.642 F .757
|
||||
(modem con\214guration, testing, and deb)108 177.6 R .757
|
||||
(ugging tool. It has also serv)-.2 F .756(ed \(quite well\) as a lo)-.15
|
||||
F .756(w-tech "terminal-)-.25 F(windo)108 189.6 Q .865(w" to allo)-.25 F
|
||||
@ -255,280 +255,287 @@ F .756(w-tech "terminal-)-.25 F(windo)108 189.6 Q .865(w" to allo)-.25 F
|
||||
.866(he ms-windo)-3.366 F .866(ws "open)-.25 F(terminal windo)108 201.6
|
||||
Q 2.5(wb)-.25 G(efore / after dialing" feature\). It could also pro)-2.5
|
||||
E .3 -.15(ve u)-.15 H(seful in man).15 E 2.5(yo)-.15 G
|
||||
(ther similar tasks.)-2.5 E(When)108 220.8 Q F2(picocom)3.989 E F0 1.489
|
||||
(starts it opens the terminal \(serial de)3.989 F 1.489(vice\) gi)-.25 F
|
||||
-.15(ve)-.25 G 3.989(na).15 G 3.988(si)-3.989 G 1.488(ts non-option ar)
|
||||
-3.988 F 1.488(gument. Unless the)-.18 F F3(--noinit)108.01 232.8 Q F0
|
||||
1.333(option is gi)4.513 F -.15(ve)-.25 G 1.333
|
||||
(n, it con\214gures the de).15 F 1.333
|
||||
(vice to the settings speci\214ed by the option-ar)-.25 F 1.334
|
||||
(guments \(or to)-.18 F .487(some def)108 244.8 R .487
|
||||
(ault settings\), and sets it to "ra)-.1 F .487(w" mode. If)-.15 F F3
|
||||
(--noinit)2.996 E F0 .486(is gi)3.666 F -.15(ve)-.25 G .486
|
||||
(n, the initialization and con\214guration is).15 F .667
|
||||
(skipped; the de)108 256.8 R .667(vice is just opened. F)-.25 F(ollo)
|
||||
-.15 E .667(wing this,)-.25 F F2(picocom)3.167 E F0 .667
|
||||
(sets the standard-input and standard-output to)3.167 F(ra)108 268.8 Q
|
||||
3.289(wm)-.15 G .789(ode. Ha)-3.289 F .789(ving done so, it goes in a l\
|
||||
oop where it listens for input from stdin, or from the serial port.)-.2
|
||||
F .589(Input from the serial port is copied to the standard output whil\
|
||||
e input from the standard input is copied to)108 280.8 R .105
|
||||
(the serial port.)108 292.8 R F2(picocom)5.105 E F0 .105
|
||||
(also scans its input stream for a user)2.605 F .105
|
||||
(-speci\214ed control character)-.2 F 2.605(,c)-.4 G .105
|
||||
(alled the "escape)-2.605 F .554(character" \(being by def)108 304.8 R
|
||||
(ther similar tasks.)-2.5 E 1.563
|
||||
(When picocom starts it opens the terminal \(serial de)108 225.6 R 1.563
|
||||
(vice\) gi)-.25 F -.15(ve)-.25 G 4.063(na).15 G 4.062(si)-4.063 G 1.562
|
||||
(ts non-option ar)-4.062 F 1.562(gument. Unless the)-.18 F F3(--noinit)
|
||||
108 237.6 Q F0 1.376(option is gi)3.876 F -.15(ve)-.25 G 1.376
|
||||
(n, it con\214gures the de).15 F 1.376
|
||||
(vice to the settings speci\214ed by the option-ar)-.25 F 1.377
|
||||
(guments \(or to)-.18 F .528(some def)108 249.6 R .527
|
||||
(ault settings\), and sets it to "ra)-.1 F .527(w" mode. If)-.15 F F3
|
||||
(--noinit)3.027 E F0 .527(is gi)3.027 F -.15(ve)-.25 G .527
|
||||
(n, the initialization and con\214guration is).15 F .746
|
||||
(skipped; the de)108 261.6 R .746(vice is just opened. F)-.25 F(ollo)
|
||||
-.15 E .747
|
||||
(wing this, picocom sets the standard-input and standard-output to)-.25
|
||||
F(ra)108 273.6 Q 3.289(wm)-.15 G .789(ode. Ha)-3.289 F .789(ving done s\
|
||||
o, it goes in a loop where it listens for input from stdin, or from the\
|
||||
serial port.)-.2 F .589(Input from the serial port is copied to the st\
|
||||
andard output while input from the standard input is copied to)108 285.6
|
||||
R .331(the serial port. picocom also scans its input stream for a user)
|
||||
108 297.6 R .33(-speci\214ed control character)-.2 F 2.83(,c)-.4 G .33
|
||||
(alled the "escape)-2.83 F .554(character" \(being by def)108 309.6 R
|
||||
.555(ault "C-a"\). If the escape character is seen, then instead of sen\
|
||||
ding it to the serial-)-.1 F(de)108 316.8 Q .179
|
||||
ding it to the serial-)-.1 F(de)108 321.6 Q .179
|
||||
(vice, the program enters "command mode" and w)-.25 F .179
|
||||
(aits for the ne)-.1 F .178
|
||||
(xt character \(which is called the "function)-.15 F 1.572
|
||||
(character"\). Depending on the v)108 328.8 R 1.573
|
||||
(alue of the function character)-.25 F(,)-.4 E F2(picocom)4.073 E F0
|
||||
1.573(performs one of the operations)4.073 F
|
||||
(described in the "Commands" section belo)108 340.8 Q -.65(w.)-.25 G F1
|
||||
(COMMANDS)72 364.8 Q F0 1.588(Commands are gi)108 376.8 R -.15(ve)-.25 G
|
||||
4.088(nt).15 G(o)-4.088 E F2(picocom)4.088 E F0 1.588(by \214rst k)4.088
|
||||
F -.15(ey)-.1 G 1.587(ing the "espace character" which by def).15 F
|
||||
1.587(ault is "C-a" \(see)-.1 F .671("Options" belo)108 388.8 R 3.171
|
||||
(wo)-.25 G 3.172(nh)-3.171 G 1.172 -.25(ow t)-3.172 H 3.172(oc).25 G
|
||||
.672(hange it\), and then k)-3.172 F -.15(ey)-.1 G .672
|
||||
(xt character \(which is called the "function)-.15 F 1.652
|
||||
(character"\). Depending on the v)108 333.6 R 1.652
|
||||
(alue of the function character)-.25 F 4.152(,p)-.4 G 1.652
|
||||
(icocom performs one of the operations)-4.152 F
|
||||
(described in the "Commands" section belo)108 345.6 Q -.65(w.)-.25 G F1
|
||||
(COMMANDS)72 362.4 Q F0 1.657(Commands are gi)108 374.4 R -.15(ve)-.25 G
|
||||
4.157(nt).15 G 4.157(op)-4.157 G 1.657(icocom by \214rst k)-4.157 F -.15
|
||||
(ey)-.1 G 1.657(ing the "espace character" which by def).15 F 1.656
|
||||
(ault is "C-a" \(see)-.1 F .671("Options" belo)108 386.4 R 3.171(wo)-.25
|
||||
G 3.172(nh)-3.171 G 1.172 -.25(ow t)-3.172 H 3.172(oc).25 G .672
|
||||
(hange it\), and then k)-3.172 F -.15(ey)-.1 G .672
|
||||
(ing one for the function \(command\) characters sho).15 F(wn)-.25 E
|
||||
(here.)108 400.8 Q F2([escape character])108 417.6 Q F0 1.244(Send the \
|
||||
escape character to the serial port and return to "transparent" mode. T\
|
||||
his means that if the)123 429.6 R .358(escape character \("C-a", by def)
|
||||
123 441.6 R .359(ault\) is typed twice, the program sends the escape ch\
|
||||
aracter to the serial)-.1 F .054
|
||||
(port, and remains in transparent mode. This is a ne)123 453.6 R 2.553
|
||||
(wb)-.25 G(eha)-2.553 E .053(vior implemented in v1.4. Pre)-.2 F .053
|
||||
(viously picocom)-.25 F(used to ignore the escape-character when it w)
|
||||
123 465.6 Q(as entered as a function character)-.1 E(.)-.55 E F2(C-x)108
|
||||
482.4 Q F0 .567(Exit the program: if the "--noreset" option w)123 494.4
|
||||
R .567(as not gi)-.1 F -.15(ve)-.25 G 3.067(nt).15 G .567
|
||||
(hen the serial port is reset to its original set-)-3.067 F
|
||||
(tings before e)123 506.4 Q(xiting; if it w)-.15 E(as gi)-.1 E -.15(ve)
|
||||
-.25 G 2.5(nt).15 G(he serial port is not reset.)-2.5 E F2(C-q)108 523.2
|
||||
Q F0(Quit the program *without* reseting the serial port, re)123 535.2 Q
|
||||
-.05(ga)-.15 G(rdless of the "--noreset" option.).05 E F2(C-p)108 552 Q
|
||||
F0(Pulse the DTR line. Lo)123 564 Q
|
||||
(wer it for 1 sec, and then raise it ag)-.25 E(ain.)-.05 E F2(C-t)108
|
||||
580.8 Q F0 -.8(To)123 592.8 S(ggle the DTR line. If DTR is up, then lo)
|
||||
.8 E(wer it. If it is do)-.25 E(wn, then raise it.)-.25 E F2
|
||||
(C-backslash)108 609.6 Q F0 .026(Generate a break sequence on the seria\
|
||||
l line. A break sequence is usually generated by marking \(dri)123 621.6
|
||||
R(ving)-.25 E(to logical one\) the serial Tx line for an amount of time\
|
||||
coresponding to se)123 633.6 Q -.15(ve)-.25 G(ral character durations.)
|
||||
.15 E F2(C-u)108 650.4 Q F0 .601(Baud up. Increase the baud-rate. The l\
|
||||
ist of baud-rates stepped-through by this command is: 300, 600,)123
|
||||
662.4 R(1200, 2400, 4800, 9600, 19200, 38400, 57600, 115200.)123 674.4 Q
|
||||
F2(C-d)108 691.2 Q F0 1.555(Baud do)123 703.2 R 1.555(wn. Decrease the \
|
||||
baud-rate. The list of baud-rates stepped-through by this command is th\
|
||||
e)-.25 F(same as for the "baud-up" command.)123 715.2 Q(1)535 768 Q 0 Cg
|
||||
EP
|
||||
(here.)108 398.4 Q 1.82([escape character]: Send the escape character t\
|
||||
o the serial port and return to "transparent" mode. This)108 422.4 R .06
|
||||
(means that if the escape character \("C-a", by def)108 434.4 R .06
|
||||
(ault\) is typed twice, the program sends the escape character)-.1 F
|
||||
.211(to the serial port, and remains in transparent mode. This is a ne)
|
||||
108 446.4 R 2.71(wb)-.25 G(eha)-2.71 E .21
|
||||
(vior implemented in v1.4. Pre)-.2 F(viously)-.25 E
|
||||
(picocom used to ignore the escape-character when it w)108 458.4 Q
|
||||
(as entered as a function character)-.1 E(.)-.55 E .34
|
||||
([C-x]: Exit the program: if the)108 482.4 R F3(--nor)2.84 E(eset)-.37 E
|
||||
F0 .34(option w)2.84 F .34(as not gi)-.1 F -.15(ve)-.25 G 2.84(nt).15 G
|
||||
.34(hen the serial port is reset to its original set-)-2.84 F
|
||||
(tings before e)108 494.4 Q(xiting; if it w)-.15 E(as gi)-.1 E -.15(ve)
|
||||
-.25 G 2.5(nt).15 G(he serial port is not reset.)-2.5 E
|
||||
([C-q]: Quit the program *without* reseting the serial port, re)108
|
||||
518.4 Q -.05(ga)-.15 G(rdless of the).05 E F3(--nor)2.5 E(eset)-.37 E F0
|
||||
(option.)2.5 E([C-p]: Pulse the DTR line. Lo)108 542.4 Q
|
||||
(wer it for 1 sec, and then raise it ag)-.25 E(ain.)-.05 E([C-t]: T)108
|
||||
566.4 Q(oggle the DTR line. If DTR is up, then lo)-.8 E
|
||||
(wer it. If it is do)-.25 E(wn, then raise it.)-.25 E 1.66([C-backslash\
|
||||
]: Generate a break sequence on the serial line. A break sequence is us\
|
||||
ually generated by)108 590.4 R .471(marking \(dri)108 602.4 R .471(ving\
|
||||
to logical one\) the serial Tx line for an amount of time coresponding\
|
||||
to se)-.25 F -.15(ve)-.25 G .472(ral character).15 F(durations.)108
|
||||
614.4 Q 1.138([C-u]: Baud up. Increase the baud-rate. The list of baud-\
|
||||
rates stepped-through by this command is: 300,)108 638.4 R
|
||||
(600, 1200, 2400, 4800, 9600, 19200, 38400, 57600, 115200.)108 650.4 Q
|
||||
.655([C-d]: Baud do)108 674.4 R .655(wn. Decrease the baud-rate. The li\
|
||||
st of baud-rates stepped-through by this command is the)-.25 F
|
||||
(same as for the "baud-up" command.)108 686.4 Q
|
||||
([C-f]: Cycle through \215o)108 710.4 Q(w-control settings \(R)-.25 E
|
||||
(TS/CTS, XON/XOFF)-.6 E 2.5(,n)-.8 G(one\).)-2.5 E 187.62(Manuals User)
|
||||
72 768 R(1)219.56 E 0 Cg EP
|
||||
%%Page: 2 2
|
||||
%%BeginPageSetup
|
||||
BP
|
||||
%%EndPageSetup
|
||||
/F0 10/Times-Roman@0 SF 373.3(picocom\(8\) picocom\(8\))72 48 R/F1 10
|
||||
/Times-Bold@0 SF(C-f)108 84 Q F0(Cycle through \215o)123 96 Q
|
||||
(w-control settings \(R)-.25 E(TS/CTS, XON/XOFF)-.6 E 2.5(,n)-.8 G
|
||||
(one\).)-2.5 E F1(C-y)108 112.8 Q F0(Cycle through parity settings \(e)
|
||||
123 124.8 Q -.15(ve)-.25 G(n, odd, none\).).15 E F1(C-b)108 141.6 Q F0
|
||||
(Cycle through databits-number settings \(5, 6, 7, 8\).)123 153.6 Q F1
|
||||
(C-c)108 170.4 Q F0 -.8(To)123 182.4 S(ggle local-echo mode.).8 E F1
|
||||
(C-v)108 199.2 Q F0(Sho)123 211.2 Q 4.02(wp)-.25 G 1.52
|
||||
(rogram options \(lik)-4.02 F 4.02(eb)-.1 G 1.521(aud rate, data bits, \
|
||||
etc\). Only the options that can be modi\214ed online)-4.02 F
|
||||
(\(through commands\) are sho)123 223.2 Q
|
||||
(wn, not those that can only be set at the command-line.)-.25 E F1(C-s)
|
||||
108 240 Q F0(Send \(upload\) a \214le \(see "Sending and Recei)123 252 Q
|
||||
(ving Files" belo)-.25 E(w\))-.25 E F1(C-r)108 268.8 Q F0(Recei)123
|
||||
280.8 Q .3 -.15(ve \()-.25 H(do).15 E
|
||||
(wnload\) a \214le \(see "Sending and Recei)-.25 E(ving Files" belo)-.25
|
||||
E(w\))-.25 E .054(After performing one of the abo)108 297.6 R .354 -.15
|
||||
(ve o)-.15 H .054(perations the program lea).15 F -.15(ve)-.2 G 2.554
|
||||
(st).15 G .054(he command mode and enters transparent)-2.554 F
|
||||
(mode. Example: T)108 309.6 Q 2.5(oi)-.8 G(ncrease the baud-rate by tw)
|
||||
-2.5 E 2.5(os)-.1 G(teps, you ha)-2.5 E .3 -.15(ve t)-.2 H 2.5(ot).15 G
|
||||
(ype:)-2.5 E(C-a, C-u, C-a, C-u)108 328.8 Q
|
||||
(assuming of-course that "C-a" is the escape character)108 348 Q(.)-.55
|
||||
E/F2 10.95/Times-Bold@0 SF(SENDING AND RECEIVING FILES)72 372 Q F1
|
||||
(picocom)108 384 Q F0 .427(can send and recei)2.926 F .727 -.15(ve \214)
|
||||
-.25 H .427(les o).15 F -.15(ve)-.15 G 2.927(rt).15 G .427
|
||||
(he serial port using e)-2.927 F .427
|
||||
(xternal programs that implement the respec-)-.15 F(ti)108 396 Q .3 -.15
|
||||
(ve p)-.25 H(rotocols. In Linux typical programs for this purpose are:)
|
||||
.15 E<8a>108 412.8 Q F1(rx\(1\))123 412.8 Q F0 2.5(-r)2.5 G(ecei)-2.5 E
|
||||
.3 -.15(ve u)-.25 H(sing the X-MODEM protocol).15 E<8a>108 429.6 Q F1
|
||||
(rb\(1\))123 429.6 Q F0 2.5(-r)2.5 G(ecei)-2.5 E .3 -.15(ve u)-.25 H
|
||||
(sing the Y).15 E(-MODEM protocol)-1.11 E<8a>108 446.4 Q F1(rz\(1\))123
|
||||
446.4 Q F0 2.5(-r)2.5 G(ecei)-2.5 E .3 -.15(ve u)-.25 H
|
||||
(sing the Z-MODEM protocol).15 E<8a>108 463.2 Q F1(sx\(1\))123 463.2 Q
|
||||
F0 2.5(-s)2.5 G(end using the X-MODEM protocol)-2.5 E<8a>108 480 Q F1
|
||||
(sb\(1\))123 480 Q F0 2.5(-s)2.5 G(end using the Y)-2.5 E
|
||||
(-MODEM protocol)-1.11 E<8a>108 496.8 Q F1(sz\(1\))123 496.8 Q F0 2.5
|
||||
(-s)2.5 G(end using the Z-MODEM protocol)-2.5 E<8a>108 513.6 Q F1
|
||||
(ascii-xfr\(1\))123 513.6 Q F0 2.5(-r)2.5 G(ecei)-2.5 E .3 -.15(ve o)
|
||||
-.25 H 2.5(rt).15 G(ransmit ASCII \214les)-2.5 E .692(The name of, and \
|
||||
the command-line options to, the program to be used for transmitting \
|
||||
\214les are gi)108 530.4 R -.15(ve)-.25 G 3.191(nb).15 G(y)-3.191 E
|
||||
2.843(the "--send-cmd" option. Similarly the program to recei)108 542.4
|
||||
R 3.143 -.15(ve \214)-.25 H 2.843(les, and its ar).15 F 2.844
|
||||
(gumets, are gi)-.18 F -.15(ve)-.25 G 5.344(nb).15 G 5.344(yt)-5.344 G
|
||||
(he)-5.344 E("--recei)108 554.4 Q -.15(ve)-.25 G .118(-cmd" option. F)
|
||||
.15 F .117(or e)-.15 F .117(xample, in order to start a)-.15 F F1
|
||||
(picocom)2.617 E F0 .117
|
||||
(session that uses "sz" to transmit \214les, and)2.617 F("rz" to recei)
|
||||
108 566.4 Q -.15(ve)-.25 G 2.5(,y).15 G(ou ha)-2.5 E .3 -.15(ve t)-.2 H
|
||||
2.5(os).15 G(ay something lik)-2.5 E 2.5(et)-.1 G(his:)-2.5 E
|
||||
(picocom --send-cmd "sz -vv" --recei)108 585.6 Q -.15(ve)-.25 G
|
||||
(-cmd "rz -vv").15 E .309(During the picocom session, if you k)108 604.8
|
||||
R .609 -.15(ey t)-.1 H .309(he "send" or "recei).15 F -.15(ve)-.25 G
|
||||
2.809("c).15 G .309(ommands \(e.g. by pressing C-a, C-s, or C-)-2.809 F
|
||||
.431(a, C-r\) you will be prompted for a \214lename. At this prompt you\
|
||||
can enter one or more \214le-names, and an)108 616.8 R(y)-.15 E .487
|
||||
(additional ar)108 628.8 R .487(guments to the transmission or receptio\
|
||||
n program. After that, picocom will start the the e)-.18 F(xter)-.15 E
|
||||
(-)-.2 E .403
|
||||
(nal program as speci\214ed by the "--send-cmd", or "--recei)108 640.8 R
|
||||
-.15(ve)-.25 G .403(-cmd" option, and with an).15 F 2.902<798c>-.15 G
|
||||
.402(lenames and addi-)-2.902 F 1.195(tional ar)108 652.8 R 1.195
|
||||
(guments you may ha)-.18 F 1.495 -.15(ve s)-.2 H 1.195
|
||||
(upplied. The standard input and output of the e).15 F 1.195
|
||||
(xternal program will be)-.15 F .851
|
||||
(connected to the serial port. The standard error of the e)108 664.8 R
|
||||
.851(xternal program will be connected to the terminal)-.15 F 1.399
|
||||
(which---while the program is running---will re)108 676.8 R -.15(ve)-.25
|
||||
G 1.399(rt to canonical mode. Pressing 'C-c' while the e).15 F(xternal)
|
||||
-.15 E(program is running will prematurely terminate it, and return con\
|
||||
trol to)108 688.8 Q F1(picocom)2.5 E F0(2)535 768 Q 0 Cg EP
|
||||
/F0 10/Times-Roman@0 SF 131.795(picocom\(8\) System)72 48 R(Manager')2.5
|
||||
E 2.5(sM)-.55 G 131.795(anual picocom\(8\))-2.5 F
|
||||
([C-y]: Cycle through parity settings \(e)108 84 Q -.15(ve)-.25 G
|
||||
(n, odd, none\).).15 E
|
||||
([C-b]: Cycle through databits-number settings \(5, 6, 7, 8\).)108 108 Q
|
||||
([C-c]: T)108 132 Q(oggle local-echo mode.)-.8 E .729([C-v]: Sho)108 156
|
||||
R 3.229(wp)-.25 G .729(rogram options \(lik)-3.229 F 3.229(eb)-.1 G .729
|
||||
(aud rate, data bits, etc\). Only the options that can be modi\214ed on\
|
||||
line)-3.229 F(\(through commands\) are sho)108 168 Q
|
||||
(wn, not those that can only be set at the command-line.)-.25 E
|
||||
([C-s]: Send \(upload\) a \214le \(see "Sending and Recei)108 192 Q
|
||||
(ving Files" belo)-.25 E(w\))-.25 E([C-r]: Recei)108 216 Q .3 -.15
|
||||
(ve \()-.25 H(do).15 E(wnload\) a \214le \(see "Sending and Recei)-.25 E
|
||||
(ving Files" belo)-.25 E(w\))-.25 E .054
|
||||
(After performing one of the abo)108 240 R .354 -.15(ve o)-.15 H .054
|
||||
(perations the program lea).15 F -.15(ve)-.2 G 2.554(st).15 G .054
|
||||
(he command mode and enters transparent)-2.554 F(mode. Example: T)108
|
||||
252 Q 2.5(oi)-.8 G(ncrease the baud-rate by tw)-2.5 E 2.5(os)-.1 G
|
||||
(teps, you ha)-2.5 E .3 -.15(ve t)-.2 H 2.5(ot).15 G(ype:)-2.5 E
|
||||
(C-a, C-u, C-a, C-u)108 276 Q
|
||||
(assuming of-course that "C-a" is the escape character)108 300 Q(.)-.55
|
||||
E/F1 10.95/Times-Bold@0 SF(SENDING AND RECEIVING FILES)72 316.8 Q F0
|
||||
.497(picocom can send and recei)108 328.8 R .796 -.15(ve \214)-.25 H
|
||||
.496(les o).15 F -.15(ve)-.15 G 2.996(rt).15 G .496
|
||||
(he serial port using e)-2.996 F .496
|
||||
(xternal programs that implement the respec-)-.15 F(ti)108 340.8 Q .3
|
||||
-.15(ve p)-.25 H
|
||||
(rotocols. In Linux typical programs for this purpose are:).15 E/F2 10
|
||||
/Times-Bold@0 SF(rx\(1\))108 364.8 Q F0 2.5(-r)2.5 G(ecei)-2.5 E .3 -.15
|
||||
(ve u)-.25 H(sing the X-MODEM protocol).15 E F2(rb\(1\))108 388.8 Q F0
|
||||
2.5(-r)2.5 G(ecei)-2.5 E .3 -.15(ve u)-.25 H(sing the Y).15 E
|
||||
(-MODEM protocol)-1.11 E F2(rz\(1\))108 412.8 Q F0 2.5(-r)2.5 G(ecei)
|
||||
-2.5 E .3 -.15(ve u)-.25 H(sing the Z-MODEM protocol).15 E F2(sx\(1\))
|
||||
108 436.8 Q F0 2.5(-s)2.5 G(end using the X-MODEM protocol)-2.5 E F2
|
||||
(sb\(1\))108 460.8 Q F0 2.5(-s)2.5 G(end using the Y)-2.5 E
|
||||
(-MODEM protocol)-1.11 E F2(sz\(1\))108 484.8 Q F0 2.5(-s)2.5 G
|
||||
(end using the Z-MODEM protocol)-2.5 E F2(ascii-xfr\(1\))108 508.8 Q F0
|
||||
2.5(-r)2.5 G(ecei)-2.5 E .3 -.15(ve o)-.25 H 2.5(rt).15 G
|
||||
(ransmit ASCII \214les)-2.5 E .692(The name of, and the command-line op\
|
||||
tions to, the program to be used for transmitting \214les are gi)108
|
||||
532.8 R -.15(ve)-.25 G 3.192(nb).15 G(y)-3.192 E(the)108 544.8 Q/F3 10
|
||||
/Times-Italic@0 SF(--send-cmd)3.149 E F0 .649
|
||||
(option. Similarly the program to recei)3.149 F .949 -.15(ve \214)-.25 H
|
||||
.649(les, and its ar).15 F .649(gumets, are gi)-.18 F -.15(ve)-.25 G
|
||||
3.148(nb).15 G 3.148(yt)-3.148 G(he)-3.148 E F3(--r)3.148 E(eceive-)-.37
|
||||
E(cmd)108 556.8 Q F0 1.135(option. F)3.635 F 1.135(or e)-.15 F 1.135(xa\
|
||||
mple, in order to start a picocom session that uses "sz" to transmit \
|
||||
\214les, and "rz" to)-.15 F(recei)108 568.8 Q -.15(ve)-.25 G 2.5(,y).15
|
||||
G(ou ha)-2.5 E .3 -.15(ve t)-.2 H 2.5(os).15 G(ay something lik)-2.5 E
|
||||
2.5(et)-.1 G(his:)-2.5 E(picocom --send-cmd "sz -vv" --recei)108 592.8 Q
|
||||
-.15(ve)-.25 G(-cmd "rz -vv").15 E .309
|
||||
(During the picocom session, if you k)108 616.8 R .609 -.15(ey t)-.1 H
|
||||
.309(he "send" or "recei).15 F -.15(ve)-.25 G 2.809("c).15 G .309
|
||||
(ommands \(e.g. by pressing C-a, C-s, or C-)-2.809 F .43(a, C-r\) you w\
|
||||
ill be prompted for a \214lename. At this prompt you can enter one or m\
|
||||
ore \214le-names, and an)108 628.8 R(y)-.15 E .533(additional ar)108
|
||||
640.8 R .532(guments to the transmission or reception program. Command-\
|
||||
line editing and pathname com-)-.18 F .982(pletion are a)108 652.8 R
|
||||
-.25(va)-.2 G .982(ilable at this prompt, if you ha).25 F 1.283 -.15
|
||||
(ve c)-.2 H .983(ompiled picocom with support for the linenoise library)
|
||||
.15 F(.)-.65 E .077(Pressing 'C-c' at this prompt will cancel the \214l\
|
||||
e transfer command and return to normal picocom operation.)108 664.8 R
|
||||
.597(After entering a \214lename \(and / or additional transmission or \
|
||||
reception program ar)108 676.8 R .598(guments\) and assuming)-.18 F .479
|
||||
(you ha)108 688.8 R .779 -.15(ve n)-.2 H .479(ot canceled the operation\
|
||||
by pressing C-c, picocom will start the the e).15 F .478
|
||||
(xternal program as speci-)-.15 F .352(\214ed by the)108 700.8 R F3
|
||||
(--send-cmd)2.852 E F0 2.852(,o)C(r)-2.852 E F3(--r)2.852 E(eceive-cmd)
|
||||
-.37 E F0 .352(option, and with an)2.852 F 2.852<798c>-.15 G .352
|
||||
(lenames and additional ar)-2.852 F .352(guments you may)-.18 F(ha)108
|
||||
712.8 Q 1.023 -.15(ve s)-.2 H .723
|
||||
(upplied. The standard input and output of the e).15 F .723
|
||||
(xternal program will be connected to the serial port.)-.15 F .522
|
||||
(The standard error of the e)108 724.8 R .523(xternal program will be c\
|
||||
onnected to the terminal which---while the program is)-.15 F 187.62
|
||||
(Manuals User)72 768 R(2)219.56 E 0 Cg EP
|
||||
%%Page: 3 3
|
||||
%%BeginPageSetup
|
||||
BP
|
||||
%%EndPageSetup
|
||||
/F0 10/Times-Roman@0 SF 373.3(picocom\(8\) picocom\(8\))72 48 R/F1 10.95
|
||||
/Times-Bold@0 SF(INPUT)72 84 Q 2.738(,O)-.81 G(UTPUT)-2.738 E 2.738(,A)
|
||||
-.81 G(ND ECHO MAPPING)-2.738 E F0 .373
|
||||
(Using the "--imap", "--omap", and "--emap" options you can mak)108 96 R
|
||||
(e)-.1 E/F2 10/Times-Bold@0 SF(picocom)2.873 E F0 .372
|
||||
(map \(tranlate, replace\) certain)2.873 F .214
|
||||
(special characters after being read from the serial port \(with)108 108
|
||||
R/F3 10/Times-Italic@0 SF(--imap)2.724 E F0 .215
|
||||
(\), before being written to the serial port)2.905 F(\(with)108 120 Q F3
|
||||
(--omap)3.34 E F0 .83(\), and before being locally echoed to the termin\
|
||||
al \(standard output\) if local echo is enabled)3.52 F(\(with)108 132 Q
|
||||
F3(--emap)3.495 E F0 .985(\). These mapping options tak)3.675 F .986
|
||||
(e, each, a single ar)-.1 F .986
|
||||
(gument which is a comma-separated list of)-.18 F
|
||||
(one or more of the follo)108 144 Q(wing identi\214ers:)-.25 E<8a>108
|
||||
160.8 Q(crlf: map CR to LF)123 160.8 Q<8a>108 177.6 Q
|
||||
(crcrlf: map CR to CR + LF)123 177.6 Q<8a>108 194.4 Q(igncr: ignore CR)
|
||||
123 194.4 Q<8a>108 211.2 Q(lfcr: map LF to CR)123 211.2 Q<8a>108 228 Q
|
||||
(lfcrlf: map LF to CR + LF)123 228 Q<8a>108 244.8 Q(ignlf: ignore LF)123
|
||||
244.8 Q<8a>108 261.6 Q(bsdel: map BS --> DEL)123 261.6 Q<8a>108 278.4 Q
|
||||
(delbs: map DEL --> BS)123 278.4 Q -.15(Fo)108 295.2 S 2.5(re).15 G
|
||||
/F0 10/Times-Roman@0 SF 131.795(picocom\(8\) System)72 48 R(Manager')2.5
|
||||
E 2.5(sM)-.55 G 131.795(anual picocom\(8\))-2.5 F .684
|
||||
(running---will re)108 84 R -.15(ve)-.25 G .684
|
||||
(rt to canonical mode. Pressing 'C-c' while the e).15 F .683
|
||||
(xternal program is running will prema-)-.15 F .029(turely terminate it\
|
||||
, and return control to picocom. Pressing 'C-c' at an)108 96 R 2.53(yo)
|
||||
-.15 G .03(ther time, has no special ef)-2.53 F .03(fect; the)-.25 F
|
||||
(character is normally passed to the serial port.)108 108 Q/F1 10.95
|
||||
/Times-Bold@0 SF(INPUT)72 124.8 Q 2.738(,O)-.81 G(UTPUT)-2.738 E 2.738
|
||||
(,A)-.81 G(ND ECHO MAPPING)-2.738 E F0 .036(Using the)108 136.8 R/F2 10
|
||||
/Times-Italic@0 SF(--imap)2.536 E F0(,)A F2(--omap)2.536 E F0 2.536(,a)C
|
||||
(nd)-2.536 E F2(--emap)2.536 E F0 .036(options you can mak)2.536 F 2.536
|
||||
(ep)-.1 G .036(icocom map \(tranlate, replace\) certain special)-2.536 F
|
||||
.777(characters after being read from the serial port \(with)108 148.8 R
|
||||
F2(--imap)3.278 E F0 .778
|
||||
(\), before being written to the serial port \(with)B F2(--omap)108
|
||||
160.8 Q F0 1.051(\), and before being locally echoed to the terminal \(\
|
||||
standard output\) if local echo is enabled \(with)B F2(--emap)108 172.8
|
||||
Q F0 .894(\). These mapping options tak)B .894(e, each, a single ar)-.1
|
||||
F .895(gument which is a comma-separated list of one or)-.18 F .985
|
||||
(more of the follo)108 184.8 R .984(wing identi\214ers: "crlf" \(map CR\
|
||||
to LF\), "crcrlf" \(map CR to CR + LF\), "igncr" \(ignore)-.25 F .197(\
|
||||
CR\), "lfcr" \(map LF to CR\), "lfcrlf" \(map LF to CR + LF\), "ignlf" \
|
||||
\(ignore LF\), "bsdel" \(map BS --> DEL\),)108 196.8 R
|
||||
("delbs" \(map DEL --> BS\))108 208.8 Q -.15(Fo)108 232.8 S 2.5(re).15 G
|
||||
(xample the command:)-2.65 E
|
||||
(picocom --omap crlf,delbs --imap inglf,bsdel --emap crcrlf ...)108
|
||||
314.4 Q .86(will: Replace e)108 333.6 R -.15(ve)-.25 G .86(ry CR \(carr\
|
||||
256.8 Q .86(will: Replace e)108 280.8 R -.15(ve)-.25 G .86(ry CR \(carr\
|
||||
iage return, 0x0d\) caracter with LF \(line feed, 0x0a\) and e).15 F
|
||||
-.15(ve)-.25 G .86(ry DEL \(delete,).15 F .054(0x7f\) character with BS\
|
||||
\(backspace, 0x08\) before writing it to the serial port. Ignore \(not\
|
||||
write to the termi-)108 345.6 R .782(nal\) e)108 357.6 R -.15(ve)-.25 G
|
||||
write to the termi-)108 292.8 R .782(nal\) e)108 304.8 R -.15(ve)-.25 G
|
||||
.781(ry LF character read from the serial port and replace e).15 F -.15
|
||||
(ve)-.25 G .781(ry BS character read from the serial port).15 F 1.42
|
||||
(with DEL. Replace e)108 369.6 R -.15(ve)-.25 G 1.42(ry CR character wi\
|
||||
(with DEL. Replace e)108 316.8 R -.15(ve)-.25 G 1.42(ry CR character wi\
|
||||
th CR and LF when echoing to the terminal \(if local-echo is).15 F
|
||||
(enabled\).)108 381.6 Q F1(OPTIONS)72 405.6 Q F2(picocom)108 417.6 Q F0
|
||||
(accepts the follo)2.5 E(wing command-line options)-.25 E F2
|
||||
(--baud | -b)108 434.4 Q F0
|
||||
(De\214nes the baud-rate to set the serial-port \(terminal\) to.)123
|
||||
446.4 Q F2(--\215o)108 463.2 Q 2.5(w|-)-.1 G(f)-2.5 E F0
|
||||
(De\214nes the \215o)123 475.2 Q
|
||||
(w-control mode to set the serial-port to. Must be one of:)-.25 E<8a>123
|
||||
492 Q(\264x' for xon/xof)138 492 Q 2.5(f\()-.25 G(softw)-2.5 E
|
||||
(are\) mode)-.1 E<8a>123 508.8 Q(\264h' for hardw)138 508.8 Q(are \215o)
|
||||
-.1 E 2.5(wc)-.25 G(ontrol \(R)-2.5 E(TS/CTS\))-.6 E<8a>123 525.6 Q
|
||||
(\264n' for no \215o)138 525.6 Q 2.5(wc)-.25 G(ontrol)-2.5 E(\(Def)123
|
||||
542.4 Q(ault: 'n'\))-.1 E F2(--parity | -p)108 559.2 Q F0
|
||||
(De\214nes the parity mode to set the serial-port to. Must be one of:)
|
||||
123 571.2 Q<8a>123 588 Q(\264o' for odd parity mode.)138 588 Q<8a>123
|
||||
604.8 Q(\264e' for e)138 604.8 Q -.15(ve)-.25 G 2.5(np).15 G
|
||||
(arity mode.)-2.5 E<8a>123 621.6 Q(\264n' for no parity)138 621.6 Q 2.5
|
||||
(,m)-.65 G(ode.)-2.5 E(\(Def)123 638.4 Q(ault: 'n'\))-.1 E F2
|
||||
(--databits | -d)108 655.2 Q F0(De\214nes the number of data bits in e)
|
||||
123 667.2 Q -.15(ve)-.25 G(ry character).15 E 2.5(.M)-.55 G
|
||||
(ust be one of: 5, 6, 7, 8)-2.5 E(\(Def)123 686.4 Q(ault: 8\))-.1 E F2
|
||||
(--esacpe | -e)108 703.2 Q F0 1.151
|
||||
(De\214nes the character that will mak)123 715.2 R 3.651(ep)-.1 G 1.151
|
||||
(icocom enter command-mode \(see description abo)-3.651 F -.15(ve)-.15 G
|
||||
1.15(\). If 'x' is).15 F(gi)123 727.2 Q -.15(ve)-.25 G
|
||||
(n, then C-x will mak).15 E 2.5(ep)-.1 G(icocom enter command mode.)-2.5
|
||||
E(3)535 768 Q 0 Cg EP
|
||||
(enabled\).)108 328.8 Q F1(OPTIONS)72 345.6 Q F0
|
||||
(picocom accepts the follo)108 357.6 Q(wing command-line options)-.25 E
|
||||
/F3 10/Times-Bold@0 SF(--baud | -b)108 374.4 Q F0
|
||||
(De\214nes the baud-rate to set the serial-port \(terminal\) to.)144
|
||||
386.4 Q F3(--\215o)108 403.2 Q 2.5(w|-)-.1 G(f)-2.5 E F0 .33
|
||||
(De\214nes the \215o)144 415.2 R .33(w-control mode to set the serial-p\
|
||||
ort to. Must be one of: 'x' for xon/xof)-.25 F 2.83(f\()-.25 G(softw)
|
||||
-2.83 E(are\))-.1 E(mode, 'h' for hardw)144 427.2 Q(are \215o)-.1 E 2.5
|
||||
(wc)-.25 G(ontrol \(R)-2.5 E(TS/CTS\), 'n' for no \215o)-.6 E 2.5(wc)
|
||||
-.25 G(ontrol. \(Def)-2.5 E(ault: 'n'\))-.1 E F3(--parity | -p)108 444 Q
|
||||
F0 .685(De\214nes the parity mode to set the serial-port to. Must be on\
|
||||
e of: 'o' for odd parity mode, 'e' for)144 456 R -2.15 -.25(ev e)144 468
|
||||
T 2.5(np).25 G(arity mode, 'n' for no parity mode. \(Def)-2.5 E
|
||||
(ault: 'n'\))-.1 E F3(--databits | -d)108 484.8 Q F0
|
||||
(De\214nes the number of data bits in e)144 496.8 Q -.15(ve)-.25 G
|
||||
(ry character).15 E 2.5(.M)-.55 G(ust be one of: 5, 6, 7, 8. \(Def)-2.5
|
||||
E(ault: 8\))-.1 E F3(--esacpe | -e)108 513.6 Q F0 .33
|
||||
(De\214nes the character that will mak)144 525.6 R 2.829(ep)-.1 G .329
|
||||
(icocom enter command-mode \(see description abo)-2.829 F -.15(ve)-.15 G
|
||||
.329(\). If 'x').15 F(is gi)144 537.6 Q -.15(ve)-.25 G
|
||||
(n, then C-x will mak).15 E 2.5(ep)-.1 G
|
||||
(icocom enter command mode. \(Def)-2.5 E(ault: 'a'\))-.1 E F3
|
||||
(--echo | -c)108 554.4 Q F0 .602(Enable local echo. Ev)144 566.4 R .602
|
||||
(ery character being read from the terminal \(standard input\) is echoe\
|
||||
d to the)-.15 F .157(terminal \(standard output\) subject to the echo-m\
|
||||
apping con\214guration \(see)144 578.4 R F2(--emap)2.656 E F0 .156
|
||||
(option. \(Def)2.656 F(ault:)-.1 E(Disabled\))144 590.4 Q F3
|
||||
(--noinit | -i)108 607.2 Q F0 .785(If gi)144 619.2 R -.15(ve)-.25 G .785
|
||||
(n, picocom will not initialize, reset, or otherwise meddle with the se\
|
||||
rial port at start-up. It).15 F 2.743
|
||||
(will just open it. This is useful, for e)144 631.2 R 2.742
|
||||
(xample, for connecting picocom to already-connected)-.15 F .038(modems\
|
||||
, or already con\214gured ports without terminating the connection, or \
|
||||
altering the settings. If)144 643.2 R(required serial port parameters c\
|
||||
an then be adjusted at run-time by commands.)144 655.2 Q F3(--nor)108
|
||||
672 Q(eset | -r)-.18 E F0 .397(If gi)144 684 R -.15(ve)-.25 G .397
|
||||
(n, picocom will not *reset* the serial port when e).15 F .396
|
||||
(xiting. It will just close the \214ledes and do)-.15 F .696
|
||||
(nothing more. This is useful, for e)144 696 R .696(xample, for lea)-.15
|
||||
F .696(ving modems connected when e)-.2 F .697(xiting picocom.)-.15 F
|
||||
(Re)144 708 Q -.05(ga)-.15 G .546(rdless whether the).05 F F2(--nor)
|
||||
3.046 E(eset)-.37 E F0 .546(option is gi)3.046 F -.15(ve)-.25 G 3.045
|
||||
(nt).15 G .545(he user can e)-3.045 F .545
|
||||
(xit picocom using the "Quit" com-)-.15 F .821
|
||||
(mand \(instead of "Exit"\), which ne)144 720 R -.15(ve)-.25 G 3.321(rr)
|
||||
.15 G .821(esets the serial port. If)-3.321 F F2(--nor)3.321 E(eset)-.37
|
||||
E F0 .822(is gi)3.321 F -.15(ve)-.25 G 3.322(nt).15 G .822
|
||||
(hen "Quit" and)-3.322 F 187.62(Manuals User)72 768 R(3)219.56 E 0 Cg EP
|
||||
%%Page: 4 4
|
||||
%%BeginPageSetup
|
||||
BP
|
||||
%%EndPageSetup
|
||||
/F0 10/Times-Roman@0 SF 373.3(picocom\(8\) picocom\(8\))72 48 R(\(Def)
|
||||
123 84 Q(ault: 'a'\))-.1 E/F1 10/Times-Bold@0 SF(--echo | -c)108 100.8 Q
|
||||
F0 .193(Enable local echo. Ev)123 112.8 R .193(ery character being read\
|
||||
from the terminal \(standard input\) is echoed to the termi-)-.15 F(na\
|
||||
l \(standard output\) subject to the echo-mapping con\214guration \(see)
|
||||
123 124.8 Q/F2 10/Times-Italic@0 SF(--emap)2.51 E F0(option.)2.69 E
|
||||
(\(Def)123 144 Q(ault: Disabled\))-.1 E F1(--noinit | -i)108 160.8 Q F0
|
||||
.847(If gi)123 172.8 R -.15(ve)-.25 G(n,).15 E F1(picocom)3.347 E F0
|
||||
.846(will not initialize, reset, or otherwise meddle with the serial po\
|
||||
rt at start-up. It will)3.347 F 1.705
|
||||
(just open it. This is useful, for e)123 184.8 R 1.706
|
||||
(xample, for connecting)-.15 F F1(picocom)4.206 E F0 1.706
|
||||
(to already-connected modems, or)4.206 F .864(already con\214gured port\
|
||||
s without terminating the connection, or altering the settings. If requ\
|
||||
ired serial)123 196.8 R
|
||||
(port parameters can then be adjusted at run-time by commands.)123 208.8
|
||||
Q F1(--nor)108 225.6 Q(eset | -r)-.18 E F0 .18(If gi)123 237.6 R -.15
|
||||
(ve)-.25 G(n,).15 E F1(picocom)2.68 E F0 .18
|
||||
(will not *reset* the serial port when e)2.68 F .18
|
||||
(xiting. It will just close the \214ledes and do noth-)-.15 F .798
|
||||
(ing more. This is useful, for e)123 249.6 R .798(xample, for lea)-.15 F
|
||||
.798(ving modems connected when e)-.2 F(xiting)-.15 E F1 .797
|
||||
(picocom picocom)3.297 F F0 .42
|
||||
(using the "Quit" command \(instead of "Exit"\), which ne)123 261.6 R
|
||||
-.15(ve)-.25 G 2.92(rr).15 G .42
|
||||
(esets the serial port. If "--noreset" is gi)-2.92 F -.15(ve)-.25 G(n)
|
||||
.15 E(then "Quit" and "Exit" beha)123 273.6 Q .3 -.15(ve e)-.2 H
|
||||
(ssentially the same.).15 E F1(--nolock | -l)108 290.4 Q F0 2.07(If gi)
|
||||
123 302.4 R -.15(ve)-.25 G(n,).15 E F1(picocom)4.57 E F0 2.07(will *not\
|
||||
* attempt to lock the serial port before opening it. Normally picocom)
|
||||
4.57 F .456(attempts to get a UUCP-style lock-\214le \(e.g. "/v)123
|
||||
314.4 R .456(ar/lock/LCK..ttyS0"\) before opening the port. F)-.25 F
|
||||
.457(ailing to)-.15 F .914(do so, results in the program e)123 326.4 R
|
||||
.914(xiting after emitting an error)-.15 F .913
|
||||
(-message. It is possible that your picocom)-.2 F
|
||||
(binary is compiled without this option.)123 338.4 Q F1(--send-cmd | -s)
|
||||
108 355.2 Q F0(Speci\214es the e)123 367.2 Q(xternal program \(and an)
|
||||
-.15 E 2.5(ya)-.15 G -.18(rg)-2.5 G
|
||||
(uments to it\) that will be used for transmitting \214les.).18 E(Def)
|
||||
123 386.4 Q(ault: "sz -vv")-.1 E F1(--r)108 403.2 Q(ecei)-.18 E -.1(ve)
|
||||
-.1 G(-cmd | -v).1 E F0(Speci\214es the e)123 415.2 Q
|
||||
(xternal program \(and an)-.15 E 2.5(ya)-.15 G -.18(rg)-2.5 G
|
||||
(uments to it\) that will be used for recei).18 E(ving \214les.)-.25 E
|
||||
(\(Def)123 434.4 Q(ault: "rz -vv"\))-.1 E F1(--imap)108 451.2 Q F0 .324
|
||||
(Speci\214es the input character map \(i.e. special characters to be re\
|
||||
placed when read from the serial port\).)123 463.2 R
|
||||
(Example: "--imap crlf,delbs")123 475.2 Q(\(Def)123 494.4 Q
|
||||
(aul: Empty\))-.1 E F1(--omap)108 511.2 Q F0 .752(Speci\214es the outpu\
|
||||
t character map \(i.e. special characters to be replaced before being w\
|
||||
ritten to serial)123 523.2 R(port\). Example: "--omap crcrlf,bsdel")123
|
||||
535.2 Q(\(Def)123 554.4 Q(aul: Empty\))-.1 E F1(--emap)108 571.2 Q F0
|
||||
.572(Speci\214es the local-echo character map \(i.e. special characters\
|
||||
to be replaced before being echoed-back)123 583.2 R(to the terminal, i\
|
||||
f local-echo is enabled\). Example: "--emap crcrlf,bsdel")123 595.2 Q
|
||||
(\(Def)123 614.4 Q(aul: delbs,crcrlf\))-.1 E F1(--help | -h)108 631.2 Q
|
||||
F0(Print a short help message describing the command-line options.)123
|
||||
643.2 Q/F3 10.95/Times-Bold@0 SF -.548(AU)72 660 S(THOR).548 E F0
|
||||
(picocom w)108 672 Q(as written by Nick P)-.1 E(ata)-.15 E -.25(va)-.2 G
|
||||
(lis \(npat@ef).25 E(ault.net\))-.1 E F3 -1.04 -1.588(AV A)72 696 T
|
||||
(ILABILITY)1.588 E F0(The latest v)108 708 Q
|
||||
/F0 10/Times-Roman@0 SF 131.795(picocom\(8\) System)72 48 R(Manager')2.5
|
||||
E 2.5(sM)-.55 G 131.795(anual picocom\(8\))-2.5 F("Exit" beha)144 84 Q
|
||||
.3 -.15(ve e)-.2 H(ssentially the same.).15 E/F1 10/Times-Bold@0 SF
|
||||
(--nolock | -l)108 100.8 Q F0 .744(If gi)144 112.8 R -.15(ve)-.25 G .744
|
||||
(n, picocom will *not* attempt to lock the serial port before opening i\
|
||||
t. Normally picocom).15 F .388
|
||||
(attempts to get a UUCP-style lock-\214le \(e.g. "/v)144 124.8 R .389
|
||||
(ar/lock/LCK..ttyS0"\) before opening the port. F)-.25 F(ail-)-.15 E
|
||||
.294(ing to do so, results in the program e)144 136.8 R .294
|
||||
(xiting after emitting an error)-.15 F .294
|
||||
(-message. It is possible that your)-.2 F
|
||||
(picocom binary is compiled without this option.)144 148.8 Q F1
|
||||
(--send-cmd | -s)108 165.6 Q F0 1.101(Speci\214es the e)144 177.6 R
|
||||
1.101(xternal program \(and an)-.15 F 3.601(ya)-.15 G -.18(rg)-3.601 G
|
||||
1.102(uments to it\) that will be used for transmitting \214les.).18 F
|
||||
(\(Def)144 189.6 Q(ault: "sz -vv"\))-.1 E F1(--r)108 206.4 Q(ecei)-.18 E
|
||||
-.1(ve)-.1 G(-cmd | -v).1 E F0 1.86(Speci\214es the e)144 218.4 R 1.86
|
||||
(xternal program \(and an)-.15 F 4.36(ya)-.15 G -.18(rg)-4.36 G 1.86
|
||||
(uments to it\) that will be used for recei).18 F 1.86(ving \214les.)
|
||||
-.25 F(\(Def)144 230.4 Q(ault: "rz -vv"\))-.1 E F1(--imap)108 247.2 Q F0
|
||||
.575(Speci\214es the input character map \(i.e. special characters to b\
|
||||
e replaced when read from the serial)144 247.2 R
|
||||
(port\). Example: "--imap crlf,delbs". \(Def)144 259.2 Q(aul: Empty\))
|
||||
-.1 E F1(--omap)108 276 Q F0 1.031(Speci\214es the output character map\
|
||||
\(i.e. special characters to be replaced before being written to)144
|
||||
276 R(serial port\). Example: "--omap crcrlf,bsdel". \(Def)144 288 Q
|
||||
(aul: Empty\))-.1 E F1(--emap)108 304.8 Q F0 .408(Speci\214es the local\
|
||||
-echo character map \(i.e. special characters to be replaced before bei\
|
||||
ng echoed-)144 304.8 R 4.24(back to the terminal, if local-echo is enab\
|
||||
led\). Example: "--emap crcrlf,bsdel". \(Def)144 316.8 R(aul:)-.1 E
|
||||
(delbs,crcrlf\))144 328.8 Q F1(--help | -h)108 345.6 Q F0
|
||||
(Print a short help message describing the command-line options.)144
|
||||
357.6 Q/F2 10.95/Times-Bold@0 SF -.548(AU)72 374.4 S(THOR).548 E F0
|
||||
(picocom w)108 386.4 Q(as written by Nick P)-.1 E(ata)-.15 E -.25(va)-.2
|
||||
G(lis \(npat@ef).25 E(ault.net\))-.1 E F2 -1.04 -1.588(AV A)72 403.2 T
|
||||
(ILABILITY)1.588 E F0(The latest v)108 415.2 Q
|
||||
(ersion of "picocom" can be do)-.15 E(wnloaded from:)-.25 E F1
|
||||
(http://code.google.com/p/picocom/)2.5 E F0(4)535 768 Q 0 Cg EP
|
||||
(http://code.google.com/p/picocom/)2.5 E F0 187.62(Manuals User)72 768 R
|
||||
(4)219.56 E 0 Cg EP
|
||||
%%Trailer
|
||||
end
|
||||
%%EOF
|
||||
|
585
picocom.8.xml
585
picocom.8.xml
@ -1,21 +1,19 @@
|
||||
<?xml version="1.0" standalone='no'?>
|
||||
<!DOCTYPE manpage SYSTEM "xmlmp-1.1.dtd">
|
||||
<!DOCTYPE manpage SYSTEM "xmltoman.dtd">
|
||||
|
||||
<manpage
|
||||
title="picocom"
|
||||
name="picocom"
|
||||
section="8"
|
||||
desc="minimal dumb-terminal emulation program">
|
||||
|
||||
<synopsis>
|
||||
<synel>
|
||||
picocom [ <arg>options</arg> ] <arg>device</arg>
|
||||
</synel>
|
||||
<cmd>picocom [ <arg>options</arg> ] <arg>device</arg></cmd>
|
||||
</synopsis>
|
||||
|
||||
<description>
|
||||
|
||||
<p>
|
||||
As its name suggests, <cmd>picocom</cmd> is a minimal
|
||||
As its name suggests, <b>picocom</b> is a minimal
|
||||
dumb-terminal emulation program. It is, in principle, very much
|
||||
like <manref name="minicom" section="1"/>, only it's "pico"
|
||||
instead of "mini"! It was designed to serve as a simple, manual,
|
||||
@ -28,25 +26,25 @@
|
||||
</p>
|
||||
|
||||
<p>
|
||||
When <cmd>picocom</cmd> starts it opens the terminal (serial
|
||||
When <b>picocom</b> starts it opens the terminal (serial
|
||||
device) given as its non-option argument. Unless the
|
||||
<arg>--noinit</arg> option is given, it configures the device to
|
||||
the settings specified by the option-arguments (or to some
|
||||
default settings), and sets it to "raw" mode. If
|
||||
<arg>--noinit</arg> is given, the initialization and
|
||||
configuration is skipped; the device is just opened. Following
|
||||
this, <cmd>picocom</cmd> sets the standard-input and
|
||||
this, <b>picocom</b> sets the standard-input and
|
||||
standard-output to raw mode. Having done so, it goes in a loop
|
||||
where it listens for input from stdin, or from the serial
|
||||
port. Input from the serial port is copied to the standard
|
||||
output while input from the standard input is copied to the
|
||||
serial port. <cmd>picocom</cmd> also scans its input stream for
|
||||
serial port. <b>picocom</b> also scans its input stream for
|
||||
a user-specified control character, called the "escape
|
||||
character" (being by default "C-a"). If the escape character is
|
||||
seen, then instead of sending it to the serial-device, the
|
||||
program enters "command mode" and waits for the next character
|
||||
(which is called the "function character"). Depending on the
|
||||
value of the function character, <cmd>picocom</cmd> performs one
|
||||
value of the function character, <b>picocom</b> performs one
|
||||
of the operations described in the "Commands" section below.
|
||||
</p>
|
||||
</description>
|
||||
@ -54,142 +52,95 @@
|
||||
<section name="COMMANDS">
|
||||
|
||||
<p>
|
||||
Commands are given to <cmd>picocom</cmd> by first keying the
|
||||
"espace character" which by default is "C-a" (see "Options"
|
||||
below on how to change it), and then keying one for the function
|
||||
(command) characters shown here.
|
||||
Commands are given to <b>picocom</b> by first keying the "espace
|
||||
character" which by default is "C-a" (see "Options" below on how
|
||||
to change it), and then keying one for the function (command)
|
||||
characters shown here.
|
||||
</p>
|
||||
|
||||
<dl>
|
||||
<dt>[escape character]</dt>
|
||||
<dd>
|
||||
<p>
|
||||
Send the escape character to the serial port and return to
|
||||
"transparent" mode. This means that if the escape character
|
||||
("C-a", by default) is typed twice, the program sends the
|
||||
escape character to the serial port, and remains in
|
||||
transparent mode. This is a new behavior implemented in
|
||||
v1.4. Previously picocom used to ignore the escape-character
|
||||
when it was entered as a function character.
|
||||
</p>
|
||||
</dd>
|
||||
<p>
|
||||
[escape character]: Send the escape character to the serial port
|
||||
and return to "transparent" mode. This means that if the escape
|
||||
character ("C-a", by default) is typed twice, the program sends
|
||||
the escape character to the serial port, and remains in
|
||||
transparent mode. This is a new behavior implemented in
|
||||
v1.4. Previously picocom used to ignore the escape-character
|
||||
when it was entered as a function character.
|
||||
</p>
|
||||
|
||||
<dt>C-x</dt>
|
||||
<dd>
|
||||
<p>
|
||||
Exit the program: if the "--noreset" option was not given
|
||||
then the serial port is reset to its original settings
|
||||
before exiting; if it was given the serial port is not
|
||||
reset.
|
||||
</p>
|
||||
</dd>
|
||||
<p>
|
||||
[C-x]: Exit the program: if the <arg>--noreset</arg> 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>
|
||||
|
||||
<dt>C-q</dt>
|
||||
<dd>
|
||||
<p>
|
||||
Quit the program *without* reseting the serial port,
|
||||
regardless of the "--noreset" option.
|
||||
</p>
|
||||
</dd>
|
||||
<p>
|
||||
[C-q]: Quit the program *without* reseting the serial port,
|
||||
regardless of the <arg>--noreset</arg> option.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
[C-p]: Pulse the DTR line. Lower it for 1 sec, and then raise it
|
||||
again.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
[C-t]: Toggle the DTR line. If DTR is up, then lower it. If it
|
||||
is down, then raise it.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
[C-backslash]: Generate a break sequence on the serial line. A
|
||||
break sequence is usually generated by marking (driving to
|
||||
logical one) the serial Tx line for an amount of time
|
||||
coresponding to several character durations.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
[C-u]: Baud up. Increase the baud-rate. The list of baud-rates
|
||||
stepped-through by this command is: 300, 600, 1200, 2400, 4800,
|
||||
9600, 19200, 38400, 57600, 115200.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
[C-d]: Baud down. Decrease the baud-rate. The list of baud-rates
|
||||
stepped-through by this command is the same as for the "baud-up"
|
||||
command.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
[C-f]: Cycle through flow-control settings (RTS/CTS, XON/XOFF,
|
||||
none).
|
||||
</p>
|
||||
|
||||
<p>
|
||||
[C-y]: Cycle through parity settings (even, odd, none).
|
||||
</p>
|
||||
|
||||
<p>
|
||||
[C-b]: Cycle through databits-number settings (5, 6, 7, 8).
|
||||
</p>
|
||||
|
||||
<p>
|
||||
[C-c]: Toggle local-echo mode.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
[C-v]: Show program options (like baud rate, data bits,
|
||||
etc). Only the options that can be modified online (through
|
||||
commands) are shown, not those that can only be set at the
|
||||
command-line.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
[C-s]: Send (upload) a file (see "Sending and Receiving Files"
|
||||
below)
|
||||
</p>
|
||||
|
||||
<dt>C-p</dt>
|
||||
<dd>
|
||||
<p>
|
||||
Pulse the DTR line. Lower it for 1 sec, and then raise it
|
||||
again.
|
||||
</p>
|
||||
</dd>
|
||||
|
||||
<dt>C-t</dt>
|
||||
<dd>
|
||||
<p>
|
||||
Toggle the DTR line. If DTR is up, then lower it. If it is
|
||||
down, then raise it.
|
||||
</p>
|
||||
</dd>
|
||||
|
||||
<dt>C-backslash</dt>
|
||||
<dd>
|
||||
<p>
|
||||
Generate a break sequence on the serial line. A break
|
||||
sequence is usually generated by marking (driving to logical
|
||||
one) the serial Tx line for an amount of time coresponding
|
||||
to several character durations.
|
||||
</p>
|
||||
</dd>
|
||||
|
||||
<dt>C-u</dt>
|
||||
<dd>
|
||||
<p>
|
||||
Baud up. Increase the baud-rate. The list of baud-rates
|
||||
stepped-through by this command is: 300, 600, 1200, 2400,
|
||||
4800, 9600, 19200, 38400, 57600, 115200.
|
||||
</p>
|
||||
</dd>
|
||||
|
||||
<dt>C-d</dt>
|
||||
<dd>
|
||||
<p>
|
||||
Baud down. Decrease the baud-rate. The list of baud-rates
|
||||
stepped-through by this command is the same as for the
|
||||
"baud-up" command.
|
||||
</p>
|
||||
</dd>
|
||||
|
||||
<dt>C-f</dt>
|
||||
<dd>
|
||||
<p>
|
||||
Cycle through flow-control settings (RTS/CTS, XON/XOFF, none).
|
||||
</p>
|
||||
</dd>
|
||||
|
||||
<dt>C-y</dt>
|
||||
<dd>
|
||||
<p>
|
||||
Cycle through parity settings (even, odd, none).
|
||||
</p>
|
||||
</dd>
|
||||
|
||||
<dt>C-b</dt>
|
||||
<dd>
|
||||
<p>
|
||||
Cycle through databits-number settings (5, 6, 7, 8).
|
||||
</p>
|
||||
</dd>
|
||||
|
||||
<dt>C-c</dt>
|
||||
<dd>
|
||||
<p>
|
||||
Toggle local-echo mode.
|
||||
</p>
|
||||
</dd>
|
||||
|
||||
<dt>C-v</dt>
|
||||
<dd>
|
||||
<p>
|
||||
Show program options (like baud rate, data bits, etc). Only
|
||||
the options that can be modified online (through commands)
|
||||
are shown, not those that can only be set at the
|
||||
command-line.
|
||||
</p>
|
||||
</dd>
|
||||
|
||||
<dt>C-s</dt>
|
||||
<dd>
|
||||
<p>
|
||||
Send (upload) a file (see "Sending and Receiving Files"
|
||||
below)
|
||||
</p>
|
||||
</dd>
|
||||
|
||||
<dt>C-r</dt>
|
||||
<dd>
|
||||
<p>
|
||||
Receive (download) a file (see "Sending and Receiving Files"
|
||||
below)
|
||||
</p>
|
||||
</dd>
|
||||
</dl>
|
||||
<p>
|
||||
[C-r]: Receive (download) a file (see "Sending and Receiving
|
||||
Files" below)
|
||||
</p>
|
||||
|
||||
<p>
|
||||
After performing one of the above operations the program leaves
|
||||
@ -206,36 +157,34 @@
|
||||
|
||||
<section name = "SENDING AND RECEIVING FILES">
|
||||
<p>
|
||||
<cmd>picocom</cmd> can send and receive files over the serial
|
||||
port using external programs that implement the respective
|
||||
<b>picocom</b> can send and receive files over the serial port
|
||||
using external programs that implement the respective
|
||||
protocols. In Linux typical programs for this purpose are:
|
||||
</p>
|
||||
|
||||
<ul>
|
||||
<li><p><manref name="rx" section="1"/>
|
||||
- receive using the X-MODEM protocol</p></li>
|
||||
<li><p><manref name="rb" section="1"/>
|
||||
- receive using the Y-MODEM protocol</p></li>
|
||||
<li><p><manref name="rz" section="1"/>
|
||||
- receive using the Z-MODEM protocol</p></li>
|
||||
<li><p><manref name="sx" section="1"/>
|
||||
- send using the X-MODEM protocol</p></li>
|
||||
<li><p><manref name="sb" section="1"/>
|
||||
- send using the Y-MODEM protocol</p></li>
|
||||
<li><p><manref name="sz" section="1"/>
|
||||
- send using the Z-MODEM protocol</p></li>
|
||||
<li><p><manref name="ascii-xfr" section="1"/>
|
||||
- receive or transmit ASCII files</p></li>
|
||||
</ul>
|
||||
<p><manref name="rx" section="1"/>
|
||||
- receive using the X-MODEM protocol</p>
|
||||
<p><manref name="rb" section="1"/>
|
||||
- receive using the Y-MODEM protocol</p>
|
||||
<p><manref name="rz" section="1"/>
|
||||
- receive using the Z-MODEM protocol</p>
|
||||
<p><manref name="sx" section="1"/>
|
||||
- send using the X-MODEM protocol</p>
|
||||
<p><manref name="sb" section="1"/>
|
||||
- send using the Y-MODEM protocol</p>
|
||||
<p><manref name="sz" section="1"/>
|
||||
- send using the Z-MODEM protocol</p>
|
||||
<p><manref name="ascii-xfr" section="1"/>
|
||||
- receive or transmit ASCII files</p>
|
||||
|
||||
<p>
|
||||
The name of, and the command-line options to, the program to be
|
||||
used for transmitting files are given by the "--send-cmd"
|
||||
option. Similarly the program to receive files, and its
|
||||
argumets, are given by the "--receive-cmd" option. For example,
|
||||
in order to start a <cmd>picocom</cmd> session that uses "sz" to
|
||||
transmit files, and "rz" to receive, you have to say something
|
||||
like this:
|
||||
used for transmitting files are given by the
|
||||
<arg>--send-cmd</arg> option. Similarly the program to receive
|
||||
files, and its argumets, are given by the
|
||||
<arg>--receive-cmd</arg> option. For example, in order to start
|
||||
a <b>picocom</b> session that uses "sz" to transmit files, and
|
||||
"rz" to receive, you have to say something like this:
|
||||
</p>
|
||||
|
||||
<p>
|
||||
@ -247,45 +196,44 @@
|
||||
commands (e.g. by pressing C-a, C-s, or C-a, C-r) you will be
|
||||
prompted for a filename. At this prompt you can enter one or
|
||||
more file-names, and any additional arguments to the
|
||||
transmission or reception program. After that, picocom will
|
||||
start the the external program as specified by the "--send-cmd",
|
||||
or "--receive-cmd" option, and with any filenames and additional
|
||||
arguments you may have supplied. The standard input and output
|
||||
of the external program will be connected to the serial
|
||||
port. The standard error of the external program will be
|
||||
connected to the terminal which---while the program is
|
||||
running---will revert to canonical mode. Pressing 'C-c' while
|
||||
the external program is running will prematurely terminate it,
|
||||
and return control to <cmd>picocom</cmd>. Pressing 'C-c' at any other
|
||||
time, has no special effect; the character is normally passed to
|
||||
the serial port.
|
||||
transmission or reception program. Command-line editing and
|
||||
pathname completion are available at this prompt, if you have
|
||||
compiled picocom with support for the linenoise
|
||||
library. Pressing 'C-c' at this prompt will cancel the file
|
||||
transfer command and return to normal <b>picocom</b>
|
||||
operation. After entering a filename (and / or additional
|
||||
transmission or reception program arguments) and assuming you
|
||||
have not canceled the operation by pressing C-c, picocom will
|
||||
start the the external program as specified by the
|
||||
<arg>--send-cmd</arg>, or <arg>--receive-cmd</arg> option, and
|
||||
with any filenames and additional arguments you may have
|
||||
supplied. The standard input and output of the external program
|
||||
will be connected to the serial port. The standard error of the
|
||||
external program will be connected to the terminal which---while
|
||||
the program is running---will revert to canonical mode. Pressing
|
||||
'C-c' while the external program is running will prematurely
|
||||
terminate it, and return control to <b>picocom</b>. Pressing
|
||||
'C-c' at any other time, has no special effect; the character is
|
||||
normally passed to the serial port.
|
||||
</p>
|
||||
|
||||
</section>
|
||||
|
||||
<section name = "INPUT, OUTPUT, AND ECHO MAPPING">
|
||||
<p>
|
||||
Using the "--imap", "--omap", and "--emap" options you can make
|
||||
<cmd>picocom</cmd> map (tranlate, replace) certain special
|
||||
characters after being read from the serial port (with
|
||||
<arg>--imap</arg>), before being written to the serial port
|
||||
(with <arg>--omap</arg>), and before being locally echoed to the
|
||||
terminal (standard output) if local echo is enabled (with
|
||||
<arg>--emap</arg>). These mapping options take, each, a single
|
||||
argument which is a comma-separated list of one or more of the
|
||||
following identifiers:
|
||||
Using the <arg>--imap</arg>, <arg>--omap</arg>, and
|
||||
<arg>--emap</arg> options you can make <b>picocom</b> map
|
||||
(tranlate, replace) certain special characters after being read
|
||||
from the serial port (with <arg>--imap</arg>), before being
|
||||
written to the serial port (with <arg>--omap</arg>), and before
|
||||
being locally echoed to the terminal (standard output) if local
|
||||
echo is enabled (with <arg>--emap</arg>). These mapping options
|
||||
take, each, a single argument which is a comma-separated list of
|
||||
one or more of the following identifiers: "crlf" (map CR to LF),
|
||||
"crcrlf" (map CR to CR + LF), "igncr" (ignore CR), "lfcr" (map
|
||||
LF to CR), "lfcrlf" (map LF to CR + LF), "ignlf" (ignore LF),
|
||||
"bsdel" (map BS --> DEL), "delbs" (map DEL --> BS)
|
||||
</p>
|
||||
|
||||
<ul>
|
||||
<li>crlf: map CR to LF</li>
|
||||
<li>crcrlf: map CR to CR + LF</li>
|
||||
<li>igncr: ignore CR</li>
|
||||
<li>lfcr: map LF to CR</li>
|
||||
<li>lfcrlf: map LF to CR + LF</li>
|
||||
<li>ignlf: ignore LF</li>
|
||||
<li>bsdel: map BS --> DEL</li>
|
||||
<li>delbs: map DEL --> BS</li>
|
||||
</ul>
|
||||
|
||||
<p>
|
||||
For example the command:
|
||||
@ -304,112 +252,112 @@
|
||||
</p>
|
||||
</section>
|
||||
|
||||
<section name = "OPTIONS">
|
||||
<options>
|
||||
<p>
|
||||
<cmd>picocom</cmd> accepts the following command-line options
|
||||
<b>picocom</b> accepts the following command-line options
|
||||
</p>
|
||||
|
||||
<dl>
|
||||
<dt>--baud | -b</dt>
|
||||
<dd>
|
||||
<option>
|
||||
<opt><p>--baud | -b</p></opt>
|
||||
<optdesc>
|
||||
<p>
|
||||
Defines the baud-rate to set the serial-port (terminal) to.
|
||||
</p>
|
||||
</dd>
|
||||
</optdesc>
|
||||
</option>
|
||||
|
||||
<dt>--flow | -f</dt>
|
||||
<dd>
|
||||
<option>
|
||||
<opt><p>--flow | -f</p></opt>
|
||||
<optdesc>
|
||||
<p>
|
||||
Defines the flow-control mode to set the serial-port to. Must be
|
||||
one of:
|
||||
Defines the flow-control mode to set the serial-port
|
||||
to. Must be one of: 'x' for xon/xoff (software) mode, 'h'
|
||||
for hardware flow control (RTS/CTS), 'n' for no flow
|
||||
control. (Default: 'n')
|
||||
</p>
|
||||
<ul>
|
||||
<li><p>\'x' for xon/xoff (software) mode</p></li>
|
||||
<li><p>\'h' for hardware flow control (RTS/CTS)</p></li>
|
||||
<li><p>\'n' for no flow control</p></li>
|
||||
</ul>
|
||||
<p>(Default: 'n')</p>
|
||||
</dd>
|
||||
|
||||
<dt>--parity | -p</dt>
|
||||
<dd>
|
||||
<p>
|
||||
Defines the parity mode to set the serial-port to.
|
||||
Must be one of:
|
||||
</p>
|
||||
<ul>
|
||||
<li><p>\'o' for odd parity mode.</p></li>
|
||||
<li><p>\'e' for even parity mode.</p></li>
|
||||
<li><p>\'n' for no parity, mode.</p></li>
|
||||
</ul>
|
||||
<p>(Default: 'n')</p>
|
||||
</dd>
|
||||
</optdesc>
|
||||
</option>
|
||||
|
||||
<dt>--databits | -d</dt>
|
||||
<dd>
|
||||
<option>
|
||||
<opt><p>--parity | -p</p></opt>
|
||||
<optdesc>
|
||||
<p>
|
||||
Defines the number of data bits in every character. Must be one of:
|
||||
5, 6, 7, 8
|
||||
Defines the parity mode to set the serial-port to. Must be
|
||||
one of: 'o' for odd parity mode, 'e' for even parity mode,
|
||||
'n' for no parity mode. (Default: 'n')
|
||||
</p>
|
||||
<p>(Default: 8)</p>
|
||||
</dd>
|
||||
|
||||
<dt>--esacpe | -e</dt>
|
||||
<dd>
|
||||
</optdesc>
|
||||
</option>
|
||||
|
||||
<option>
|
||||
<opt><p>--databits | -d</p></opt>
|
||||
<optdesc>
|
||||
<p>
|
||||
Defines the character that will make picocom enter command-mode
|
||||
(see description above). If 'x' is given, then C-x will
|
||||
make picocom enter command mode.
|
||||
Defines the number of data bits in every character. Must be
|
||||
one of: 5, 6, 7, 8. (Default: 8)
|
||||
</p>
|
||||
</optdesc>
|
||||
</option>
|
||||
|
||||
<option>
|
||||
<opt><p>--esacpe | -e</p></opt>
|
||||
<optdesc>
|
||||
<p>
|
||||
(Default: 'a')
|
||||
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')
|
||||
</p>
|
||||
</dd>
|
||||
|
||||
<dt>--echo | -c</dt>
|
||||
<dd>
|
||||
</optdesc>
|
||||
</option>
|
||||
|
||||
<option>
|
||||
<opt><p>--echo | -c</p></opt>
|
||||
<optdesc>
|
||||
<p>
|
||||
Enable local echo. Every character being read from the
|
||||
terminal (standard input) is echoed to the terminal
|
||||
(standard output) subject to the echo-mapping configuration
|
||||
(see <arg>--emap</arg> option.
|
||||
(see <arg>--emap</arg> option. (Default: Disabled)
|
||||
</p>
|
||||
</optdesc>
|
||||
</option>
|
||||
|
||||
<option>
|
||||
<opt><p>--noinit | -i</p></opt>
|
||||
<optdesc>
|
||||
<p>
|
||||
(Default: Disabled)
|
||||
</p>
|
||||
</dd>
|
||||
|
||||
<dt>--noinit | -i</dt>
|
||||
<dd>
|
||||
<p>
|
||||
If given, <cmd>picocom</cmd> will not initialize, reset, or
|
||||
If given, <b>picocom</b> will not initialize, reset, or
|
||||
otherwise meddle with the serial port at start-up. It will
|
||||
just open it. This is useful, for example, for connecting
|
||||
<cmd>picocom</cmd> to already-connected modems, or already
|
||||
<b>picocom</b> to already-connected modems, or already
|
||||
configured ports without terminating the connection, or
|
||||
altering the settings. If required serial port parameters
|
||||
can then be adjusted at run-time by commands.
|
||||
</p>
|
||||
</dd>
|
||||
|
||||
<dt>--noreset | -r</dt>
|
||||
<dd>
|
||||
</optdesc>
|
||||
</option>
|
||||
|
||||
<option>
|
||||
<opt><p>--noreset | -r</p></opt>
|
||||
<optdesc>
|
||||
<p>
|
||||
If given, <cmd>picocom</cmd> will not *reset* the serial
|
||||
port when exiting. It will just close the filedes and do
|
||||
nothing more. This is useful, for example, for leaving
|
||||
modems connected when exiting <cmd>picocom</cmd>. Regardless
|
||||
whether the "--noreset" option is given the user can exit
|
||||
<cmd>picocom</cmd> using the "Quit" command (instead of
|
||||
"Exit"), which never resets the serial port. If "--noreset"
|
||||
If given, <b>picocom</b> 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 <b>picocom</b>. Regardless whether
|
||||
the <arg>--noreset</arg> option is given the user can exit
|
||||
<b>picocom</b> using the "Quit" command (instead of "Exit"),
|
||||
which never resets the serial port. If <arg>--noreset</arg>
|
||||
is given then "Quit" and "Exit" behave essentially the same.
|
||||
</p>
|
||||
</dd>
|
||||
|
||||
<dt>--nolock | -l</dt>
|
||||
<dd>
|
||||
</optdesc>
|
||||
</option>
|
||||
|
||||
<option>
|
||||
<opt><p>--nolock | -l</p></opt>
|
||||
<optdesc>
|
||||
<p>
|
||||
If given, <cmd>picocom</cmd> will *not* attempt to lock the
|
||||
If given, <b>picocom</b> will *not* attempt to lock the
|
||||
serial port before opening it. Normally picocom attempts to
|
||||
get a UUCP-style lock-file (e.g. "/var/lock/LCK..ttyS0")
|
||||
before opening the port. Failing to do so, results in the
|
||||
@ -417,77 +365,76 @@
|
||||
possible that your picocom binary is compiled without this
|
||||
option.
|
||||
</p>
|
||||
</dd>
|
||||
|
||||
<dt>--send-cmd | -s</dt>
|
||||
<dd>
|
||||
</optdesc>
|
||||
</option>
|
||||
|
||||
<option>
|
||||
<opt><p>--send-cmd | -s</p></opt>
|
||||
<optdesc>
|
||||
<p>
|
||||
Specifies the external program (and any arguments to it)
|
||||
that will be used for transmitting files.
|
||||
that will be used for transmitting files. (Default: "sz
|
||||
-vv")
|
||||
</p>
|
||||
<p>
|
||||
Default: "sz -vv"
|
||||
</p>
|
||||
</dd>
|
||||
|
||||
<dt>--receive-cmd | -v</dt>
|
||||
<dd>
|
||||
</optdesc>
|
||||
</option>
|
||||
|
||||
<option>
|
||||
<opt><p>--receive-cmd | -v</p></opt>
|
||||
<optdesc>
|
||||
<p>
|
||||
Specifies the external program (and any arguments to it)
|
||||
that will be used for receiving files.
|
||||
that will be used for receiving files. (Default: "rz -vv")
|
||||
</p>
|
||||
<p>
|
||||
(Default: "rz -vv")
|
||||
</p>
|
||||
</dd>
|
||||
|
||||
<dt>--imap</dt>
|
||||
<dd>
|
||||
</optdesc>
|
||||
</option>
|
||||
|
||||
<option>
|
||||
<opt><p>--imap</p></opt>
|
||||
<optdesc>
|
||||
<p>
|
||||
Specifies the input character map (i.e. special characters
|
||||
to be replaced when read from the serial port). Example:
|
||||
"--imap crlf,delbs"
|
||||
"--imap crlf,delbs". (Defaul: Empty)
|
||||
</p>
|
||||
<p>
|
||||
(Defaul: Empty)
|
||||
</p>
|
||||
</dd>
|
||||
|
||||
<dt>--omap</dt>
|
||||
<dd>
|
||||
</optdesc>
|
||||
</option>
|
||||
|
||||
<option>
|
||||
<opt><p>--omap</p></opt>
|
||||
<optdesc>
|
||||
<p>
|
||||
Specifies the output character map (i.e. special characters
|
||||
to be replaced before being written to serial
|
||||
port). Example: "--omap crcrlf,bsdel"
|
||||
port). Example: "--omap crcrlf,bsdel". (Defaul: Empty)
|
||||
</p>
|
||||
<p>
|
||||
(Defaul: Empty)
|
||||
</p>
|
||||
</dd>
|
||||
|
||||
<dt>--emap</dt>
|
||||
<dd>
|
||||
</optdesc>
|
||||
</option>
|
||||
|
||||
<option>
|
||||
<opt><p>--emap</p></opt>
|
||||
<optdesc>
|
||||
<p>
|
||||
Specifies the local-echo character map (i.e. special
|
||||
characters to be replaced before being echoed-back to the
|
||||
terminal, if local-echo is enabled). Example: "--emap
|
||||
crcrlf,bsdel"
|
||||
crcrlf,bsdel". (Defaul: delbs,crcrlf)
|
||||
</p>
|
||||
<p>
|
||||
(Defaul: delbs,crcrlf)
|
||||
</p>
|
||||
</dd>
|
||||
|
||||
<dt>--help | -h</dt>
|
||||
<dd>
|
||||
</optdesc>
|
||||
</option>
|
||||
|
||||
<option>
|
||||
<opt><p>--help | -h</p></opt>
|
||||
<optdesc>
|
||||
<p>
|
||||
Print a short help message describing the command-line
|
||||
options.
|
||||
</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</section>
|
||||
|
||||
</optdesc>
|
||||
</option>
|
||||
</options>
|
||||
|
||||
|
||||
<section name="AUTHOR">
|
||||
<p>picocom was written by Nick Patavalis (npat@efault.net)</p>
|
||||
</section>
|
||||
|
179
picocom.c
179
picocom.c
@ -37,11 +37,18 @@
|
||||
#include <sys/stat.h>
|
||||
#include <sys/wait.h>
|
||||
#include <limits.h>
|
||||
#ifdef LINENOISE
|
||||
#include <dirent.h>
|
||||
#include <libgen.h>
|
||||
#endif
|
||||
|
||||
#define _GNU_SOURCE
|
||||
#include <getopt.h>
|
||||
|
||||
#include "term.h"
|
||||
#ifdef LINENOISE
|
||||
#include "linenoise-1.0/linenoise.h"
|
||||
#endif
|
||||
|
||||
/**********************************************************************/
|
||||
|
||||
@ -328,6 +335,8 @@ fatal (const char *format, ...)
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
|
||||
#ifndef LINENOISE
|
||||
|
||||
#define cput(fd, c) do { int cl = c; write((fd), &(cl), 1); } while(0)
|
||||
|
||||
int
|
||||
@ -353,6 +362,10 @@ fd_readline (int fdi, int fdo, char *b, int bsz)
|
||||
cput(fdo, '\x07');
|
||||
}
|
||||
break;
|
||||
case '\x03': /* CTRL-c */
|
||||
r = -1;
|
||||
errno = EINTR;
|
||||
goto out;
|
||||
case '\r':
|
||||
*bp = '\0';
|
||||
r = bp - (unsigned char *)b;
|
||||
@ -370,6 +383,114 @@ out:
|
||||
|
||||
#undef cput
|
||||
|
||||
#else /* LINENOISE defined */
|
||||
|
||||
void
|
||||
send_file_completion (const char *buf, linenoiseCompletions *lc)
|
||||
{
|
||||
DIR *dirp;
|
||||
struct dirent *dp;
|
||||
char *basec, *basen, *dirc, *dirn;
|
||||
int baselen, dirlen;
|
||||
char *fullpath;
|
||||
struct stat filestat;
|
||||
|
||||
basec = strdup(buf);
|
||||
dirc = strdup(buf);
|
||||
dirn = dirname(dirc);
|
||||
dirlen = strlen(dirn);
|
||||
basen = basename(basec);
|
||||
baselen = strlen(basen);
|
||||
dirp = opendir(dirn);
|
||||
|
||||
if (dirp) {
|
||||
while ((dp = readdir(dirp)) != NULL) {
|
||||
if (strncmp(basen, dp->d_name, baselen) == 0) {
|
||||
/* add 2 extra bytes for possible / in middle & at end */
|
||||
fullpath = (char *) malloc(strlen(dp->d_name) + dirlen + 3);
|
||||
strcpy(fullpath, dirn);
|
||||
if (fullpath[dirlen-1] != '/')
|
||||
strcat(fullpath, "/");
|
||||
strcat(fullpath, dp->d_name);
|
||||
if (stat(fullpath, &filestat) == 0) {
|
||||
if (S_ISDIR(filestat.st_mode)) {
|
||||
strcat(fullpath, "/");
|
||||
}
|
||||
linenoiseAddCompletion(lc,fullpath);
|
||||
}
|
||||
free(fullpath);
|
||||
}
|
||||
}
|
||||
|
||||
closedir(dirp);
|
||||
}
|
||||
free(basec);
|
||||
free(dirc);
|
||||
}
|
||||
|
||||
static char *send_receive_history_file_path = NULL;
|
||||
|
||||
void
|
||||
init_send_receive_history (void)
|
||||
{
|
||||
char *home_directory;
|
||||
|
||||
home_directory = getenv("HOME");
|
||||
if (home_directory) {
|
||||
send_receive_history_file_path =
|
||||
malloc(strlen(home_directory) + 2 +
|
||||
strlen(SEND_RECEIVE_HISTFILE));
|
||||
strcpy(send_receive_history_file_path, home_directory);
|
||||
if (home_directory[strlen(home_directory)-1] != '/') {
|
||||
strcat(send_receive_history_file_path, "/");
|
||||
}
|
||||
strcat(send_receive_history_file_path, SEND_RECEIVE_HISTFILE);
|
||||
linenoiseHistoryLoad(send_receive_history_file_path);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
cleanup_send_receive_history (void)
|
||||
{
|
||||
if (send_receive_history_file_path)
|
||||
free(send_receive_history_file_path);
|
||||
}
|
||||
|
||||
void
|
||||
add_send_receive_history (char *fname)
|
||||
{
|
||||
linenoiseHistoryAdd(fname);
|
||||
if (send_receive_history_file_path)
|
||||
linenoiseHistorySave(send_receive_history_file_path);
|
||||
}
|
||||
|
||||
char *
|
||||
read_send_filename (void)
|
||||
{
|
||||
char *fname;
|
||||
linenoiseSetCompletionCallback(send_file_completion);
|
||||
printf("\r\n");
|
||||
fname = linenoise("*** file: ");
|
||||
printf("\r\n");
|
||||
linenoiseSetCompletionCallback(NULL);
|
||||
if (fname != NULL)
|
||||
add_send_receive_history(fname);
|
||||
return fname;
|
||||
}
|
||||
|
||||
char *
|
||||
read_receive_filename (void)
|
||||
{
|
||||
printf("\r\n");
|
||||
char *fname = linenoise("*** file: ");
|
||||
printf("\r\n");
|
||||
if (fname != NULL)
|
||||
add_send_receive_history(fname);
|
||||
return fname;
|
||||
}
|
||||
|
||||
#endif /* of ifndef LINENOISE */
|
||||
|
||||
/* maximum number of chars that can replace a single characted
|
||||
due to mapping */
|
||||
#define M_MAXMAP 4
|
||||
@ -668,7 +789,11 @@ loop(void)
|
||||
fd_set rdset, wrset;
|
||||
int newbaud, newflow, newparity, newbits;
|
||||
char *newflow_str, *newparity_str;
|
||||
#ifndef LINENOISE
|
||||
char fname[128];
|
||||
#else
|
||||
char *fname;
|
||||
#endif
|
||||
int r, n;
|
||||
unsigned char c;
|
||||
|
||||
@ -801,25 +926,59 @@ loop(void)
|
||||
opts.lecho ? "yes" : "no");
|
||||
break;
|
||||
case KEY_SEND:
|
||||
#ifndef LINENOISE
|
||||
fd_printf(STO, "\r\n*** file: ");
|
||||
r = fd_readline(STI, STO, fname, sizeof(fname));
|
||||
fd_printf(STO, "\r\n");
|
||||
if ( r < -1 && errno == EINTR ) break;
|
||||
if ( r <= -1 )
|
||||
fatal("cannot read filename: %s", strerror(errno));
|
||||
if ( r <= -1 ) {
|
||||
if ( errno == EINTR ) {
|
||||
fd_printf(STO, "Cannot read filename!\r\n");
|
||||
break;
|
||||
} else {
|
||||
fatal("cannot read filename: %s", strerror(errno));
|
||||
}
|
||||
}
|
||||
run_cmd(tty_fd, opts.send_cmd, fname, NULL);
|
||||
#else
|
||||
fname = read_send_filename();
|
||||
if (fname == NULL) {
|
||||
fd_printf(STO, "Cannot read filename!\r\n");
|
||||
break;
|
||||
}
|
||||
run_cmd(tty_fd, opts.send_cmd, fname, NULL);
|
||||
free(fname);
|
||||
#endif
|
||||
break;
|
||||
case KEY_RECEIVE:
|
||||
#ifndef LINENOISE
|
||||
fd_printf(STO, "*** file: ");
|
||||
r = fd_readline(STI, STO, fname, sizeof(fname));
|
||||
fd_printf(STO, "\r\n");
|
||||
if ( r < -1 && errno == EINTR ) break;
|
||||
if ( r <= -1 )
|
||||
fatal("cannot read filename: %s", strerror(errno));
|
||||
|
||||
if ( r <= -1 ) {
|
||||
if ( errno == EINTR ) {
|
||||
fd_printf(STO, "Cannot read filename!\r\n");
|
||||
break;
|
||||
} else {
|
||||
fatal("cannot read filename: %s", strerror(errno));
|
||||
}
|
||||
}
|
||||
if ( fname[0] )
|
||||
run_cmd(tty_fd, opts.receive_cmd, fname, NULL);
|
||||
else
|
||||
run_cmd(tty_fd, opts.receive_cmd, NULL);
|
||||
#else
|
||||
fname = read_receive_filename();
|
||||
if (fname == NULL) {
|
||||
fd_printf(STO, "Cannot read filename!\r\n");
|
||||
break;
|
||||
}
|
||||
if ( fname[0] )
|
||||
run_cmd(tty_fd, opts.receive_cmd, fname, NULL);
|
||||
else
|
||||
run_cmd(tty_fd, opts.receive_cmd, NULL);
|
||||
free(fname);
|
||||
#endif
|
||||
break;
|
||||
case KEY_BREAK:
|
||||
term_break(tty_fd);
|
||||
@ -1205,9 +1364,17 @@ main(int argc, char *argv[])
|
||||
fatal("failed to set I/O device to raw mode: %s",
|
||||
term_strerror(term_errno, errno));
|
||||
|
||||
#ifdef LINENOISE
|
||||
init_send_receive_history();
|
||||
#endif
|
||||
|
||||
fd_printf(STO, "Terminal ready\r\n");
|
||||
loop();
|
||||
|
||||
#ifdef LINENOISE
|
||||
cleanup_send_receive_history();
|
||||
#endif
|
||||
|
||||
fd_printf(STO, "\r\n");
|
||||
if ( opts.noreset ) {
|
||||
fd_printf(STO, "Skipping tty reset...\r\n");
|
||||
|
Reference in New Issue
Block a user