6 Changes since tio v2.6:
10 * Add xmodem and ymodem file send support
14 * tty_stdin_input_thread(): write to pipe only if byte_count > 0.
18 * CYGWIN: Add support for "COM*" naming.
22 * chore: reorder log-strip and log-append
24 reorder to maintain consistency with documentation
26 * chore: update readme, bash completion, man page
28 * fix: support --log-append in cli options
32 Changes since tio v2.5:
34 * Remove warning when using pattern option
36 * Add --log-append option
38 Add --log-append option which makes tio append to any existing log file.
40 This also changes the default behaviour of tio from appending to
41 overwriting any existing log file. Now you have to use this new option
48 * Fix line termination for response wait feature
50 The response wait feature waited for a line response, a string
51 terminated with either CR or NL. However, some devices may send a CR and
52 then their line content and then NL. This means tio will quit before
53 receiving and printing the line response. To solve this we simply ignore
54 the CR character and only consider lines terminated with a NL character.
56 This should work for all devices as lines are AFAIK always terminated
57 with either CRNL or a NL.
59 * Update tty device listing configuration
61 Cleanup and add FreeBSD tty device listing support.
65 * Move map variables to tty to keep them all in one spot
67 * Configure socket mapping flags from tty parsing logic. Remove duplicate parsing logic in socket
69 * Support input mapping modes for sockets
73 * Various spelling fixes
77 * avoid "warning: unused parameter" on setspeed stub
79 * use right /dev/ path on Haiku
83 * Update README with details on snap confinement
87 Changes since tio v2.4:
89 * Update configuration file documentation
91 Rename .tiorc to .tioconfig, tiorc to config, etc.
93 * Add support for $HOME/.tioconfig
95 Replaces what used to be $HOME/.tiorc
97 * Fix double prefix key regression
101 * Better error checking in config file, rename the file
103 Accept "true", "enable", "on", "yes", "1" as true values, their
104 counterparts as false ones. Check integer values for errors and range.
105 Warn about ignored (e.g. misspelled) options.
107 Check getenv() return value for NULL.
109 Rename "tiorc" to "config", as it's a static INI file, not an executable
114 Changes since tio v2.3:
116 * Add threaded input handling
118 To make tio more responsive to quit and I/O flush key command when main I/O
119 thread is blocked on output.
121 * Fix so that is it possible to quit tio in tio etc.
123 Fix regression so that it is possible to send the prefix key code to the
124 remote tio session without local tio session reacting to same key code
127 * Add key command to toggle log on/off
129 Add key command 'ctrl-t f' which will toggle log on/off.
131 If no log filename has been specified via the 'log-filename' option then
132 tio will automatically generate a new log filename every time the log
133 feature is toggled on. Meaning, when toggled multiple times, multiple
134 log files will be generated.
136 However, if a log filename has been specified, tio will only write and
137 append to that same file.
141 Changes since tio v2.2:
145 This will make tio go fully silent and not print anything.
147 * Rename config variable 'tty' to 'device'
149 * Deprecate tty config keyword but keep it around for now
153 * Update example tiorc
157 Changes since tio v2.1:
159 * Add shell completion of sub-configuration names
161 Does not work with sub configuration names that contains one or more
168 * Simplify configfile implementation
172 Changes since tio v2.0:
174 * Fix output line delay
176 Apply output line delay on lines ending with \n.
178 On most systems lines ends with \n or \r\n.
180 * Do not print timestamps in hex mode
182 * Improve input mechanism in hex mode
184 Print the 2 character hex code that you input in hex mode but then
185 delete it before sending. This way it is easier to keep track of what
186 you are inputting. It basically mimics the ctrl-shift-u input mechanism
187 that is used to input unicode.
189 * Add support for sending prefix character to serial device
191 Do so by inputting prefix key twice, e.g. input ctrl-t ctrl-t to send
192 ctrl-t character to serial device.
194 * Clean up indentation
196 * Update example tiorc
200 * Add bit reverse order feature
204 Changes since tio v1.47:
206 * Handle stale unix socket file
208 Delete existing unix socket file if it is tested to be stale, meaning no
209 one is listening on it.
211 * Add visual or audible alert support on connect/disconnect
213 The feature is detailed via the following option:
215 --alert none|bell|blink
217 Set alert action on connect/disconnect.
219 It will sound the bell once or blink once on successful connect.
220 Likewise it will sound the bell twice or blink twice on disconnect.
222 Default value is "none" for no alert.
224 * Add experimental RS-485 support
226 Many modern RS-485 serial devices such as the ones from FTDI already
227 operate in RS-485 mode by default and will work with tio out of the box.
228 However, there are some RS-232/485 devices which need to be switched
229 from e.g. RS-232 to RS-485 mode to operate accordingly on the physical
232 This commit implements the switching mechanism and interface required to
233 enable RS-485 mode. It only works on Linux and with serial devices which
234 use device drivers that support the Linux RS-485 control interface.
236 The RS-485 feature is detailed via the following options:
238 --rs-485 Enable RS-485 mode
239 --rs-485-config <config> Set RS-485 configuration
241 Set the RS-485 configuration using the following key or key value pair
242 format in the configuration field:
244 RTS_ON_SEND=value Set logical level (0 or 1) for RTS pin when sending
245 RTS_AFTER_SEND=value Set logical level (0 or 1) for RTS pin after sending
246 RTS_DELAY_BEFORE_SEND=value Set RTS delay (ms) before sending
247 RTS_DELAY_AFTER_SEND=value Set RTS delay (ms) after sending
248 RX_DURING_TX Receive data even while sending data
250 If defining more than one key or key value pair, they must be comma
255 $ tio /dev/ttyUSB0 --rs-485 --rs-r485-config=RTS_DELAY_AFTER_SEND=50,RX_DURING_TX
257 * Add line response feature
259 Add a simple line response feature to make it possible to send e.g. a
260 command string to your serial device and easily receive and parse a line
263 This is a convenience feature for simple request/response interaction
264 based on lines. For more advanced interaction the socket feature should
267 The line response feature is detailed via the following options:
271 Wait for line response then quit. A line is considered any string ending
272 with either CR or NL character. If no line is received tio will quit
273 after response timeout.
275 Any tio text is automatically muted when piping a string to tio while in
276 response mode to make it easy to parse the response.
278 --response-timeout <ms>
280 Set timeout [ms] of line response (default: 100).
284 Sending a string (SCPI command) to a test instrument (Korad PSU) and
287 $ echo "*IDN?" | tio /dev/ttyACM0 --response-wait
288 KORAD KD3305P V4.2 SN:32477045
290 * Fix potential sscanf() overflow
292 * Only print version on '--version'
294 * Remove duplicate show config entry of DTR pulse duration
296 * Remove MacPorts instructions
298 Remove instructions for MacPorts because the port has no maintainer and
299 the port build definition is broken (missing dependency on libinih etc.).
301 It is recommended to use brew instead.
305 * Ignore SIGPIPE signals
307 If the remote end of a socket is closed between when an input character
308 is received from the serial port and when it is written to the socket,
309 tio will receive a SIGPIPE signal when writing the character to the
310 socket, which will terminate the program. To prevent this, ignore the
311 signal, which will cause write(2) to return -EPIPE, causing tio to close
316 Changes since tio v1.46:
318 * Enable log feature when using --log-filename
320 No reason to not assume that the user wants to enable log when the
321 --log-filename is used. This way uses can skip the use of --log to
324 * Enable line buffering of log
326 Replace flushing/writing of log at every log write operation with line
327 buffering, meaning log will be written line by line to make it more I/O
328 friendly but still update frequently.
330 * Avoid invalid hex character messages when switching hex mode
332 * Force flushing of log writes
334 * Renamed tty_flush() to tty_sync()
336 * Fix sync output to serial port
338 Using fsync() on filedescriptors for serial ports can not be relied on.
339 Add use of tcdrain() to make sure data has been written by the serial
340 port before proceeding.
342 This fixes a problem with tio sometimes not writing piped input data to
343 the serial port before exiting which results in the pending writes being
346 * Clean up tty_flush()
348 * Force frequent sync on tty_flush()
352 * Update example tiorc
354 * Quit from non-interactive mode using ctrl-c
356 When piping to tio it will automatically enter "non-interactive" mode
357 which means it will not react to any input key sequences but simple read
358 the input stream and write it to the tty device.
360 This also means that ctrl-t q can not be used to quit and so tio would
361 hang forever when used in non-interactive mode.
363 This change allows to send the standard termination signal by pressing
364 ctrl-c on tio in non-interactive mode to make it quit.
366 * Make sure we flush output buffer to tty when piping to tio
368 * Do not return false read error when piping to tio
370 * Show error message when reading port settings fail
374 * add macports install instructions
378 Changes since tio v1.45:
380 * Rework toggle and pulse feature to support all lines
382 Replace existing toggle and pulse key commands with the following
383 generalized key commands which allows to toggle or pulse all serial port
386 ctrl-t g Toggle serial port line
387 ctrl-t p Pulse serial port line
389 When used, user will be asked which serial line to toggle or pulse.
391 Also introduce --line-pulse-duration option for setting specific pulse
392 duration in milliseconds for each serial line using a key value pair
393 format. Each key represents a serial line. The following keys are
394 available: DTR, RTS, CTS, DSR, DCD, RI.
398 $ tio /dev/ttyUSB0 --line-pulse-duration DTR=200,RTS=300,RI=50
400 Likewise, the pulse duration can also be set via configuration file
401 using the line-pulse-duration variable:
403 line-pulse-duration = DTR=200,RTS=300,RI=50
405 * Upgrade inih wrap to r56
409 * Add example configuration file
414 * Fix relative timestamps
416 Fix the display of relative timestamps. The hack of subtracting 3600
417 only works if you happen to be in a time zone that is one hour away from
418 UTC. When subtracting two time values, the result is an absolute
419 quantity (interval). These should be displayed as-is; without local time
420 zone nor daylight saving correction. Hence gmtime() instead of
425 Changes since tio v1.44:
427 * Introduce bold color option
429 Introduce "bold" color option which only apply bold color formatting to
430 existing system color.
432 Also make "bold" the default color option.
434 Fixes all white issue with black on white tio text.
438 * Change 'ctrl-t T' to 'ctrl-t t' for timestamp toggle
440 * Add support for remapping prefix key
442 Make it possible to remap the prefix key (default: ctrl-t) by setting
443 the prefix-ctrl-key variable in the configuration file.
445 Allowed values are in the range a..z.
447 Example, to set the prefix key to ctrl-a simply do:
451 * Add plaintext man page
455 * docs: add homebrew installation note
459 * fix compilation error
463 Changes since tio v1.43:
465 * Simplify arbitrary baudrate code
467 * Cleanup error printing routines
469 Clean up so that only the following error related printing functions are
470 used: tio_error_printf(), tio_error_printf_silent(),
471 tio_warning_printf().
473 A session mode switch is introduced for error printing so that it will
474 print error messages with better formatting depending on in or out of
481 * Add support for space parity
483 * Rename EOL delay to Output line delay
485 * Replace -U,--upcase with mapping flag OLTU
487 * Simplify tty_write()
491 * Additional commands: EOL delay, lower to upper translation, added mark parity
493 Added command line options:
494 -O, --eol-delay to have a separate delay for end of line
495 -U, --upper to enable translation of lower case alpha to upper case
497 Added ability to set mark parity.
498 Added ctrl-t U key sequence to allow enable/disable lower case alpha to
499 upper case during a session.
500 Updated Man page with command line options, ctrl-t sequences and
501 configuration file options.
502 Updated README.md, with above information.
506 Changes since tio v1.42:
508 * Add '24hour-delta' timestamp option
510 When enabled this option will timestamp new lines with the time elapsed
511 since the line before.
513 This is a very useful feature to identify which events takes the most
516 * Improve description of socket option
518 * Rename ChangeLog to NEWS
526 * Add Pulse DTR command
528 MCUs like the ESP32 can be reset if the serial port DTR line is
529 pulsed for a short time. You could just type CTRL-t d CTRL-t d
530 but that's a little awkward since you have to lift your finger
531 off the CTRL key to type the Ds. Now you can just type CTRL-T D.
533 * Added new command "D" to pulse the DTR line. I.E. Toggle its
534 state twice with a configurable duration between toggles.
536 * Added new config/command line option "--dtr-pulse-duration"
537 to set the duration between the DTR state toggles. The default
542 Changes since tio v1.41:
548 * Handle malloc failure
552 * Add missing 'string.h' include.
556 Changes since tio v1.40:
558 * Rename --hex-mode to --hexadecimal
560 * Enable buffered writing
562 Read block of bytes from input and process same block for output. This
563 will speed things up by reducing I/O overhead.
565 * Enable buffered reading
567 Read block of bytes from input and process byte by byte for output. This
568 will speed things up by reducing I/O overhead.
572 * Cleanup stdout flushing
574 Flushing is not needed since we disabled buffering of stdout.
576 * Simplify stdout_configure() code
578 * Simplify stdin_configure() code
586 Changes since tio v1.39:
588 * Add config support for log-strip
590 * Add config support for hex-mode
592 * Rename --hex to --hex-mode
594 * Fix completion for -e, --local-echo
596 * Ignore newlines in hex output
598 * Fix newline in warning_printf()
600 * Fix ansi_printf_raw() in no color mode
602 * Enter non-interactive mode when piping to tio
604 Add support for a non interactive mode which allows other application to
605 pipe data to tio which then forwards the data to the connected serial
608 Non interactive means that tio does not react to interactive key commands
609 in the incoming stream. This allows users to pipe binary data directly
610 to the connected serial device.
614 $ cat commands.txt | tio /dev/ttyUSB0
616 * Also strip backspace from log
618 To make log strip feature consistent so that we remove all unprintable
619 control characters and escape sequences.
621 * Socket code cleanup
625 * Rename --log-filename to --log-file
629 * Allow strip escape sequence characters from log file
631 The log without escape key stripped is like:
634 ^M[12:47:17] ACRN:\>lasdfjklsdjf
636 ^M[12:47:18] Error: Invalid command.
639 ^M[12:47:26] ACRN:\>sdafkljsdkaljfklsadjflksdjafjsda^H ^H^H...
641 ^M[12:47:31] Error: Invalid command.
643 After strip escape key, the log is like:
649 [12:49:19] Error: Invalid command.
651 [12:49:19] ACRN:\>dfaslhj
653 [12:49:24] Error: Invalid command.
655 Beside escape key, it also handle backspace key as well.
659 Changes since tio v1.38:
661 * Improve key command response for local echo and timestamp
663 * Fix invalid hex character error message
665 * Make sure only matched config section is parsed
667 * Add support for "disable" keyword in config file
669 * Unify error message formating
671 * Cleanup list devices code
673 * Fix command-line tty-device|config parsing
675 Allow user to add options on both sides of the provided config argument.
679 $ tio -b 9600 am64-evm -e
681 Before, tio only allowed adding arguments after the config argument.
683 Implemented as simple as possible by introducing two stage option parsing.
685 * Update bash completion
687 * Add support for IPv4 and IPv6 network sockets
689 Add support for IPv4 and IPv6 network sockets via socket syntax
690 "inet:<port>" and "inet6:<port>" respectively.
692 For example, to listen and redirect serial device I/O to a host bound
693 IPv4 socket simply do:
695 $ tio /dev/ttyUSB0 --socket inet:4444
701 Likewise, for IPv6 do:
703 $ tio /dev/ttyUSB0 --socket inet6:4444
709 If port is 0 or no port is provided default port 3333 is used.
711 * Fix tio deleting unix socket file
713 If tio has a unix file socket open, a second tio instance of tio may
714 delete the socket file. This change fixes so that it will not be deleted
715 and tio will instead error and complain about conflicting socket file.
717 * Rework color option
719 Rework the color option to support setting ANSI color code values
720 ranging from 0..255 or "none" for no color or "list" to print a list of
721 available ANSI colors codes.
723 Also, disables color when piping.
725 * Remove print of hex mode status at startup
727 * Remove newline option in hex mode
729 * Fix configfile memory leaks
731 * Remove command-line option inconsistencies
733 Optional arguments, as parsed by the getopt_long mechanism, are
734 inherently inconsistent with how you define required arguments.
736 To avoid confusion we decide to avoid this inconsistency by replacing
737 optional options with additional options with required arguments.
739 * Replace '1' with 'enable' in config files
741 * Convert errors to warnings
745 * Extended hexadecimal mode.
747 While in hex mode (ctrl-t h) you can output hexadecimal values.
748 E.g.: to send 0x0A you have to type 0A (always 2 characters).
750 Added option -x, --hex to start in hexadecimal mode.
752 Added option --newline-in-hex to interpret newline characters in hex mode.
753 This is disabled by default, because, in my opinion, hex stream is
754 fundamentally different from text, so a "new line" is meaningless in this
759 Changes since tio v1.37:
761 * Redirect error messages to stderr
763 * Improve help and man page
765 * Mention config file in --help
767 * Fix running without config file
769 * Fix config file error messages
771 * Redirect error messages to stderr
773 * Add repology packaging status
775 * Fix parsing of default settings
777 Default configuration file settings were not parsed in case a section
778 was matched. Now we make sure that the default (unnamed) settings are
781 * Append to existing log file (no truncation)
783 * Add socket info to show configuration
785 * Print socket info at startup
787 * Fix socket option parsing
791 * Match user input against config section names if pattern matching was unsuccessful.
793 This allows for better config file ergonomics if the user has a diverse
794 set of serial devices as the name does not need to be specified in
795 the config file twice.
797 * Add support for external control via a Unix domain socket.
799 This feature allows an external program to inject output into and
800 listen to input from a serial port via a Unix domain socket (path
801 specified via the -S/--socket command line flag, or the socket
802 config file option) while tio is running. This is useful for ad-hoc
803 scripting of serial port interactions while still permitting manual
804 control. Since many serial devices (at least on Linux) get confused
805 when opened by multiple processes, and most commands do not know
806 how to correctly open a serial device, this allows a more convenient
807 usage model than directly writing to the device node from an external
810 Any input from clients connected to the socket is sent on the serial
811 port as if entered at the terminal where tio is running (except that
812 ctrl-t sequences are not recognized), and any input from the serial
813 port is multiplexed to the terminal and all connected clients.
815 Sockets remain open while the serial port is disconnected, and writes
818 Example usage 1 (issue a command):
820 echo command | nc -UN /path/to/socket > /dev/null
822 Example usage 2 (use the expect command to script an interaction):
829 spawn nc -UN /path/to/socket
832 send -i $uart "command1\n"
833 expect -i $uart "prompt> "
834 send -i $uart "command2\n"
835 expect -i $uart "prompt> "
839 * fix for using option 'log' without 'log-filename' in config file
843 Changes since tio v1.36:
845 * Make libinih a fallback dependency
847 This means that in case meson does not find libinih it will
848 automatically clone libinih and include it in the build.
850 The libinih library is reconfigured to be statically built so that no
851 shared object will be installed.
855 * Fix timestamp parsing in INI conf
857 * Factorize timestamp parsing to be coherent with command line format in configuration file.
861 Changes since tio v1.35:
863 * Add support for defaults in config file
865 If no section name is specified the configuration will be considered the
868 This allows to set e.g. a default color code for sections which do not
869 configure a color code.
873 Handle SIGHUP so that the registered exit handlers are called to restore
874 the terminal back to its orignal state.
876 * Add color configuration support
878 * Bypass unused result warnings
880 * Force dependency on libinih
882 Configuration file support is considered a mandatory feature.
890 * Move string_to_long() to misc.c
892 * Update CircleCI config
898 * Update LICENSE date
900 * Remove redundant COPYING file
904 * Document configuration file options
906 * Add support for a configuration file
908 * misc: add _unused macro
910 Some parameters are expected to be unused.
911 Add a basic macro to mute these compiler warnings.
913 * options: expose string_to_long()
915 Expose string_to_long() so that other source files can use it.
919 Changes since tio v1.34:
921 * Add support for automatically generated log filename
923 Automatically generate log filename if none is provided.
925 The auto generated file name is on the form:
926 "tio_DEVICE_YYYY-MM-DDTHH:MM:SS.log"
928 * Add support for configurable timestamp format
930 Also changes default timestamp format from ISO8601 to classic 24-hour
931 format as this is assumed to be the format that most users would prefer.
933 And reintroduces strict but optional ISO8601 format.
935 This feature allows to easily add more timestamp formats in the future.
937 * Reintroduce asm-generic/ioctls.h
939 It is needed for ppc builds.
941 * Add macro hack to workaround older buggy glibc
945 * Add support for high bps on OS X
949 Changes since tio v1.33:
951 * Fix setspeed2 compilation
953 * Only apply color formatting when using color option
955 To help the color blind who may use custom terminal foreground /
960 * Add '-c, --color' option
962 Allow user to select which ANSI color code to use to colorize the tio
963 text. To successfully set the color the color code must be in the range
966 If color code is negative tio will print all available ANSI colors.
968 The default color is changed to bold white to make tio defaults usable
969 for most users, including color blind users.
971 * Fix setspeed2 check
973 * Fix meson header check string
975 * Reintroduce long timestamp format
977 But make the timestamp format RFC3339 compliant instead. The RFC states:
979 NOTE: ISO 8601 defines date and time separated by "T".
980 Applications using this syntax may choose, for the sake of
981 readability, to specify a full-date and full-time separated by
982 (say) a space character.
984 This way we keep the information specified by ISO 8601 but make it more
985 human readable which is better for the console output.
987 * Update version year
991 * Fix TTY device listing on Darwin. (#136)
993 * Fix TCGETS2 search on Darwin.
997 Changes since tio v1.32:
999 * Show auto connect status in show configuration
1001 * Use '#pragma once' in all headers
1003 * Improve printed output
1005 Get rid of inconsistencies in the printed output (error printing,
1008 Prepare for user configurable color.
1010 * Rename option -i to -L
1014 * Shorten timestamp description
1016 We do not need the date part of the timestamp. It simply takes up too
1017 much precious line space. In case of logging to file, one can easily
1018 conclude the date from the file date information.
1020 * Replace Travis with circleCI
1022 * Replace autotools with meson
1024 To introduce much simpler build configuration which is also easier to
1027 * Add list serial devices feature
1029 For convenience, add a --list-devices option which lists the available
1032 * Cleanup: Use dot notation for default options struct
1036 * Add command to show version
1038 The key sequence ctrl-t v will now show the version of tio.
1040 * Align format of timestamps
1042 * Add Sylvain as official co-maintainer
1046 * Add '-t' option description for time stamping.
1048 * Add description for time stamping.
1050 * Resolved tio/tio#84: Added timestamps in log file if enabled.
1054 * Refine timestamps with milliseconds and ISO-8601 format (#129).
1056 * Show milliseconds too in the timestamp (#114) and log file (#124)
1057 * Change timestamp format to ISO-8601.
1061 * Output newline on stdout with hex print mode
1063 This is to fix the issue #104. The timestamp will always be
1064 printed at the beginning of line:
1066 [10:25:56] Switched to hexadecimal mode
1067 0d 0a 0d [10:25:57] 41 43 52 4e 3a 5c 3e 0d 0a 0d [10:25:58] 41
1071 [12:34:56] 45 72 72 6f 72 3a 20 49 6e 76 61 6c 69 64 20
1072 [12:34:56] 41 43 52 4e 3a 5c 3e
1073 [12:34:56] 41 43 52 4e 3a 5c 3e
1074 [12:34:57] 41 43 52 4e 3a 5c 3e 6c 73
1078 * Make comparison POSIX compliant
1080 String comparison with == is not POSIX compliant and can fail with e.g.
1083 Henrik Brix Andersen:
1085 * Add bash completion of tty devices.
1087 * Add -t/--timestamp to bash completion script.
1091 * Local echo: show character by character even if stdout buffered.
1095 * Show error when failing to open a tty
1099 * Fix out of tree builds
1101 Out of tree builds are currently broken because $(top_srcdir)src/include
1102 is not in the search path. In tree builds are working because autoconf adds
1103 $(top_builddir)/src/include to the search path for the generated config.h.
1104 As $(top_builddir) and $(top_srcdir) are identical during in tree builds
1105 the search path still end up being somehow correct.
1107 To fix this add -I$(srcdir)/include to the CPPFLAGS in Makefile.am.
1111 * src/setspeed2.c: fix redefinition of termio
1113 Include ioctls.h and termbits.h from asm-generic instead of asm to avoid
1118 * Exit if output speed cannot be set.
1120 Lars Kellogg-Stedman:
1122 * fflush() after putchar() for print_hex and print_normal
1124 In order for local echo to work properly, we have to either call
1125 fflush(stdout) after every character or just disable line buffering.
1126 This change calls fflush() after putchar().
1128 * Disable line buffering in stdout
1130 In order for local echo to work properly, we have to either call
1131 fflush(stdout) after every character or just disable line buffering.
1132 This change uses setbuf(stdout, NULL) to do the latter.
1136 * dont show line state if ioctl failed
1138 * add serial lines manual control
1142 * Flush every local echo char
1144 Flush stdout at every char in case it
1145 happens to be buffered.
1149 * Newline: handle booth NL and CR
1151 Flag ONLCRNL expects code \n after press Enter, but on some systems \r is send instead.
1155 Changes since tio v1.31:
1159 * Minor code style cleanups
1161 * Cleanup print macros
1165 Make sure output is transmitted immediately by flushing the output.
1169 * add optional timestamps
1171 with "-t" or "C-t T", toggle a timestamp prefix to each line.
1179 * Added macOS compatibility
1181 * Made O_NONBLOCK flag to open() call specific to macOS only.
1183 * Added macOS-related details.
1185 * Added O_NONBLOCK flag to open() call for macOS (10.13.6) compatibility.
1189 Changes since tio v1.30:
1197 * Clarify the input/output variable names (No-op change)
1199 * Organize options the same sequence they are mentioned in cmdline help.
1203 * Map CR->NL locally on output instead of using tio.c_oflag |= OCRNL.
1205 This mostly is intended to have local echo output exactly what is sent
1206 to the remote endpoint.
1207 A nice side-effect is, that it also fixes tty-implementations, that can't
1208 deal with the OCRNL flag on tio.c_oflag.
1210 * Provide local-echo option.
1212 Can be switched on with -e on the command line.
1213 Can be toggled with Ctrl t e while program is running.
1215 * Write to logfile as soon as we have the data, don't buffer.
1217 Logfiles are important to see what happened, in particular if something
1218 unexpected happened; so we want to make sure that the logfile is flushed
1221 Before this change, the logfile was typically written at the end in
1222 a large chunk as the default (large) buffering applied. Now, characters are
1223 written out ASAP, so it is possible to get a live-view with a
1228 Changes since tio v1.29:
1232 * Update man page and bash completion
1238 * ONLCRNL: change the method to map NL to CR-NL
1242 Changes since tio v1.28:
1244 * Add mapping flags INLCRNL and ODELBS
1246 The following new mapping flags are added:
1248 INLCRNL: Map NL to CR-NL on input.
1249 ODELBS: Map DEL to BS on output.
1251 Flags requested and tested by Jan Ciger (janoc).
1255 Changes since tio v1.27:
1261 * Add snap status to README.md
1263 * Add README.md to prettify GitHub page
1265 * Add missing header
1269 * Add missing header file under musl-libc
1271 Musl's inclusion tree slightly differs from glibc, therefore TCGETS2 is
1272 not reachable through sys/ioctl.h, so asm/ioctls.h needs to be included
1277 * Fix grammar and typos
1281 Changes since tio v1.26:
1285 * Add support for setting non-standard baudrates
1287 Support for non-standard baudrate settings will be automatically enabled
1288 if the termios2 interface is detected available. However, to play it
1289 safe, the old and widely supported termios interface will still be used
1290 when setting standard baudrates.
1298 Changes since tio v1.25:
1302 Make stdin behave more raw'ish. In particular, don't
1303 translate CR -> NL on input.
1305 * Add special character map feature
1307 Add a --map option which allows mapping special characters, in particular CR and
1308 NL characters which are used in various combinations on various platforms.
1322 Changes since tio v1.24:
1324 * Fix error applying new stdout settings
1326 On Fedora 26 tio will quit with the following error message:
1328 "Error: Could not apply new stdout settings (Invalid argument)"
1330 In case of Fedora, it turns out that the new stdout settings used are a
1331 bit too aggressive because an empty termios structure is used. To remedy
1332 this we reuse the existing stdout settings and only reconfigure the
1333 specific options we need to make a "raw" stdout configuration.
1335 * Remove unused pkgconfig in configure
1339 Remove unused variable.
1343 Changes since tio v1.23:
1345 * Optimize clear screen command
1347 Replaced system call with inline ANSI/VT100 clear screen code sequence
1349 * Fix bash completion installation
1351 Fixed the configure script to avoid that the bash completion script gets
1352 installed outside of the prefix location. The default install location
1353 is now $prefix/share/bash-completion/completions.
1355 Use the configure option '--with-bash-completion-dir=PATH' if you need
1356 to install the bash completion script elsewhere.
1360 * Add missing commas in conditional sentences
1364 Changes since tio v1.22:
1366 * Update copyright headers
1374 Changes since tio v1.21:
1376 * Update man page date
1378 * Update copyright year
1382 * Update README and man page
1386 Changes since tio v1.20:
1388 * Add support for hexadecimal mode
1390 A new key command 'ctrl-t h' is introduced which toggles between
1391 hexadecimal mode and normal mode. When in hexadecimal mode data received
1392 will be printed in hexadecimal.
1394 * Do not distribute src/bash_completion/tio
1396 Since the bash completion tio script is now autogenerated from tio.in it
1397 should not be distributed in the tarball.
1399 * Add missing forward flag
1401 * Update AUTHORS file
1405 * 'ctrl-t b' to send serial break.
1409 * Removed git commit references from ChangeLog
1411 ChangeLog is primary useful for users who don't have the git repository
1414 Replace git commit references with version numbers; or if the change
1415 only cleans up another change with no release in between, remove the
1416 changelog item completely.
1420 Changes since tio v1.19:
1422 * Added more error handling of terminal calls
1424 Also removed duplicate terminal flushing calls.
1426 * Revert "Added support for non-standard baud rates"
1428 This reverts a change made in v1.18.
1430 Reverting because supporting non-standard or arbitrary baud rates is
1431 troublesome because the c library provides no means of doing so and even
1432 if bare metal linux kernel interface is used it will not work on all
1433 Linux kernels version.
1437 Changes since tio v1.18:
1439 * Rearranged key commands
1441 Rearranged the key commands:
1443 ctrl-t c (clear screen) is now
1444 ctrl-t l which is similar to the well known shell ctrl-l
1446 ctrl-t i (show settings information) is now
1447 ctrl-t c (show configuration)
1449 Updated man page accordingly.
1451 * Added "ctrl-t c" key command to clear screen
1455 Changes since tio v1.17:
1459 * Added support for non-standard baud rates
1461 Only enabled when possible, that is, when the BOTHER definition is
1464 It is untested but it should work as described here:
1465 https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=683826
1467 Some Cypress USB<->serial devices supposedly supports arbitrary speeds.
1469 * Generate baudrate switch cases based on detection
1471 Support a single source of baud rate configuration as discussed in
1472 https://github.com/tio/tio/issues/45 .
1474 To do so, autogeneration of the switch cases which do the baud rate
1475 option value check and configuration/conversion in tty_configure() is
1476 introduced via a single macro.
1478 Just to be safe, this change also enables configure detection of all
1479 baud rates, including the ones previously assumed supported by most/all
1484 * Exit when not a tty device in autoconnect mode
1488 * Added non-standard baud rates that are defined on FreeBSD
1490 * Capitalized "GitHub" in README
1494 Changes since tio v1.16:
1496 * Compacted tty_configure() a bit
1498 * Fixed automatic baud rate enablement
1502 * Added autodetection of available baud rates
1504 Various platforms support different baud rates.
1506 To avoid adding platform specific handling generic baud rate detection
1507 tests are introduced in the configure script. Successfully detected baud
1508 rates are automatically enabled. This applies to both the C code and the
1509 bash completion script.
1512 Baud rates below 57600 are defined by POSIX-1 and supported by most
1513 platforms so only baud rate 57600 and above are tested.
1515 * Updated bash-completion
1517 * Fixed printf() format type
1519 * Added Travis build configuration
1523 * Generated bash completion at configure time
1525 * Reduce code duplication in baud rate detection
1527 * Add support for baud rates 200 and 1800
1529 * Fixed baudrate type
1533 Changes since tio v1.15:
1539 * Removed obsolete packaging files
1541 * Removed use of deprecated bzero()
1545 Changes since tio v1.14:
1547 * Removed + to remove potential confusion
1549 * Added input digit checks
1551 * Fixed license string
1553 * Introduced tty_configure()
1555 Moved tty configuration actions to tty_configure() in tty.c. This way
1556 options.c is strictly about parsing options nothing else.
1558 * Function names cleanup
1560 * Updated AUTHORS file
1562 Added Nick who created the new tio package for Arch Linux.
1564 * Fixed tx/rx counters type
1568 * Include config.h before standard headers
1570 Large file support was meant to be enabled in v1.11.
1571 This change enables it for real.
1575 Changes since tio v1.13:
1577 * Fixed tio_printf macro
1579 * Fixed launch hints
1581 Fixed launch hints not being printed in no autoconnect mode.
1583 * Added 'ctrl-t ?' to list available commands
1585 * Fixed log mechanism
1587 To avoid echoing only log what is received from tty device.
1589 * Improved tio output
1591 Added titles and indentation to commands output for clearer separation
1592 when firing commands repeatedly.
1594 Also added print of tio version and quit command hint at launch.
1596 * Cleaned up tio print mechanism
1602 "allow" is a transitive verb, which requires an object,
1603 so "allow to <verb>" is ungrammatical.
1609 Changes since tio v1.12:
1611 * Fixed some error prints
1613 * Fixed error printing for no autoconnect mode
1615 Always print errors but only print silent errors when in no autoconnect
1618 * Added key command for showing session settings
1620 A new key command "ctrl-t i" is added to allow the user to display the
1621 various session settings information (baudrate, databits, log file, etc.).
1623 This is useful in case you have a running session but have forgotten
1624 what the settings are.
1628 Changes since tio v1.11:
1630 * Consolidated command key handling
1632 * Moved delay mechanism into separate function
1634 * Retired obsolete usleep()
1636 Replaced with nanosleep()
1638 * Added simple tx/rx statistics command (ctrl-t s)
1640 To display the total number of bytes transmitted/received simply perform the
1641 'ctrl-t s' command sequence.
1643 This feature can be useful when eg. trying to detect non-printable
1646 * Further simplification of key handling
1648 Changed so that the "ctrl-t ctrl-t" sequence is now simply "ctrl-t t" to
1649 send the ctrl-t key code. This is inspired by screen which does similar
1650 to send its command key code (ctrl-a a).
1652 This change also eases adding new key commands if needed.
1654 Updated man page accordingly.
1656 * Cleaned up and simplified key handling
1660 * Insert output delay only if something was output
1664 Changes since tio v1.10:
1666 * Enabled large file support (LFS)
1668 Added autotools AC_SYS_LARGEFILE to support 64 bit file size handling.
1674 Changes since tio v1.9:
1676 * Introduced lock on device file
1678 Tio will now test for and obtain an advisory lock on the tty device file
1679 to prevent starting multiple sessions on the same tty device.
1685 * Treat EOF on stdin as error
1689 Changes since tio v1.8:
1691 * Cleanup of error handling
1693 Introduced consistent way of handling errors and printing error messages.
1695 Also upgraded some warnings to errors.
1697 * Updated localtime() error message
1703 * Fix error handling for select()
1705 Previously the error handling code for select() was unreachable.
1707 * Removed unneeded quotes from AM_CFLAGS
1711 * Fixed setting "tainted"
1713 Set "tainted" if and only if any character was read from the device.
1715 Ctrl-t is no longer sent to the device on exit, so the trick to avoid
1716 its echo is not necessary.
1718 Characters read from stdin don't directly affect output, so they
1719 shouldn't enable "tainted".
1721 * Used \r in color_printf()
1723 \033[300D is an unusual way to move the cursor back to column 1.
1724 Use straightforward \r instead.
1726 * Added missing \r\n to warning messages
1728 \n alone is not enough, because the terminal is in raw mode.
1732 Changes since tio v1.7:
1734 * Fixed enablement of compiler warnings
1736 * Fixed log_open() prototype
1738 * Fixed index error wrt ctrl-t detection
1740 * Fixed handling of ctrl-t
1742 Before, when exercising the quit key sequence (ctrl-t + q) the ctrl-t code
1743 (0x14) would be sent.
1745 This is now fixed so that it is not sent.
1747 However, in case it is needed to send ctrl-t to the device it is possible by
1748 simply repeating the ctrl-t.
1750 Meaning, ctrl-t + ctrl-t = ctrl-t sent to device.
1752 * Improved error handling
1754 Fixes a memory leak and avoids aggressive busy looping when problems
1755 accessing tty device.
1757 * Removed redundant log_close() call
1759 * Enabled compiler warnings
1763 * Stopped copying arguments to fixed-size buffers
1765 Don't needlessly copy command-line arguments into fixed-size buffers.
1767 Previously the program crashed if an overlong pathname was provided on
1768 the command line. Also, some systems (such as GNU Hurd) don't define
1771 * Added const to log_open() prototype
1773 * Completed the ^g to ^t transition
1775 In v1.7 the escape key was changed from ^g to ^t, but some
1776 code and comments still referred to the old key.
1778 * Used HTTPS for tio.github.io
1780 * Man page beautification
1782 * Bumped date in man page
1784 * Improve man page formatting
1786 Use regular font for metacharacters such as "[]", "," or "|";
1787 use italic font for metavariables.
1789 * Fixed hyphen vs minus vs em-dash confusion in man page
1792 \- prints as minus sign;
1793 \em prints as em-dash.
1797 Changes since tio v1.6:
1799 * Changed escape key from ^g to ^t
1801 After renaming to "tio" it makes sense to change the escape key
1802 accordingly. Hence, the new escape key is ^t.
1804 Meaning, in session, its now ctrl-t + q to quit.
1808 * Fixed silly "tio or tio" in man page