5 Changes since tio v1.37:
7 * Redirect error messages to stderr
9 * Improve help and man page
11 * Mention config file in --help
13 * Fix running without config file
15 * Fix config file error messages
17 * Redirect error messages to stderr
19 * Add repology packaging status
21 * Fix parsing of default settings
23 Default configuration file settings were not parsed in case a section
24 was matched. Now we make sure that the default (unnamed) settings are
27 * Append to existing log file (no truncation)
29 * Add socket info to show configuration
31 * Print socket info at startup
33 * Fix socket option parsing
37 * Match user input against config section names if pattern matching was unsuccessful.
39 This allows for better config file ergonomics if the user has a diverse
40 set of serial devices as the name does not need to be specified in
41 the config file twice.
43 * Add support for external control via a Unix domain socket.
45 This feature allows an external program to inject output into and
46 listen to input from a serial port via a Unix domain socket (path
47 specified via the -S/--socket command line flag, or the socket
48 config file option) while tio is running. This is useful for ad-hoc
49 scripting of serial port interactions while still permitting manual
50 control. Since many serial devices (at least on Linux) get confused
51 when opened by multiple processes, and most commands do not know
52 how to correctly open a serial device, this allows a more convenient
53 usage model than directly writing to the device node from an external
56 Any input from clients connected to the socket is sent on the serial
57 port as if entered at the terminal where tio is running (except that
58 ctrl-t sequences are not recognized), and any input from the serial
59 port is multiplexed to the terminal and all connected clients.
61 Sockets remain open while the serial port is disconnected, and writes
64 Example usage 1 (issue a command):
66 echo command | nc -UN /path/to/socket > /dev/null
68 Example usage 2 (use the expect command to script an interaction):
75 spawn nc -UN /path/to/socket
78 send -i $uart "command1\n"
79 expect -i $uart "prompt> "
80 send -i $uart "command2\n"
81 expect -i $uart "prompt> "
85 * fix for using option 'log' without 'log-filename' in config file
89 Changes since tio v1.36:
91 * Make libinih a fallback dependency
93 This means that in case meson does not find libinih it will
94 automatically clone libinih and include it in the build.
96 The libinih library is reconfigured to be statically built so that no
97 shared object will be installed.
101 * Fix timestamp parsing in INI conf
103 * Factorize timestamp parsing to be coherent with command line format in configuration file.
107 Changes since tio v1.35:
109 * Add support for defaults in config file
111 If no section name is specified the configuration will be considered the
114 This allows to set e.g. a default color code for sections which do not
115 configure a color code.
119 Handle SIGHUP so that the registered exit handlers are called to restore
120 the terminal back to its orignal state.
122 * Add color configuration support
124 * Bypass unused result warnings
126 * Force dependency on libinih
128 Configuration file support is considered a mandatory feature.
136 * Move string_to_long() to misc.c
138 * Update CircleCI config
144 * Update LICENSE date
146 * Remove redundant COPYING file
150 * Document configuration file options
152 * Add support for a configuration file
154 * misc: add _unused macro
156 Some parameters are expected to be unused.
157 Add a basic macro to mute these compiler warnings.
159 * options: expose string_to_long()
161 Expose string_to_long() so that other source files can use it.
165 Changes since tio v1.34:
167 * Add support for automatically generated log filename
169 Automatically generate log filename if none is provided.
171 The auto generated file name is on the form:
172 "tio_DEVICE_YYYY-MM-DDTHH:MM:SS.log"
174 * Add support for configurable timestamp format
176 Also changes default timestamp format from ISO8601 to classic 24-hour
177 format as this is assumed to be the format that most users would prefer.
179 And reintroduces strict but optional ISO8601 format.
181 This feature allows to easily add more timestamp formats in the future.
183 * Reintroduce asm-generic/ioctls.h
185 It is needed for ppc builds.
187 * Add macro hack to workaround older buggy glibc
191 * Add support for high bps on OS X
195 Changes since tio v1.33:
197 * Fix setspeed2 compilation
199 * Only apply color formatting when using color option
201 To help the color blind who may use custom terminal foreground /
206 * Add '-c, --color' option
208 Allow user to select which ANSI color code to use to colorize the tio
209 text. To successfully set the color the color code must be in the range
212 If color code is negative tio will print all available ANSI colors.
214 The default color is changed to bold white to make tio defaults usable
215 for most users, including color blind users.
217 * Fix setspeed2 check
219 * Fix meson header check string
221 * Reintroduce long timestamp format
223 But make the timestamp format RFC3339 compliant instead. The RFC states:
225 NOTE: ISO 8601 defines date and time separated by "T".
226 Applications using this syntax may choose, for the sake of
227 readability, to specify a full-date and full-time separated by
228 (say) a space character.
230 This way we keep the information specified by ISO 8601 but make it more
231 human readable which is better for the console output.
233 * Update version year
237 * Fix TTY device listing on Darwin. (#136)
239 * Fix TCGETS2 search on Darwin.
243 Changes since tio v1.32:
245 * Show auto connect status in show configuration
247 * Use '#pragma once' in all headers
249 * Improve printed output
251 Get rid of inconsistencies in the printed output (error printing,
254 Prepare for user configurable color.
256 * Rename option -i to -L
260 * Shorten timestamp description
262 We do not need the date part of the timestamp. It simply takes up too
263 much precious line space. In case of logging to file, one can easily
264 conclude the date from the file date information.
266 * Replace Travis with circleCI
268 * Replace autotools with meson
270 To introduce much simpler build configuration which is also easier to
273 * Add list serial devices feature
275 For convenience, add a --list-devices option which lists the available
278 * Cleanup: Use dot notation for default options struct
282 * Add command to show version
284 The key sequence ctrl-t v will now show the version of tio.
286 * Align format of timestamps
288 * Add Sylvain as official co-maintainer
292 * Add '-t' option description for time stamping.
294 * Add description for time stamping.
296 * Resolved tio/tio#84: Added timestamps in log file if enabled.
300 * Refine timestamps with milliseconds and ISO-8601 format (#129).
302 * Show milliseconds too in the timestamp (#114) and log file (#124)
303 * Change timestamp format to ISO-8601.
307 * Output newline on stdout with hex print mode
309 This is to fix the issue #104. The timestamp will always be
310 printed at the beginning of line:
312 [10:25:56] Switched to hexadecimal mode
313 0d 0a 0d [10:25:57] 41 43 52 4e 3a 5c 3e 0d 0a 0d [10:25:58] 41
317 [12:34:56] 45 72 72 6f 72 3a 20 49 6e 76 61 6c 69 64 20
318 [12:34:56] 41 43 52 4e 3a 5c 3e
319 [12:34:56] 41 43 52 4e 3a 5c 3e
320 [12:34:57] 41 43 52 4e 3a 5c 3e 6c 73
324 * Make comparison POSIX compliant
326 String comparison with == is not POSIX compliant and can fail with e.g.
329 Henrik Brix Andersen:
331 * Add bash completion of tty devices.
333 * Add -t/--timestamp to bash completion script.
337 * Local echo: show character by character even if stdout buffered.
341 * Show error when failing to open a tty
345 * Fix out of tree builds
347 Out of tree builds are currently broken because $(top_srcdir)src/include
348 is not in the search path. In tree builds are working because autconf add
349 $(top_builddir)/src/include to the search path for the generated config.h.
350 As $(top_builddir) and $(top_srcdir) are identical during in tree builds
351 the search path still end up beeing somehow correct.
353 To fix this add -I$(srcdir)/include to the CPPFLAGS in Makefile.am.
357 * src/setspeed2.c: fix redefinition of termio
359 Include ioctls.h and termbits.h from asm-generic instead of asm to avoid
364 * Exit if output speed cannot be set.
366 Lars Kellogg-Stedman:
368 * fflush() after putchar() for print_hex and print_normal
370 In order for local echo to work properly, we have to either call
371 fflush(stdout) after every character or just disable line buffering.
372 This change calls fflush() after putchar().
374 * Disable line buffering in stdout
376 In order for local echo to work properly, we have to either call
377 fflush(stdout) after every character or just disable line buffering.
378 This change uses setbuf(stdout, NULL) to do the latter.
382 * dont show line state if ioctl failed
384 * add serial lines manual control
388 * Flush every local echo char
390 Flush stdout at every char in case it
391 happens to be buffered.
395 * Newline: handle booth NL and CR
397 Flag ONLCRNL expects code \n after press Enter, but on some systems \r is send instead.
401 Changes since tio v1.31:
405 * Minor code style cleanups
407 * Cleanup print macros
411 Make sure output is transmitted immediately by flushing the output.
415 * add optional timestamps
417 with "-t" or "C-t T", toggle a timestamp prefix to each line.
425 * Added macOS compatibility
427 * Made O_NONBLOCK flag to open() call specific to macOS only.
429 * Added macOS-related details.
431 * Added O_NONBLOCK flag to open() call for macOS (10.13.6) compatibility.
435 Changes since tio v1.30:
443 * Clarify the input/output variable names (No-op change)
445 * Organize options the same sequence they are mentioned in cmdline help.
449 * Map CR->NL locally on output instead of using tio.c_oflag |= OCRNL.
451 This mostly is intended to have local echo output exactly what is sent
452 to the remote endpoint.
453 A nice side-effect is, that it also fixes tty-implementations, that can't
454 deal with the OCRNL flag on tio.c_oflag.
456 * Provide local-echo option.
458 Can be switched on with -e on the command line.
459 Can be toggled with Ctrl t e while program is running.
461 * Write to logfile as soon as we have the data, don't buffer.
463 Logfiles are important to see what happened, in particular if something
464 unexpected happened; so we want to make sure that the logfile is flushed
467 Before this change, the logfile was typically written at the end in
468 a large chunk as the default (large) buffering applied. Now, characters are
469 written out ASAP, so it is possible to get a live-view with a
474 Changes since tio v1.29:
478 * Update man page and bash completion
484 * ONLCRNL: change the method to map NL to CR-NL
488 Changes since tio v1.28:
490 * Add mapping flags INLCRNL and ODELBS
492 The following new mapping flags are added:
494 INLCRNL: Map NL to CR-NL on input.
495 ODELBS: Map DEL to BS on output.
497 Flags requested and tested by Jan Ciger (janoc).
501 Changes since tio v1.27:
507 * Add snap status to README.md
509 * Add README.md to prettify GitHub page
515 * Add missing header file under musl-libc
517 Musl's inclusion tree slightly differs from glibc, therefore TCGETS2 is
518 not reachable through sys/ioctl.h, so asm/ioctls.h needs to be included
523 * Fix grammar and typos
527 Changes since tio v1.26:
531 * Add support for setting non-standard baudrates
533 Support for non-standard baudrate settings will be automatically enabled
534 if the termios2 interface is detected available. However, to play it
535 safe, the old and widely supported termios interface will still be used
536 when setting standard baudrates.
544 Changes since tio v1.25:
548 Make stdin behave more raw'ish. In particular, don't
549 translate CR -> NL on input.
551 * Add special character map feature
553 Add a --map option which allows mapping special characters, in particular CR and
554 NL characters which are used in various combinations on various platforms.
568 Changes since tio v1.24:
570 * Fix error applying new stdout settings
572 On Fedora 26 tio will quit with the following error message:
574 "Error: Could not apply new stdout settings (Invalid argument)"
576 In case of Fedora, it turns out that the new stdout settings used are a
577 bit too aggressive because an empty termios structure is used. To remedy
578 this we reuse the existing stdout settings and only reconfigure the
579 specific options we need to make a "raw" stdout configuration.
581 * Remove unused pkgconfig in configure
585 Remove unused variable.
589 Changes since tio v1.23:
591 * Optimize clear screen command
593 Replaced system call with inline ANSI/VT100 clear screen code sequence
595 * Fix bash completion installation
597 Fixed the configure script to avoid that the bash completion script gets
598 installed outside of the prefix location. The default install location
599 is now $prefix/share/bash-completion/completions.
601 Use the configure option '--with-bash-completion-dir=PATH' if you need
602 to install the bash completion script elsewhere.
606 * Add missing commas in conditional sentences
610 Changes since tio v1.22:
612 * Update copyright headers
620 Changes since tio v1.21:
622 * Update man page date
624 * Update copyright year
628 * Update README and man page
632 Changes since tio v1.20:
634 * Add support for hexadecimal mode
636 A new key command 'ctrl-t h' is introduced which toggles between
637 hexadecimal mode and normal mode. When in hexadecimal mode data received
638 will be printed in hexadecimal.
640 * Do not distribute src/bash_completion/tio
642 Since the bash completion tio script is now autogenerated from tio.in it
643 should not be distributed in the tarball.
645 * Add missing forward flag
647 * Update AUTHORS file
651 * 'ctrl-t b' to send serial break.
655 * Removed git commit references from ChangeLog
657 ChangeLog is primary useful for users who don't have the git repository
660 Replace git commit references with version numbers; or if the change
661 only cleans up another change with no release in between, remove the
662 changelog item completely.
666 Changes since tio v1.19:
668 * Added more error handling of terminal calls
670 Also removed duplicate terminal flushing calls.
672 * Revert "Added support for non-standard baud rates"
674 This reverts a change made in v1.18.
676 Reverting because supporting non-standard or arbitrary baud rates is
677 troublesome because the c library provides no means of doing so and even
678 if bare metal linux kernel interface is used it will not work on all
679 Linux kernels version.
683 Changes since tio v1.18:
685 * Rearranged key commands
687 Rearranged the key commands:
689 ctrl-t c (clear screen) is now
690 ctrl-t l which is similar to the well known shell ctrl-l
692 ctrl-t i (show settings information) is now
693 ctrl-t c (show configuration)
695 Updated man page accordingly.
697 * Added "ctrl-t c" key command to clear screen
701 Changes since tio v1.17:
705 * Added support for non-standard baud rates
707 Only enabled when possible, that is, when the BOTHER definition is
710 It is untested but it should work as described here:
711 https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=683826
713 Some Cypress USB<->serial devices supposedly supports arbitrary speeds.
715 * Generate baudrate switch cases based on detection
717 Support a single source of baud rate configuration as discussed in
718 https://github.com/tio/tio/issues/45 .
720 To do so, autogeneration of the switch cases which do the baud rate
721 option value check and configuration/conversion in tty_configure() is
722 introduced via a single macro.
724 Just to be safe, this change also enables configure detection of all
725 baud rates, including the ones previously assumed supported by most/all
730 * Exit when not a tty device in autoconnect mode
734 * Added non-standard baud rates that are defined on FreeBSD
736 * Capitalized "GitHub" in README
740 Changes since tio v1.16:
742 * Compacted tty_configure() a bit
744 * Fixed automatic baud rate enablement
748 * Added autodetection of available baud rates
750 Various platforms support different baud rates.
752 To avoid adding platform specific handling generic baud rate detection
753 tests are introduced in the configure script. Successfully detected baud
754 rates are automatically enabled. This applies to both the C code and the
755 bash completion script.
758 Baud rates below 57600 are defined by POSIX-1 and supported by most
759 platforms so only baud rate 57600 and above are tested.
761 * Updated bash-completion
763 * Fixed printf() format type
765 * Added Travis build configuration
769 * Generated bash completion at configure time
771 * Reduce code duplication in baud rate detection
773 * Add support for baud rates 200 and 1800
775 * Fixed baudrate type
779 Changes since tio v1.15:
785 * Removed obsolete packaging files
787 * Removed use of deprecated bzero()
791 Changes since tio v1.14:
793 * Removed + to remove potential confusion
795 * Added input digit checks
797 * Fixed license string
799 * Introduced tty_configure()
801 Moved tty configuration actions to tty_configure() in tty.c. This way
802 options.c is strictly about parsing options nothing else.
804 * Function names cleanup
806 * Updated AUTHORS file
808 Added Nick who created the new tio package for Arch Linux.
810 * Fixed tx/rx counters type
814 * Include config.h before standard headers
816 Large file support was meant to be enabled in v1.11.
817 This change enables it for real.
821 Changes since tio v1.13:
823 * Fixed tio_printf macro
827 Fixed launch hints not being printed in no autoconnect mode.
829 * Added 'ctrl-t ?' to list available commands
831 * Fixed log mechanism
833 To avoid echoing only log what is received from tty device.
835 * Improved tio output
837 Added titles and indentation to commands output for clearer separation
838 when firing commands repeatedly.
840 Also added print of tio version and quit command hint at launch.
842 * Cleaned up tio print mechanism
848 "allow" is a transitive verb, which requires an object,
849 so "allow to <verb>" is ungrammatical.
855 Changes since tio v1.12:
857 * Fixed some error prints
859 * Fixed error printing for no autoconnect mode
861 Always print errors but only print silent errors when in no autoconnect
864 * Added key command for showing session settings
866 A new key command "ctrl-t i" is added to allow the user to display the
867 various session settings information (baudrate, databits, log file, etc.).
869 This is useful in case you have a running session but have forgotten
870 what the settings are.
874 Changes since tio v1.11:
876 * Consolidated command key handling
878 * Moved delay mechanism into separate function
880 * Retired obsolete usleep()
882 Replaced with nanosleep()
884 * Added simple tx/rx statistics command (ctrl-t s)
886 To display the total number of bytes transmitted/received simply perform the
887 'ctrl-t s' command sequence.
889 This feature can be useful when eg. trying to detect non-printable
892 * Further simplification of key handling
894 Changed so that the "ctrl-t ctrl-t" sequence is now simply "ctrl-t t" to
895 send the ctrl-t key code. This is inspired by screen which does similar
896 to send its command key code (ctrl-a a).
898 This change also eases adding new key commands if needed.
900 Updated man page accordingly.
902 * Cleaned up and simplified key handling
906 * Insert output delay only if something was output
910 Changes since tio v1.10:
912 * Enabled large file support (LFS)
914 Added autotools AC_SYS_LARGEFILE to support 64 bit file size handling.
920 Changes since tio v1.9:
922 * Introduced lock on device file
924 Tio will now test for and obtain an advisory lock on the tty device file
925 to prevent starting multiple sessions on the same tty device.
931 * Treat EOF on stdin as error
935 Changes since tio v1.8:
937 * Cleanup of error handling
939 Introduced consistent way of handling errors and printing error messages.
941 Also upgraded some warnings to errors.
943 * Updated localtime() error message
949 * Fix error handling for select()
951 Previously the error handling code for select() was unreachable.
953 * Removed unneeded quotes from AM_CFLAGS
957 * Fixed setting "tainted"
959 Set "tainted" if and only if any character was read from the device.
961 Ctrl-t is no longer sent to the device on exit, so the trick to avoid
962 its echo is not necessary.
964 Characters read from stdin don't directly affect output, so they
965 shouldn't enable "tainted".
967 * Used \r in color_printf()
969 \033[300D is an unusual way to move the cursor back to column 1.
970 Use straightforward \r instead.
972 * Added missing \r\n to warning messages
974 \n alone is not enough, because the terminal is in raw mode.
978 Changes since tio v1.7:
980 * Fixed enablement of compiler warnings
982 * Fixed log_open() prototype
984 * Fixed index error wrt ctrl-t detection
986 * Fixed handling of ctrl-t
988 Before, when exercising the quit key sequence (ctrl-t + q) the ctrl-t code
989 (0x14) would be sent.
991 This is now fixed so that it is not sent.
993 However, in case it is needed to send ctrl-t to the device it is possible by
994 simply repeating the ctrl-t.
996 Meaning, ctrl-t + ctrl-t = ctrl-t sent to device.
998 * Improved error handling
1000 Fixes a memory leak and avoids aggressive busy looping when problems
1001 accessing tty device.
1003 * Removed redundant log_close() call
1005 * Enabled compiler warnings
1009 * Stopped copying arguments to fixed-size buffers
1011 Don't needlessly copy command-line arguments into fixed-size buffers.
1013 Previously the program crashed if an overlong pathname was provided on
1014 the command line. Also, some systems (such as GNU Hurd) don't define
1017 * Added const to log_open() prototype
1019 * Completed the ^g to ^t transition
1021 In v1.7 the escape key was changed from ^g to ^t, but some
1022 code and comments still referred to the old key.
1024 * Used HTTPS for tio.github.io
1026 * Man page beautification
1028 * Bumped date in man page
1030 * Improve man page formatting
1032 Use regular font for metacharacters such as "[]", "," or "|";
1033 use italic font for metavariables.
1035 * Fixed hyphen vs minus vs em-dash confusion in man page
1038 \- prints as minus sign;
1039 \em prints as em-dash.
1043 Changes since tio v1.6:
1045 * Changed escape key from ^g to ^t
1047 After renaming to "tio" it makes sense to change the escape key
1048 accordingly. Hence, the new escape key is ^t.
1050 Meaning, in session, its now ctrl-t + q to quit.
1054 * Fixed silly "tio or tio" in man page