Use up and down arrow keys to navigate history.
Use left and right arrow keys to move cursor back and forth.
We try mimic the behaviour of GNU readline which we can not use because
we also need to react to key commands.
After including the use of glib we might as well replace inih
with the glib key file parser.
All configuraiton file parsing has been reworked and also the options
parsing has been cleaned up, resulting in better and stricter
configuration file and option value checks.
Compared to old, configuration files now requires any default
configurations to be put in a group/section named [default].
Configuration file keywords such as "enable", "disable", "on",
"off", "yes", "no", "0", "1" have been retired. Now only "true" and
"false" apply to boolean configuration options. This is done to simplify
things and avoid any confusion.
The pattern option feature has been reworked so now the user can now
access the full match string and any matching subexpression using the
%mN syntax.
For example:
[usb devices]
pattern = usb([0-9]*)
device = /dev/ttyUSB%m1
Then when using tio:
$ tio usb12
%m0 = 'usb12' // Full match string
%m1 = 12 // First match subexpression
Which results in device = /dev/ttyUSB12
Collapses lua high(), low(), toggle(), config_high(), config_low(),
config_apply() into one simple function:
set{<line>=<state>, ...}
Line can be any of DTR, RTS, CTS, DSR, CD, RI.
State is high, low, or toggle.
Example:
script = set{DTR=high, RTS=low}; msleep(100); set{DTR=low, RTS=high}; msleep(100); set{RTS=low}
Notice the use of {} instad of () when calling the set function. This is
required to pass parameters by name in lua.
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".
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.
* 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.
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.
Remove options and rework input handling so it is possible to do the
same thing but via script which is much more flexible.
These options were always a bit of a hardcoded solution. With the new
script expect feature we can wait for any type of response.
For example, pipe command to serial device and wait for line response within 1 second:
$ echo "*IDN?" | tio /dev/ttyACM0 --script "expect('\r\n', 1000)" --mute
Replaces -x, --hexadecimal option with --intput-mode and --output-mode
so it is possible to select hex or normal mode for both input and output
independently.
To obtain same behaviour as -x, --hexadecimal use the following
configuration:
input-mode = hex
output-mode = hex
On some platforms calling high()/low() to switch line states result in
costly system calls whick makes it impossible to swith two or more tty
lines simultaneously.
To help solve this timing issue we introduce a tty line state
configuration API which can be used instead of using
high()/low().
Using config_low(line) and config_high(line) one can set up a new line
state configuration for multiple lines and then use config_apply() to
finally apply the configuration. This will result in only one system
call to instruct the serial port drive to switch all the configured line
states which should help ensure that the lines are switched
simultaneously.
Example:
script = config_high(DTR); config_low(RTS); config_apply()
Add ONULBRK mapping to map nul (zero) to send break signal on output.
This is useful if one needs to e.g. send the break signal to the tty
device when connected via socket.
Add support for running Lua scripts that can manipulate the tty control
lines. Script is activated automatically on connect or manually via in
session key command.
The Lua scripting feature opens up for many posibilities in the future
such as adding expect like functionality to easily and programatically
interact with the connected device.