Update plain text man page

This commit is contained in:
Martin Lund 2022-09-10 22:46:58 +02:00
parent 9cad01791b
commit 88588100e4

View file

@ -7,8 +7,7 @@ SYNOPSIS
tio [<options>] <tty-device|sub-config> tio [<options>] <tty-device|sub-config>
DESCRIPTION DESCRIPTION
tio is a simple serial device tool which features a straightforward command-line and configuration file interface to easily con tio is a simple serial device tool which features a straightforward command-line and configuration file interface to easily connect to serial TTY devices for basic I/O operations.
nect to serial TTY devices for basic I/O operations.
OPTIONS OPTIONS
-b, --baudrate <bps> -b, --baudrate <bps>
@ -31,8 +30,7 @@ OPTIONS
Set parity (default: none). Set parity (default: none).
Note: With mark parity the parity bit is always 0. With space parity the parity bit is always 1. Not all platforms support Note: With mark parity the parity bit is always 0. With space parity the parity bit is always 1. Not all platforms support mark and space parity.
mark and space parity.
-o, --output-delay <ms> -o, --output-delay <ms>
@ -44,22 +42,21 @@ OPTIONS
--line-pulse-duration <duration> --line-pulse-duration <duration>
Set the pulse duration [ms] of each serial port line using the following key valur pair format in the duration field: Set the pulse duration [ms] of each serial port line using the following key value pair format in the duration field: <key>=<value>
<key>=<value>
Each key represents a serial line. The following keys are available: Each key represents a serial line. The following keys are available:
DTR - Data Terminal Ready DTR Data Terminal Ready
RTS - Request To Send RTS Request To Send
CTS - Clear To Send CTS Clear To Send
DSR - Data Set Ready DSR Data Set Ready
DCD - Data Carrier Detect DCD Data Carrier Detect
RI - Ring Indicator RI Ring Indicator
If defining more than one key value pair, the pairs must be comma separated. If defining more than one key value pair, the pairs must be comma separated.
@ -69,12 +66,10 @@ OPTIONS
Disable automatic connect. 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 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
to appear and then connect. If the connection is lost (eg. device disconnects), it will wait for the device to reappear and (eg. device disconnects), it will wait for the device to reappear and then reconnect.
then reconnect.
However, if the --no-autoconnect option is provided, tio will exit if the device is not present or an established connec However, if the --no-autoconnect option is provided, tio will exit if the device is not present or an established connection is lost.
tion is lost.
-e, --local-echo -e, --local-echo
@ -100,7 +95,7 @@ OPTIONS
-L, --list-devices -L, --list-devices
List available serial devices. List available serial devices by ID.
-l, --log -l, --log
@ -144,8 +139,7 @@ OPTIONS
-c, --color 0..255|bold|none|list -c, --color 0..255|bold|none|list
Colorize tio text using ANSI color code value ranging from 0 to 255 or use "none" for no color or use "bold" to apply bold Colorize tio text using ANSI color code value ranging from 0 to 255 or use "none" for no color or use "bold" to apply bold formatting to existing system color.
formatting to existing system color.
Use "list" to print a list of available ANSI color codes. Use "list" to print a list of available ANSI color codes.
@ -153,9 +147,8 @@ OPTIONS
-S, --socket <socket> -S, --socket <socket>
Redirect I/O to socket. Any input from clients connected to the socket is sent on the serial port as if entered at the ter Redirect I/O to socket. Any input from clients connected to the socket is sent on the serial port as if entered at the terminal where tio is running (except that ctrl-t sequences
minal where tio is running (except that ctrl-t sequences are not recognized), and any input from the serial port is multi are not recognized), and any input from the serial port is multiplexed to the terminal and all connected clients.
plexed to the terminal and all connected clients.
Sockets remain open while the serial port is disconnected, and writes will block. Sockets remain open while the serial port is disconnected, and writes will block.
@ -171,6 +164,44 @@ OPTIONS
At present there is a hardcoded limit of 16 clients connected at one time. At present there is a hardcoded limit of 16 clients connected at one time.
-r, --response-wait
Wait for line response then quit. A line is considered any string ending with either CR or NL character. If no line is received tio will quit after response timeout.
Any tio text is automatically muted when piping a string to tio while in response mode to make it easy to parse the response.
--response-timeout <ms>
Set timeout [ms] of line response (default: 100).
--rs-485
Enable RS-485 mode.
--rs-485-config <config>
Set the RS-485 configuration using the following key or key value pair format in the configuration field:
RTS_ON_SEND=value Set logical level (0 or 1) for RTS pin when sending
RTS_AFTER_SEND=value Set logical level (0 or 1) for RTS pin after sending
RTS_DELAY_BEFORE_SEND=value Set RTS delay (ms) before sending
RTS_DELAY_AFTER_SEND=value Set RTS delay (ms) after sending
RX_DURING_TX Receive data even while sending data
If defining more than one key or key value pair, they must be comma separated.
--alert none|bell|blink
Set alert action on connect/disconnect.
It will sound the bell once or blink once on successful connect. Likewise it will sound the bell twice or blink twice on disconnect.
Default value is "none".
-v, --version -v, --version
Display program version. Display program version.
@ -180,8 +211,7 @@ OPTIONS
Display help. Display help.
KEYS KEYS
In session, the following key sequences, a prefix key (default: ctrl-t) followed by a command key, are intercepted as tio com In session, the following key sequences, a prefix key (default: ctrl-t) followed by a command key, are intercepted as tio commands:
mands:
ctrl-t ? List available key commands ctrl-t ? List available key commands
@ -214,12 +244,10 @@ KEYS
HEXADECIMAL MODE HEXADECIMAL MODE
In hexadecimal mode each incoming byte is printed out as a hexadecimal value. In hexadecimal mode each incoming byte is printed out as a hexadecimal value.
Bytes can be sent in this mode by typing the two-character hexadecimal representation of the value, e.g.: to send 0xA you must Bytes can be sent in this mode by typing the two-character hexadecimal representation of the value, e.g.: to send 0xA you must type 0a or 0A.
type 0a or 0A.
CONFIGURATION FILE CONFIGURATION FILE
Options can be set via configuration file using the INI format. tio uses the configuration file first found in the following loca Options can be set via configuration file using the INI format. tio uses the configuration file first found in the following locations in the order listed:
tions in the order listed:
$XDG_CONFIG_HOME/tio/tiorc $XDG_CONFIG_HOME/tio/tiorc
@ -281,6 +309,16 @@ CONFIGURATION FILE
prefix-ctrl-key Set prefix ctrl key (a..z, default: t) prefix-ctrl-key Set prefix ctrl key (a..z, default: t)
response-wait Enable wait for line response
response-timeout Set line response timeout
rs-485 Enable RS-485 mode
rs-485-config Set RS-485 configuration
alert Set alert action on connect/disconnect
CONFIGURATION FILE EXAMPLES CONFIGURATION FILE EXAMPLES
To change the default configuration simply set options like so: To change the default configuration simply set options like so:
@ -339,8 +377,7 @@ EXAMPLES
$ tio /dev/serial/by-id/usb-FTDI_TTL232R-3V3_FTGQVXBL-if00-port0 $ tio /dev/serial/by-id/usb-FTDI_TTL232R-3V3_FTGQVXBL-if00-port0
Using serial devices by ID ensures that tio automatically reconnects to the correct serial device if it is disconnected and then Using serial devices by ID ensures that tio automatically reconnects to the correct serial device if it is disconnected and then reconnected.
reconnected.
Redirect serial device I/O to Unix file socket for scripting: Redirect serial device I/O to Unix file socket for scripting:
@ -377,14 +414,24 @@ EXAMPLES
$ echo "ls -la" | tio /dev/serial/by-id/usb-FTDI_TTL232R-3V3_FTGQVXBL-if00-port0 $ echo "ls -la" | tio /dev/serial/by-id/usb-FTDI_TTL232R-3V3_FTGQVXBL-if00-port0
Pipe command to the serial device and wait for line response (string ending with CR or NL):
$ echo "*IDN?" | tio /dev/ttyACM0 --response-wait
In this mode, only the response will be printed.
Likewise, to pipe data from file to the serial device: Likewise, to pipe data from file to the serial device:
$ cat data.bin | tio /dev/serial/by-id/usb-FTDI_TTL232R-3V3_FTGQVXBL-if00-port0 $ cat data.bin | tio /dev/serial/by-id/usb-FTDI_TTL232R-3V3_FTGQVXBL-if00-port0
Enable RS-485 mode:
$ tio --rs-485 --rs-485-config=RTS_ON_SEND=1,RX_DURING_TX /dev/ttyUSB0
WEBSITE WEBSITE
Visit https://tio.github.io Visit https://tio.github.io
AUTHOR AUTHOR
Created by Martin Lund <martin.lund@keep-it-simple.com>. Created by Martin Lund <martin.lund@keep-it-simple.com>.
tio 1.46 2022-07-15 tio(1) tio 2.0 2022-07-23 tio(1)