Commit graph

1200 commits

Author SHA1 Message Date
Martin Lund
273afb73f4 Update README 2024-04-28 17:22:26 +02:00
Martin Lund
84dd4c3685 Update README 2024-04-28 14:47:07 +02:00
Martin Lund
33eae0c30d Update script API 2024-04-28 14:46:41 +02:00
Martin Lund
9bc93991e7 Update NEWS 2024-04-27 23:51:01 +02:00
Martin Lund
ed70a587ec Update NEWS 2024-04-27 19:30:24 +02:00
Martin Lund
fe2973522e Fix shadow variable 2024-04-27 19:11:37 +02:00
Martin Lund
f5f62ee02d Disable DEC Special Graphics at exit if vt100
If a vt100 terminal receives the Shift In character '\016' it will
enable the 7 bit DEC Special Graphics character set used for line drawing.

For most users this can happen due to line noise from the tty device and
will likely mess up your terminal even after tio exits.

To better handle this we want to make sure that tio disables this mode
by sending the Shift Out character '\017' at exit.

This mechanism will only activate if environment variable TERM assumes
value "vt100".
2024-04-27 17:32:48 +02:00
Martin Lund
cd160250a6 Cleanup 2024-04-27 17:13:06 +02:00
Martin Lund
588ac3e8ac Update TODO 2024-04-27 15:45:34 +02:00
Martin Lund
76de9b890e Update README 2024-04-27 15:33:22 +02:00
Martin Lund
42ff234204 Add hexN output mode
Adds support for hexN mode where N is a number in the range 1 to 4096
which defines how many hex values will be printed before a line break.

In short, it defines the width of the hex output.

In this mode, if timestamps are enabled they will be added to each hex
line.
2024-04-27 15:25:34 +02:00
Martin Lund
4113a072c2 Make sure to reset tainted state 2024-04-27 14:41:08 +02:00
Martin Lund
232cbee697 Rename sub-config to profile
Because better naming.
2024-04-27 09:13:33 +02:00
Martin Lund
1b77ed783b Update README 2024-04-27 02:30:22 +02:00
Martin Lund
41b8e4f99c Update README 2024-04-27 02:03:12 +02:00
Martin Lund
c61d56935b Fix excludes pattern matching 2024-04-27 01:31:43 +02:00
Martin Lund
6e779a0520 Use lua io.write() instead of print()
io.write() gives better output control as print() is hardcoded to always
print a newline.
2024-04-27 00:48:38 +02:00
Martin Lund
d8fbd607d4 Update README 2024-04-26 22:58:24 +02:00
Martin Lund
01f3c391f0 Update README 2024-04-26 22:54:25 +02:00
Martin Lund
5bbdf3b9f8 Update README 2024-04-26 22:38:55 +02:00
Martin Lund
b4741de50c Bump version 2024-04-26 22:28:27 +02:00
Martin Lund
d19ba1c492 Add new ways to manage serial devices
* Rename --list-devices to --list

 * Rename --no-autoconnect to --no-reconnect

 * Switch -l and -L options

   * -l now lists available serial devices

   * -L enables log to file

 * Add option --auto-connect <strategy>

   * Supported strategies:

     * "new" - Waits to connect first new appearing serial device

     * "latest" - Connects to latest registered serial device

     * "direct" - Connect directly to specified serial device (default)

 * Add options to exclude serial devices from auto connect strategy by
   pattern

   * Supported exclude options:

     * --exclude-devices <pattern>

       Example: '--exclude-devices "/dev/ttyUSB2,/dev/ttyS?"'

     * --exclude-drivers <pattern>

       Example: '--exclude-drivers "cdc_acm"'

     * --exclude-tids <pattern>

       Example: '--exclude-tids "yW07,bCC2"'

     * Patterns support '*' and '?'

 * Connect to same port/device combination via unique topology ID (TID)

   * Topology ID is a 4 digit base62 encoded hash of a device topology
     string coming from the Linux kernel. This means that whenever you
     plug in the same e.g. USB serial port device to the same USB hub
     port connected via the exact same hub topology all the way to your
     computer, you will get the same unique TID.

   * Useful for stable reconnections when serial device has no serial
     device by ID

   * For now, only tested on Linux.

 * Reworked and improved listing of serial devices to show serial devices:

   * By device

     * Including TID, uptime, driver, and description.

     * Sorted by uptime (newest device listed last)

   * By unique topology ID

   * By ID

   * By path

 * Add script interface 'list = tty_search()' for searching for serial
   devices.
2024-04-26 22:19:22 +02:00
Martin Lund
ae76f8f58d Clean up timestamp enum definition 2024-04-20 15:02:43 +02:00
Martin Lund
b05f38abd0 Add missing options to show configuration 2024-04-20 14:51:45 +02:00
Martin Lund
51bfa68bdd Text cleanup 2024-04-20 14:03:38 +02:00
Martin Lund
fa4207ddfd Update description of mute option 2024-04-19 20:14:22 +02:00
Martin Lund
3ca6a66d9b Add lua read_string() function 2024-04-19 17:10:36 +02:00
Martin Lund
f1c5394570 Don't forget to log output in lua expect() 2024-04-19 16:57:27 +02:00
Martin Lund
0105346a11 Cleanup 2024-04-19 16:56:30 +02:00
Martin Lund
96fafc5fb4 Generalize automatic login example for Linux 2024-04-19 14:44:54 +02:00
Davis C
29546bb13a Updated login example with new expect logic 2024-04-19 14:41:30 +02:00
Martin Lund
b0e9fa02e8 Fix log output in hex output mode 2024-04-18 18:55:08 +02:00
Martin Lund
f257b7fba5 Update README 2024-04-18 16:23:41 +02:00
Martin Lund
6fff4939e4 Add timeout based timestamps in hex output mode
This change reintroduces timestamping in hex output mode but based on
timeout instead of new lines which made no sense. This means that
timestamps will only be printed when timeout time has elapsed with no
output activity from serial device.

Adds option --timestamp-timeout <ms> for setting the timeout value in
milliseconds.

Defaults to 200 ms.
2024-04-18 15:52:45 +02:00
Martin Lund
a8e0d2693d Do not echo CR in line input and hex output mode 2024-04-18 14:44:39 +02:00
Martin Lund
c440da2ea8 Improve switched messages 2024-04-18 13:35:09 +02:00
Martin Lund
f1144ca5cc Cleanup 2024-04-18 13:29:06 +02:00
Martin Lund
3cc2d90fda Extend lua expect() to also return matched string 2024-04-17 23:38:21 +02:00
Martin Lund
48c9e8a9a9 Update AUTHORS 2024-04-17 18:30:53 +02:00
Martin Lund
f4c4387e05 Add automatic login script example 2024-04-17 18:27:46 +02:00
Martin Lund
a1987b61b4 Organize examples directory 2024-04-17 18:24:33 +02:00
Martin Lund
f8924182d3 Update TODO 2024-04-17 18:15:51 +02:00
Davis C
d0e95c5fba Reset buffer size at start of expect 2024-04-17 18:13:00 +02:00
Davis C
1cefb7b6bc Revert "Added reset_buffer()"
This reverts commit ee56d1280d.
2024-04-17 18:13:00 +02:00
Davis C
794c5202f4 Added reset_buffer() 2024-04-17 18:13:00 +02:00
Davis C
98653566a8 Return 1 when expect matches 2024-04-17 18:13:00 +02:00
Martin Lund
a605533213 Fix local echo in line mode 2024-04-17 16:17:20 +02:00
Martin Lund
1e20948d83 Fix line input mode
Do not forward input characters to tty device before a line is input via
carriage return.
2024-04-16 19:38:45 +02:00
Martin Lund
4801816357 Introduce basic line input mode 2024-04-16 17:42:34 +02:00
Martin Lund
d60363a64c Cleanup global variable name shadowing 2024-04-15 11:21:36 +02:00