Commit graph

1006 commits

Author SHA1 Message Date
Davis C
ee56d1280d Added reset_buffer() 2024-04-17 09:24:24 -05:00
Davis C
21dea47f42 Merge remote-tracking branch 'remote/master' 2024-04-16 20:26:36 -05:00
Davis C
2c3e53d50f Return 1 when expect matches 2024-04-16 20:22:13 -05: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
Martin Lund
5c45150f58 Bump version 2024-04-14 18:43:58 +02:00
Martin Lund
d3993da6d4 Update AUTHORS 2024-04-14 18:05:01 +02:00
Martin Lund
00f3ea9b7f Update NEWS 2024-04-14 18:04:51 +02:00
Martin Lund
e8114ca0a4 Update version date 2024-04-14 18:04:31 +02:00
Martin Lund
de0a7c547f Rework resolve_config_file() 2024-04-14 12:52:28 +02:00
Martin Lund
76a7a56e85 Rework line_pulse_duration_option_parse()
Introduce proper sscanf() checks.
2024-04-14 11:43:23 +02:00
Martin Lund
9744fcafcf Rework rs485_parse_config()
Introduce proper sscanf() checks.
2024-04-14 11:30:39 +02:00
Martin Lund
c4878a90d7 Clean up file descriptor name shadowing 2024-04-14 10:42:22 +02:00
Martin Lund
ae461dc296 Add missing header guard 2024-04-14 10:23:43 +02:00
Martin Lund
10eedd4ad2 Update README 2024-04-14 02:32:25 +02:00
Martin Lund
fa41771e65 Update README 2024-04-14 01:50:50 +02:00
Martin Lund
a1a4dc4642 Update plain text man page 2024-04-14 01:42:43 +02:00
Martin Lund
7dbb806311 Upgrade inih subproject 2024-04-14 01:08:37 +02:00
Martin Lund
97537853a8 Remove options --response-wait, --response-timeout
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
2024-04-13 23:18:25 +02:00
Martin Lund
e1e3e298bf Add lua exit(code) 2024-04-13 16:46:00 +02:00
Martin Lund
c5dac4fd33 pdate README 2024-04-13 15:48:32 +02:00
Martin Lund
51300cc4f0 Add timeout feature to expect() 2024-04-13 15:30:14 +02:00
Martin Lund
3ad090caf7 Update README 2024-04-13 00:56:41 +02:00
Martin Lund
fba73f98db Update README 2024-04-13 00:11:44 +02:00
Martin Lund
2db87ede53 Update README 2024-04-12 22:21:35 +02:00
Martin Lund
fca76a017d Fix text alignment 2024-04-12 21:15:36 +02:00
Martin Lund
7915c1a445 Update README 2024-04-12 18:51:17 +02:00
Martin Lund
6c75ec553d Update README 2024-04-12 18:36:31 +02:00
Martin Lund
fc54df1f22 Add lua expect(string)
Add simple expect functionality.

The expect(string) function will wait for input from the tty device and
only return when there is a string match. Regular expressions are
supported.

Example:

script = expect('password:'); send('my_password\n')
2024-04-12 18:20:33 +02:00
Martin Lund
0afae5d3ee Update text 2024-04-12 13:03:51 +02:00
Martin Lund
e028544cd0 Update plain text man page 2024-04-12 00:24:01 +02:00
Martin Lund
5eb649278a Clean up man page 2024-04-12 00:23:04 +02:00
Martin Lund
418a43d96e Add lua send(string) 2024-04-12 00:08:45 +02:00
Martin Lund
00c8124a0a Add lua modem_send(file,protocol) 2024-04-11 21:20:50 +02:00
Martin Lund
78f96bd32c Fix xymodem error print outs 2024-04-10 20:13:44 +02:00
Martin Lund
d8fb1ab0ca Rework x/y-modem transfer command
Remove ctrl-t X optin and instead introduce submenu to ctrl-t x option
for picking which xmodem protocol to use.
2024-04-10 19:56:21 +02:00
Martin Lund
a208c9908a Update README 2024-04-10 15:05:29 +02:00
Martin Lund
2b6a79b9f0 Cleanup options 2024-04-10 15:04:47 +02:00
Martin Lund
2fff4d36d0 Add independent input and output mode
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
2024-04-10 14:40:18 +02:00
HiFiPhile
fd6a246908 Add manpage. 2024-04-09 14:58:17 +02:00
HiFiPhile
901e00bba3 Poll on serial port read instead of delay. 2024-04-09 14:58:17 +02:00
Mengsk
eea46a2005 Add Xmodem-CRC support. 2024-04-09 14:58:17 +02:00
Martin Lund
2ee1f5c224 Update README 2024-04-07 12:40:47 +02:00
Martin Lund
3e50191107 Add tty line configuration script API
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()
2024-04-06 09:34:25 +02:00
Martin Lund
4369d5b66f Add ONULBRK mapping flag
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.
2024-04-05 13:55:51 +02:00
Martin Lund
70913fe120 Add --log-directory option
For specifying directory path in which to save automatically named log
files.
2024-04-04 12:31:55 +02:00
Martin Lund
83f826349b Update codeql config 2024-04-02 03:52:54 +02:00
Martin Lund
00f57c9992 Update circleCI 2024-04-01 15:55:03 +02:00
Martin Lund
0becfa3274 Add Lua scripting feature
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.
2024-04-01 15:37:40 +02:00