1 # tio - a simple serial device I/O tool
3 [![CircleCI](https://circleci.com/gh/tio/tio/tree/master.svg?style=shield)](https://circleci.com/gh/tio/tio/tree/master)
4 [![tio](https://snapcraft.io/tio/badge.svg)](https://snapcraft.io/tio)
5 [![Packaging status](https://repology.org/badge/tiny-repos/tio.svg)](https://repology.org/project/tio/versions)
9 tio is a simple serial device tool which features a straightforward
10 command-line and configuration file interface to easily connect to serial TTY
11 devices for basic I/O operations.
14 <img src="images/tio-demo.gif">
19 To make a simpler serial device tool for talking with serial TTY devices with
20 less focus on classic terminal/modem features and more focus on the needs of
21 embedded developers and hackers.
23 tio was originally created to replace
24 [screen](https://www.gnu.org/software/screen) for connecting to serial devices
25 when used in combination with [tmux](https://tmux.github.io).
29 * Easily connect to serial TTY devices
31 * Support for arbitrary baud rates
32 * List available serial devices
33 * Show RX/TX statistics
36 * Remap special characters (nl, cr-nl, bs, etc.)
38 * Support for delayed output
41 * Autogeneration of log filename
42 * Configuration file support
43 * Activate sub-configurations by name or pattern
44 * Redirect I/O to socket for scripting or TTY sharing
45 * Pipe input and/or output
48 * Man page documentation
54 The command-line interface is straightforward as reflected in the output from
57 Usage: tio [<options>] <tty-device|sub-config>
59 Connect to tty-device directly or via sub-configuration.
62 -b, --baudrate <bps> Baud rate (default: 115200)
63 -d, --databits 5|6|7|8 Data bits (default: 8)
64 -f, --flow hard|soft|none Flow control (default: none)
65 -s, --stopbits 1|2 Stop bits (default: 1)
66 -p, --parity odd|even|none Parity (default: none)
67 -o, --output-delay <ms> Character output delay (default: 0)
68 -n, --no-autoconnect Disable automatic connect
69 -e, --local-echo Enable local echo
70 -t, --timestamp Enable line timestamp
71 --timestamp-format <format> Set timestamp format (default: 24hour)
72 -L, --list-devices List available serial devices
73 -l, --log Enable log to file
74 --log-file <filename> Set log filename
75 --log-strip Strip control characters and escape sequences
76 -m, --map <flags> Map special characters
77 -c, --color 0..255|none|list Colorize tio text (default: 15)
78 -S, --socket <socket> Redirect I/O to socket
79 -x, --hexadecimal Enable hexadecimal mode
80 -v, --version Display version
81 -h, --help Display help
83 Options and sub-configurations may be set via configuration file.
85 In session, press ctrl-t q to quit.
87 See the man page for more details.
90 By default tio automatically connects to the provided TTY device if present.
91 If the device is not present, it will wait for it to appear and then connect.
92 If the connection is lost (eg. device is unplugged), it will wait for the
93 device to reappear and then reconnect. However, if the `--no-autoconnect`
94 option is provided, tio will exit if the device is not present or an
95 established connection is lost.
97 tio features full bash autocompletion.
101 Various in session key commands are supported. When tio is started, press
102 ctrl-t ? to list the available key commands.
105 [20:19:12.040] Key commands:
106 [20:19:12.040] ctrl-t ? List available key commands
107 [20:19:12.040] ctrl-t b Send break
108 [20:19:12.040] ctrl-t c Show configuration
109 [20:19:12.040] ctrl-t d Toggle DTR line
110 [20:19:12.040] ctrl-t e Toggle local echo mode
111 [20:19:12.040] ctrl-t h Toggle hexadecimal mode
112 [20:19:12.040] ctrl-t l Clear screen
113 [20:19:12.040] ctrl-t L Show line states
114 [20:19:12.040] ctrl-t q Quit
115 [20:19:12.040] ctrl-t r Toggle RTS line
116 [20:19:12.041] ctrl-t s Show statistics
117 [20:19:12.041] ctrl-t t Send ctrl-t key code
118 [20:19:12.041] ctrl-t T Toggle line timestamp mode
119 [20:19:12.041] ctrl-t v Show version
122 ### 3.3 Configuration file
124 Options can be set via the configuration file first found in any of the
125 following locations in the order listed:
126 - $XDG_CONFIG_HOME/tio/tiorc
127 - $HOME/.config/tio/tiorc
130 The configuration file supports sub-configurations using named sections which can
131 be activated via the command-line by name or pattern.
133 Example configuration file:
144 tty = /dev/serial/by-id/usb-FTDI_TTL232R-3V3_FTGQVXBL-if00-port0
146 no-autoconnect = enable
152 pattern = usb([0-9]*)
157 To use a specific sub-configuration by name simply start tio like so:
169 ### 4.1 Installation using package manager
171 Packages for various GNU/Linux distributions are available. Please consult your
172 package manager tool to find and install tio.
174 If you would like to see tio included in your favorite distribution, please
175 reach out to their package maintainers team.
177 ### 4.2 Installation using snap
179 Install latest stable version:
183 Install bleeding edge:
185 $ snap install tio --edge
188 ### 4.3 Installation from source
190 The latest source releases can be found [here](https://github.com/tio/tio/releases).
195 $ meson compile -C build
196 $ meson install -C build
199 See meson\_options.txt for tio specific build options.
201 Note: Please do no try to install from source if you are not familiar with
202 how to build stuff using meson.
207 tio is open source. If you want to help out with the project please feel free
210 All contributions (bug reports, code, doc, ideas, etc.) are welcome.
212 Please use the github issue tracker and pull request features.
214 Also, if you find this free open source software useful please feel free to
215 consider making a donation of your choice:
217 [![Donate](images/paypal.png)](https://www.paypal.me/lundmar)
222 Submit bug reports via GitHub: https://github.com/tio/tio/issues
227 Visit [tio.github.io](https://tio.github.io)
232 tio is GPLv2+. See LICENSE file for more details.
237 Created by Martin Lund \<martin.lund@keep-it-simple.com>
239 See the AUTHORS file for full list of contributors.