Commit graph

85 commits

Author SHA1 Message Date
Martin Lund
256d6b4fc2 Merge branch 'allow_strip_esc_key' of https://github.com/nh26223/tio into nh26223-allow_strip_esc_key 2022-06-15 22:49:22 +02:00
Martin Lund
db45326d98 Rename --log-filename to --log-file 2022-06-13 23:04:30 +02:00
Martin Lund
92fbe86c49 Update man page 2022-06-12 01:27:23 +02:00
Martin Lund
fcfeb9189c Update man page 2022-06-12 01:16:41 +02:00
Martin Lund
17e96d70bc Add support for IPv4 and IPv6 network sockets
Add support for IPv4 and IPv6 network sockets via socket syntax
"inet:<port>" and "inet6:<port>" respectively.

For example, to listen and redirect serial device I/O to a host bound
IPv4 socket simply do:

 $ tio /dev/ttyUSB0 --socket inet:4444

To connect do e.g.:

 $ nc 127.0.0.1 4444

Likewise, for IPv6 do:

 $ tio /dev/ttyUSB0 --socket inet6:4444

To connect do e.g.:

 $ nc ::1 4444

If port is 0 or no port is provided default port 3333 is used.
2022-06-11 14:19:29 +02:00
Martin Lund
373dca3d5b Update README 2022-06-08 20:33:13 +02:00
Martin Lund
46b5783789 Rework color option
Rework the color option to support setting ANSI color code values
ranging from 0..255 or "none" for no color or "list" to print a list of
available ANSI colors codes.

Also, disables color when piping.
2022-06-08 16:19:47 +02:00
Martin Lund
6d007d39d7 Remove newline option in hex mode 2022-06-06 19:38:31 +02:00
g0mb4
0b55981e52 Extended hexadecimal mode.
While in hex mode (ctrl-t h) you can output hexadecimal values.
E.g.: to send 0x0A you have to type 0A (always 2 characters).

Added option -x, --hex to start in hexadecimal mode.

Added option --newline-in-hex to interpret newline characters in hex mode.
This is disabled by default, because, in my opinion, hex stream is
fundamentally different from text, so a "new line" is meaningless in this
context.
2022-06-06 19:10:00 +02:00
Martin Lund
9476422922 Remove command-line option inconsistencies
Optional arguments, as parsed by the getopt_long mechanism, are
inherently inconsistent with how you define required arguments.

To avoid confusion we decide to avoid this inconsistency by replacing
optional options with additional options with required argmuments.
2022-06-04 19:08:05 +02:00
Martin Lund
8d2ad8d82d Update man page 2022-06-04 17:45:19 +02:00
Martin Lund
89574b2469 Mention config file in --help 2022-06-02 00:29:25 +02:00
Martin Lund
5b6a106b34 Improve help and man page 2022-06-01 19:26:42 +02:00
Martin Lund
fa91a3fcc4 Update man page 2022-04-21 02:28:53 +02:00
Peter Collingbourne
a81c43a01a Match user input against config section names if pattern matching was unsuccessful.
This allows for better config file ergonomics if the user has a diverse
set of serial devices as the name does not need to be specified in
the config file twice.
2022-04-20 15:31:41 -07:00
Martin Lund
45c32f78a8 Update socket interface documentaton 2022-04-20 12:08:55 +02:00
Peter Collingbourne
fb453160ef Add support for external control via a Unix domain socket.
This feature allows an external program to inject output into and
listen to input from a serial port via a Unix domain socket (path
specified via the -S/--socket command line flag, or the socket
config file option) while tio is running. This is useful for ad-hoc
scripting of serial port interactions while still permitting manual
control. Since many serial devices (at least on Linux) get confused
when opened by multiple processes, and most commands do not know
how to correctly open a serial device, this allows a more convenient
usage model than directly writing to the device node from an external
program.

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 are not recognized), and any input from the serial
port is multiplexed to the terminal and all connected clients.

Sockets remain open while the serial port is disconnected, and writes
will block.

Example usage 1 (issue a command):

  echo command | nc -UN /path/to/socket > /dev/null

Example usage 2 (use the expect command to script an interaction):

  #!/usr/bin/expect -f

  set timeout -1
  log_user 0

  spawn nc -UN /path/to/socket
  set uart $spawn_id

  send -i $uart "command1\n"
  expect -i $uart "prompt> "
  send -i $uart "command2\n"
  expect -i $uart "prompt> "
2022-04-18 14:06:33 -07:00
Martin Lund
28c880cdab Remove verbose option
Remove the command-line verbose option but let the ctrl-t c feature
print some of the verbose information (active config path/section).
2022-04-13 16:28:30 +02:00
Sylvain LAFRASSE
c95226cb46 Update verbosity documentation. 2022-03-31 13:59:02 +02:00
Sylvain LAFRASSE
ac77f2dbb9 Add documentation of verbose mode. 2022-03-30 18:11:36 +02:00
Martin Lund
f229ee2f96 Update man page 2022-03-24 22:52:11 +01:00
Martin Lund
ed97a8dc21 Update man page 2022-03-12 11:20:03 +01:00
Martin Lund
e81e76473a Add color configuration support 2022-03-11 16:09:21 +01:00
Martin Lund
745244df06 Update man page 2022-03-11 14:34:33 +01:00
Liam Beguin
25123fefea document configuration file options
Signed-off-by: Liam Beguin <liambeguin@gmail.com>
2022-03-10 10:34:52 -05:00
Martin Lund
b23397caa0 Fix text 2022-02-25 07:16:14 +01:00
Martin Lund
8f63f755da Cleanup color option 2022-02-19 09:45:02 +01:00
Martin Lund
45210bc741 Add support for automatically generated log filename
Automatically generate log filename if none is provided.

The auto generated file name is on the form:
"tio_DEVICE_YYYY-MM-DDTHH:MM:SS.log"
2022-02-19 09:29:33 +01:00
Martin Lund
d8a822a3fb Add support for configurable timestamp format
Also changes default timestamp format from ISO8601 to classic 24-hour
format as this is assumed to be the format that most users would prefer.

And reintroduces strict but optional ISO8601 format.

This feature allows to easily add more timestamp formats in the future.
2022-02-19 02:26:10 +01:00
Martin Lund
0e62995e6e Only apply color formatting when using color option
To help the color blind who may use custom terminal foreground /
background colors.
2022-02-15 00:48:10 +01:00
Martin Lund
274cb63197 Add '-c, --color' option
Allow user to select which ANSI color code to use to colorize the tio
text. To successfully set the color the color code must be in the range
0..255.

If color code is negative tio will print all available ANSI colors.

The default color is changed to bold white to make tio defaults usable
for most users, including color blind users.
2022-02-14 22:25:29 +01:00
Martin Lund
137b2823af Update headers 2022-02-13 06:35:03 +01:00
Martin Lund
16836de0e5 Update text 2022-02-12 04:27:09 +01:00
Martin Lund
bb300293cc Rename option -i to -L 2022-02-10 15:07:14 +01:00
Martin Lund
e9208d693e Replace autotools with meson
To introduce much simpler build configuration which is also easier to
maintain.
2022-02-10 05:09:32 +01:00
Renamed from man/tio.1 (Browse further)