mirror of
https://github.com/tio/tio.git
synced 2026-05-01 23:07:58 +02:00
The program can be started in line editing mode. In this mode, the
current line can be edited by inserting/deleting characters. Escape
values can be used for bytes.
Controls:
printable - adds character to the position of the cursor
RIGHT, LEFT - moves cursor in the line
UP, DOWN - gets prevoiusly sent lines from the history
BACKSPACE - deletes character before the cursor
ENTER - sends line
Commands:
:? - list available commands
:q - quit
:v - show version
:: - send ':'
Escapes:
\dNNN - decimal NNN (e.g: \d045 = 45)
\xNN - hexadecimal NN (e.g: \xff = 255)
\bNNNNNNNN - binary NNNNNNNN (e.g: \b00000001 = 1)
Added option --line-edit, to start the program in line editing mode.
Added option --no-newline-in-line-edit to prevent sending newline
characters.
242 lines
5.1 KiB
Groff
242 lines
5.1 KiB
Groff
.TH "tio" "1" "July 2021"
|
|
|
|
.SH "NAME"
|
|
tio \- a simple TTY terminal I/O application
|
|
|
|
.SH "SYNOPSIS"
|
|
.PP
|
|
.B tio
|
|
.RI "[" <options> "] " "<tty-device>"
|
|
|
|
.SH "DESCRIPTION"
|
|
.PP
|
|
.B tio
|
|
is a simple TTY terminal application which features a straightforward
|
|
commandline interface to easily connect to TTY devices for basic input/output.
|
|
|
|
.SH "OPTIONS"
|
|
|
|
.TP
|
|
.BR \-b ", " "\-\-baudrate " \fI<bps>
|
|
|
|
Set baud rate [bps] (default: 115200).
|
|
.TP
|
|
.BR \-d ", " "\-\-databits 5" | 6 | 7 | 8
|
|
|
|
Set data bits (default: 8).
|
|
.TP
|
|
.BR \-f ", " "\-\-flow hard" | soft | none
|
|
|
|
Set flow control (default: none).
|
|
.TP
|
|
.BR \-s ", " "\-\-stopbits 1" | 2
|
|
|
|
Set stop bits (default: 1).
|
|
.TP
|
|
.BR \-p ", " "\-\-parity odd" | even | none
|
|
|
|
Set parity (default: none).
|
|
.TP
|
|
.BR \-o ", " "\-\-output\-delay " \fI<ms>
|
|
|
|
Set output delay [ms] inserted between each sent character (default: 0).
|
|
.TP
|
|
.BR \-n ", " \-\-no\-autoconnect
|
|
|
|
Disable automatic connect.
|
|
|
|
By default tio automatically connects to the provided device if present. If the device is not present, it will wait for it to appear and then connect. If the connection is lost (eg. device disconnects), it will wait for the device to reappear and then reconnect.
|
|
|
|
However, if the
|
|
.B \-\-no\-autoconnect
|
|
option is provided, tio will exit if the device is not present or an established connection is lost.
|
|
|
|
.TP
|
|
.BR \-e ", " "\-\-local\-echo
|
|
|
|
Enable local echo.
|
|
|
|
.TP
|
|
.BR \-t ", " "\-\-timestamp
|
|
|
|
Prefix each new line with a timestamp.
|
|
|
|
.TP
|
|
.BR \-l ", " "\-\-log " \fI<filename>
|
|
|
|
Log to file.
|
|
|
|
.TP
|
|
.BR \-m ", " "\-\-map " \fI<flags>
|
|
|
|
Map (replace, translate) special characters on input or output. The following mapping flags are supported:
|
|
|
|
.RS
|
|
.TP 12n
|
|
.IP "\fBICRNL"
|
|
Map CR to NL on input (unless IGNCR is set).
|
|
.IP "\fBIGNCR"
|
|
Ignore CR on input.
|
|
.IP "\fBINLCR"
|
|
Map NL to CR on input.
|
|
.IP "\fBINLCRNL"
|
|
Map NL to CR-NL on input.
|
|
.IP "\fBOCRNL"
|
|
Map CR to NL on output.
|
|
.IP "\fBODELBS"
|
|
Map DEL to BS on output.
|
|
.IP "\fBONLCRNL"
|
|
Map NL to CR-NL on output.
|
|
.P
|
|
If defining more than one flag, the flags must be comma separated.
|
|
.RE
|
|
|
|
.TP
|
|
.BR \-x ", " \-\-hex
|
|
|
|
Start in hexadecimal mode.
|
|
|
|
.TP
|
|
.BR \-\-newline-in-hex
|
|
|
|
Interpret new line characters ('\er', '\en') in hexadecimal mode.
|
|
|
|
.TP
|
|
.BR \-\-line-edit
|
|
|
|
Start in line editing mode.
|
|
|
|
.TP
|
|
.BR \-\-no-newline-in-line-edit
|
|
|
|
Does not append "\er\en" after a line in line editing mode.
|
|
|
|
.TP
|
|
.BR \-v ", " \-\-version
|
|
|
|
Display program version.
|
|
|
|
.TP
|
|
.BR \-h ", " \-\-help
|
|
|
|
Display help.
|
|
|
|
.SH "KEYS"
|
|
.PP
|
|
.TP 16n
|
|
In session, the following key sequences are intercepted as tio commands:
|
|
.IP "\fBctrl-t ?"
|
|
List available key commands
|
|
.IP "\fBctrl-t b"
|
|
Send serial break (triggers SysRq on Linux, etc.)
|
|
.IP "\fBctrl-t c"
|
|
Show configuration (baudrate, databits, etc.)
|
|
.IP "\fBctrl-t e"
|
|
Toggle local echo mode
|
|
.IP "\fBctrl-t h"
|
|
Toggle hexadecimal mode
|
|
.IP "\fBctrl-t l"
|
|
Clear screen
|
|
.IP "\fBctrl-t q"
|
|
Quit
|
|
.IP "\fBctrl-t s"
|
|
Show TX/RX statistics
|
|
.IP "\fBctrl-t t"
|
|
Send ctrl-t key code
|
|
.IP "\fBctrl-t L"
|
|
Show lines state (DTR, RTS, CTS, DSR, DCD, RI)
|
|
.IP "\fBctrl-t d"
|
|
Toggle DTR
|
|
.IP "\fBctrl-t r"
|
|
Toggle RTS
|
|
.IP "\fBctrl-t v"
|
|
Show version
|
|
|
|
.SH "HEXADECIMAL MODE"
|
|
.TP
|
|
In hexadecimal mode each incoming byte is printed out as a hexadecimal value.
|
|
.TP
|
|
By default there is \fBno new line\fR in this mode, but it can be turned on using the \fB--newline-in-hex\fR option.
|
|
.TP
|
|
Bytes can be sent in this mode by typing the \fBtwo-character hexadecimal\fR representation of the value, e.g.: to send \fI0xA\fR you must type \fI0a\fR or \fI0A\fR.
|
|
|
|
.SH "LINE EDIT"
|
|
The program can be started in line editing mode using the \fB--line-edot\fR option. In this mode, the current line can be edited by inserting/deleting characters. Escape values can be used for bytes.
|
|
.PP
|
|
.TP 16n
|
|
The following keys can be used:
|
|
|
|
.IP "\fB<ASCII>"
|
|
Add character to the position of the cursor.
|
|
|
|
.IP "\fBRIGHT\fR, \fBLEFT\fR"
|
|
Move cursor in the line.
|
|
|
|
.IP "\fBUP\fR, \fBDOWN\fR"
|
|
Get prevoiusly sent lines from the history.
|
|
|
|
.IP "\fBBACKSPACE\fR"
|
|
Delete character before the cursor.
|
|
|
|
.IP "\fBENTER\fR"
|
|
Send line.
|
|
|
|
.PP
|
|
.TP 16n
|
|
The following commands can be used:
|
|
|
|
.IP "\fB:?\fR"
|
|
List available commands.
|
|
|
|
.IP "\fB:q\fR"
|
|
Quit.
|
|
|
|
.IP "\fB:v\fR"
|
|
Show version.
|
|
|
|
.IP "\fB::\fR"
|
|
Send ':'.
|
|
|
|
.PP
|
|
.TP 16n
|
|
Escape bytes:
|
|
|
|
.IP \fB\edNNN\fR
|
|
Send NNN as a decimal value. NNN must be 3 characters and less than or equal to 255. For example: \ed023 = 23.
|
|
|
|
.IP \fB\exNN\fR
|
|
Send NN as a hexadecimal value. NN must be 2 characters. For example: \exff = 255.
|
|
|
|
.IP \fB\ebNNNNNNNN\fR
|
|
Send NNNNNNNN as a binary value. NNNNNNNN must be 8 characters. For example: \eb0000001 = 1.
|
|
|
|
.TP 7n
|
|
The following line sends the ASCII string \fI"Hello"\fR:
|
|
|
|
H\ed101\ex6c\eb01101100o
|
|
|
|
|
|
.SH "EXAMPLES"
|
|
.TP
|
|
Typical use is without options. For example:
|
|
|
|
tio /dev/ttyUSB0
|
|
.TP
|
|
Which corresponds to the commonly used options:
|
|
|
|
tio \-b 115200 \-d 8 \-f none \-s 1 \-p none /dev/ttyUSB0
|
|
.TP
|
|
It is recommended to connect serial tty devices by ID. For example:
|
|
|
|
tio /dev/serial/by\-id/usb\-FTDI_TTL232R-3V3_FTGQVXBL\-if00\-port0
|
|
.PP
|
|
Using serial devices by ID ensures that tio automatically reconnects to the
|
|
correct serial device if the device is disconnected and then reconnected.
|
|
|
|
.SH "WEBSITE"
|
|
.PP
|
|
Visit https://tio.github.io
|
|
|
|
.SH "AUTHOR"
|
|
.PP
|
|
Written by Martin Lund <martin.lund@keep\-it\-simple.com>.
|