]> git.sur5r.net Git - tio/blob - NEWS
Upload 2.7-1 to unstable
[tio] / NEWS
1
2 === tio v2.7 ===
3
4
5
6 Changes since tio v2.6:
7
8 Paul Ruizendaal:
9
10  * Add xmodem and ymodem file send support
11
12 HiFiPhile:
13
14  * tty_stdin_input_thread(): write to pipe only if byte_count > 0.
15
16  * Ignore EINTR error.
17
18  * CYGWIN: Add support for "COM*" naming.
19
20 Wes Koerber:
21
22  * chore: reorder log-strip and log-append
23
24    reorder to maintain consistency with documentation
25
26  * chore: update readme, bash completion, man page
27
28  * fix: support --log-append in cli options
29
30
31
32 Changes since tio v2.5:
33
34  * Remove warning when using pattern option
35
36  * Add --log-append option
37
38    Add --log-append option which makes tio append to any existing log file.
39
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
42    to make tio append.
43
44  * Update man page
45
46  * Update README
47
48  * Fix line termination for response wait feature
49
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.
55
56    This should work for all devices as lines are AFAIK always terminated
57    with either CRNL or a NL.
58
59  * Update tty device listing configuration
60
61    Cleanup and add FreeBSD tty device listing support.
62
63 Braden Young:
64
65  * Move map variables to tty to keep them all in one spot
66
67  * Configure socket mapping flags from tty parsing logic. Remove duplicate parsing logic in socket
68
69  * Support input mapping modes for sockets
70
71 Josh Soref:
72
73  * Various spelling fixes
74
75 Peter van Dijk:
76
77  * avoid "warning: unused parameter" on setspeed stub
78
79  * use right /dev/ path on Haiku
80
81 Bill Hass:
82
83  * Update README with details on snap confinement
84
85
86
87 Changes since tio v2.4:
88
89  * Update configuration file documentation
90
91    Rename .tiorc to .tioconfig, tiorc to config, etc.
92
93  * Add support for $HOME/.tioconfig
94
95     Replaces what used to be $HOME/.tiorc
96
97  * Fix double prefix key regression
98
99 Vyacheslav Patkov:
100
101  * Better error checking in config file, rename the file
102
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.
106
107    Check getenv() return value for NULL.
108
109    Rename "tiorc" to "config", as it's a static INI file, not an executable
110    "run commands".
111
112
113
114 Changes since tio v2.3:
115
116  * Add threaded input handling
117
118    To make tio more responsive to quit and I/O flush key command when main I/O
119    thread is blocked on output.
120
121  * Fix so that is it possible to quit tio in tio etc.
122
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
125    (quitting etc.).
126
127  * Add key command to toggle log on/off
128
129     Add key command 'ctrl-t f' which will toggle log on/off.
130
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.
135
136     However, if a log filename has been specified, tio will only write and
137     append to that same file.
138
139
140
141 Changes since tio v2.2:
142
143  * Add mute feature
144
145    This will make tio go fully silent and not print anything.
146
147  * Rename config variable 'tty' to 'device'
148
149  * Deprecate tty config keyword but keep it around for now
150
151  * Update show config
152
153  * Update example tiorc
154
155
156
157 Changes since tio v2.1:
158
159  * Add shell completion of sub-configuration names
160
161    Does not work with sub configuration names that contains one or more
162    white spaces.
163
164  * Beautify help
165
166  * Fix error message
167
168  * Simplify configfile implementation
169
170
171
172 Changes since tio v2.0:
173
174  * Fix output line delay
175
176    Apply output line delay on lines ending with \n.
177
178    On most systems lines ends with \n or \r\n.
179
180  * Do not print timestamps in hex mode
181
182  * Improve input mechanism in hex mode
183
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.
188
189  * Add support for sending prefix character to serial device
190
191    Do so by inputting prefix key twice, e.g. input ctrl-t ctrl-t to send
192    ctrl-t character to serial device.
193
194  * Clean up indentation
195
196  * Update example tiorc
197
198 Attila Veghelyi:
199
200  * Add bit reverse order feature
201
202
203
204 Changes since tio v1.47:
205
206  * Handle stale unix socket file
207
208    Delete existing unix socket file if it is tested to be stale, meaning no
209    one is listening on it.
210
211  * Add visual or audible alert support on connect/disconnect
212
213    The feature is detailed via the following option:
214
215     --alert none|bell|blink
216
217       Set alert action on connect/disconnect.
218
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.
221
222       Default value is "none" for no alert.
223
224  * Add experimental RS-485 support
225
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
230    level.
231
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.
235
236    The RS-485 feature is detailed via the following options:
237
238     --rs-485                           Enable RS-485 mode
239     --rs-485-config <config>           Set RS-485 configuration
240
241    Set the RS-485 configuration using the following key or key value pair
242    format in the configuration field:
243
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
249
250    If defining more than one key or key value pair, they must be comma
251    separated.
252
253    Example use:
254
255      $ tio /dev/ttyUSB0 --rs-485 --rs-r485-config=RTS_DELAY_AFTER_SEND=50,RX_DURING_TX
256
257  * Add line response feature
258
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
261    response.
262
263    This is a convenience feature for simple request/response interaction
264    based on lines. For more advanced interaction the socket feature should
265    be used instead.
266
267    The line response feature is detailed via the following options:
268
269     -r, --response-wait
270
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.
274
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.
277
278     --response-timeout <ms>
279
280    Set timeout [ms] of line response (default: 100).
281
282    Example:
283
284    Sending a string (SCPI command) to a test instrument (Korad PSU) and
285    print line response:
286
287     $ echo "*IDN?" | tio /dev/ttyACM0 --response-wait
288     KORAD KD3305P V4.2 SN:32477045
289
290  * Fix potential sscanf() overflow
291
292  * Only print version on '--version'
293
294  * Remove duplicate show config entry of DTR pulse duration
295
296  * Remove MacPorts instructions
297
298    Remove instructions for MacPorts because the port has no maintainer and
299    the port build definition is broken (missing dependency on libinih etc.).
300
301    It is recommended to use brew instead.
302
303 Peter Collingbourne:
304
305  * Ignore SIGPIPE signals
306
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
312    the socket.
313
314
315
316 Changes since tio v1.46:
317
318  * Enable log feature when using --log-filename
319
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
322    enable log.
323
324  * Enable line buffering of log
325
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.
329
330  * Avoid invalid hex character messages when switching hex mode
331
332  * Force flushing of log writes
333
334  * Renamed tty_flush() to tty_sync()
335
336  * Fix sync output to serial port
337
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.
341
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
344    cancelled / flushed.
345
346  * Clean up tty_flush()
347
348  * Force frequent sync on tty_flush()
349
350  * Update README
351
352  * Update example tiorc
353
354  * Quit from non-interactive mode using ctrl-c
355
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.
359
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.
362
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.
365
366  * Make sure we flush output buffer to tty when piping to tio
367
368  * Do not return false read error when piping to tio
369
370  * Show error message when reading port settings fail
371
372 Victor Oliveira
373
374  * add macports install instructions
375
376
377
378 Changes since tio v1.45:
379
380  * Rework toggle and pulse feature to support all lines
381
382    Replace existing toggle and pulse key commands with the following
383    generalized key commands which allows to toggle or pulse all serial port
384    lines:
385
386     ctrl-t g   Toggle serial port line
387     ctrl-t p   Pulse serial port line
388
389    When used, user will be asked which serial line to toggle or pulse.
390
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.
395
396    Example:
397
398     $ tio /dev/ttyUSB0 --line-pulse-duration DTR=200,RTS=300,RI=50
399     
400    Likewise, the pulse duration can also be set via configuration file
401    using the line-pulse-duration variable:
402     
403     line-pulse-duration = DTR=200,RTS=300,RI=50
404
405  * Upgrade inih wrap to r56
406
407  * Optimization
408
409  * Add example configuration file
410
411
412 Ralph Siemsen:
413
414  * Fix relative timestamps
415
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
421    localtime().
422
423
424
425 Changes since tio v1.44:
426
427  * Introduce bold color option
428
429    Introduce "bold" color option which only apply bold color formatting to
430    existing system color.
431
432    Also make "bold" the default color option.
433
434    Fixes all white issue with black on white tio text.
435
436  * Update README
437
438  * Change 'ctrl-t T' to 'ctrl-t t' for timestamp toggle
439
440  * Add support for remapping prefix key
441
442    Make it possible to remap the prefix key (default: ctrl-t) by setting
443    the prefix-ctrl-key variable in the configuration file.
444
445    Allowed values are in the range a..z.
446
447    Example, to set the prefix key to ctrl-a simply do:
448
449    prefix-ctrl-key = a
450
451  * Add plaintext man page
452
453 Rui Chen:
454
455  * docs: add homebrew installation note
456
457  * fix macOS build
458
459  * fix compilation error
460
461
462
463 Changes since tio v1.43:
464
465  * Simplify arbitrary baudrate code
466
467  * Cleanup error printing routines
468
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().
472
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
475    session.
476
477  * Update README
478
479  * Clean up man page
480
481  * Add support for space parity
482
483  * Rename EOL delay to Output line delay
484
485  * Replace -U,--upcase with mapping flag OLTU
486
487  * Simplify tty_write()
488
489 Robert Snell:
490
491  * Additional commands: EOL delay, lower to upper translation, added mark parity
492
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
496
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.
503
504
505
506 Changes since tio v1.42:
507
508  * Add '24hour-delta' timestamp option
509
510    When enabled this option will timestamp new lines with the time elapsed
511    since the line before.
512
513    This is a very useful feature to identify which events takes the most
514    time.
515
516  * Improve description of socket option
517
518  * Rename ChangeLog to NEWS
519
520  * Update README
521
522  * Update man page
523
524 George Joseph:
525
526  * Add Pulse DTR command
527
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.
532
533    * Added new command "D" to pulse the DTR line.  I.E.  Toggle its
534      state twice with a configurable duration between toggles.
535
536    * Added new config/command line option "--dtr-pulse-duration"
537      to set the duration between the DTR state toggles.  The default
538      is 100ms.
539
540
541
542 Changes since tio v1.41:
543
544  * Update man page
545
546 ZeroMemoryEx:
547
548  * Handle malloc failure
549
550 Sylvain LAFRASSE:
551
552  * Add missing 'string.h' include.
553
554
555
556 Changes since tio v1.40:
557
558  * Rename --hex-mode to --hexadecimal
559
560  * Enable buffered writing
561
562    Read block of bytes from input and process same block for output.  This
563    will speed things up by reducing I/O overhead.
564
565  * Enable buffered reading
566
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.
569
570  * Refactoring
571
572  * Cleanup stdout flushing
573
574    Flushing is not needed since we disabled buffering of stdout.
575
576  * Simplify stdout_configure() code
577
578  * Simplify stdin_configure() code
579
580  * Update man page
581
582  * Update README
583
584
585
586 Changes since tio v1.39:
587
588  * Add config support for log-strip
589
590  * Add config support for hex-mode
591
592  * Rename --hex to --hex-mode
593
594  * Fix completion for -e, --local-echo
595
596  * Ignore newlines in hex output
597
598  * Fix newline in warning_printf()
599
600  * Fix ansi_printf_raw() in no color mode
601
602  * Enter non-interactive mode when piping to tio
603
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
606    device.
607
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.
611
612    Example use:
613
614    $ cat commands.txt | tio /dev/ttyUSB0
615
616  * Also strip backspace from log
617
618    To make log strip feature consistent so that we remove all unprintable
619    control characters and escape sequences.
620
621  * Socket code cleanup
622
623  * Cleanup man page
624
625  * Rename --log-filename to --log-file
626
627 Yin Fengwei:
628
629  * Allow strip escape sequence characters from log file
630
631    The log without escape key stripped is like:
632
633     ^M[12:47:17] ACRN:\>
634     ^M[12:47:17] ACRN:\>lasdfjklsdjf
635     ^M
636     ^M[12:47:18] Error: Invalid command.
637     ^M[12:47:19] ACRN:\>
638     ^M[12:47:26] ACRN:\>
639     ^M[12:47:26] ACRN:\>sdafkljsdkaljfklsadjflksdjafjsda^H ^H^H...
640     ^M
641     ^M[12:47:31] Error: Invalid command.
642
643    After strip escape key, the log is like:
644
645     [12:49:18] ACRN:\>
646     [12:49:19] ACRN:\>
647     [12:49:19] ACRN:\>ls
648
649     [12:49:19] Error: Invalid command.
650     [12:49:19] ACRN:\>
651     [12:49:19] ACRN:\>dfaslhj
652
653     [12:49:24] Error: Invalid command.
654
655    Beside escape key, it also handle backspace key as well.
656
657
658
659 Changes since tio v1.38:
660
661  * Improve key command response for local echo and timestamp
662
663  * Fix invalid hex character error message
664
665  * Make sure only matched config section is parsed
666
667  * Add support for "disable" keyword in config file
668
669  * Unify error message formating
670
671  * Cleanup list devices code
672
673  * Fix command-line tty-device|config parsing
674
675    Allow user to add options on both sides of the provided config argument.
676
677    For example:
678
679     $ tio -b 9600 am64-evm -e
680
681    Before, tio only allowed adding arguments after the config argument.
682
683    Implemented as simple as possible by introducing two stage option parsing.
684
685  * Update bash completion
686
687  * Add support for IPv4 and IPv6 network sockets
688
689    Add support for IPv4 and IPv6 network sockets via socket syntax
690    "inet:<port>" and "inet6:<port>" respectively.
691
692    For example, to listen and redirect serial device I/O to a host bound
693    IPv4 socket simply do:
694
695     $ tio /dev/ttyUSB0 --socket inet:4444
696
697    To connect do e.g.:
698
699     $ nc 127.0.0.1 4444
700
701    Likewise, for IPv6 do:
702
703     $ tio /dev/ttyUSB0 --socket inet6:4444
704
705    To connect do e.g.:
706
707     $ nc ::1 4444
708
709    If port is 0 or no port is provided default port 3333 is used.
710
711  * Fix tio deleting unix socket file
712
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.
716
717  * Rework color option
718
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.
722
723    Also, disables color when piping.
724
725  * Remove print of hex mode status at startup
726
727  * Remove newline option in hex mode
728
729  * Fix configfile memory leaks
730
731  * Remove command-line option inconsistencies
732
733    Optional arguments, as parsed by the getopt_long mechanism, are
734    inherently inconsistent with how you define required arguments.
735
736    To avoid confusion we decide to avoid this inconsistency by replacing
737    optional options with additional options with required arguments.
738
739  * Replace '1' with 'enable' in config files
740
741  * Convert errors to warnings
742
743 g0mb4:
744
745  * Extended hexadecimal mode.
746
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).
749
750    Added option -x, --hex to start in hexadecimal mode.
751
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
755    context.
756
757
758
759 Changes since tio v1.37:
760
761  * Redirect error messages to stderr
762
763  * Improve help and man page
764
765  * Mention config file in --help
766
767  * Fix running without config file
768
769  * Fix config file error messages
770
771  * Redirect error messages to stderr
772
773  * Add repology packaging status
774
775  * Fix parsing of default settings
776
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
779    always parsed.
780
781  * Append to existing log file (no truncation)
782
783  * Add socket info to show configuration
784
785  * Print socket info at startup
786
787  * Fix socket option parsing
788
789 Peter Collingbourne:
790
791  * Match user input against config section names if pattern matching was unsuccessful.
792
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.
796
797  * Add support for external control via a Unix domain socket.
798
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
808    program.
809
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.
814
815    Sockets remain open while the serial port is disconnected, and writes
816    will block.
817
818    Example usage 1 (issue a command):
819
820      echo command | nc -UN /path/to/socket > /dev/null
821
822    Example usage 2 (use the expect command to script an interaction):
823
824      #!/usr/bin/expect -f
825
826      set timeout -1
827      log_user 0
828
829      spawn nc -UN /path/to/socket
830      set uart $spawn_id
831
832      send -i $uart "command1\n"
833      expect -i $uart "prompt> "
834      send -i $uart "command2\n"
835      expect -i $uart "prompt> "
836
837 lexaone:
838
839  * fix for using option 'log' without 'log-filename' in config file
840
841
842
843 Changes since tio v1.36:
844
845  * Make libinih a fallback dependency
846
847    This means that in case meson does not find libinih it will
848    automatically clone libinih and include it in the build.
849
850    The libinih library is reconfigured to be statically built so that no
851    shared object will be installed.
852
853 Sylvain LAFRASSE:
854
855  * Fix timestamp parsing in INI conf
856
857  * Factorize timestamp parsing to be coherent with command line format in configuration file.
858
859
860
861 Changes since tio v1.35:
862
863  * Add support for defaults in config file
864
865    If no section name is specified the configuration will be considered the
866    default one.
867
868    This allows to set e.g. a default color code for sections which do not
869    configure a color code.
870
871  * Handle SIGHUP
872
873    Handle SIGHUP so that the registered exit handlers are called to restore
874    the terminal back to its orignal state.
875
876  * Add color configuration support
877
878  * Bypass unused result warnings
879
880  * Force dependency on libinih
881
882    Configuration file support is considered a mandatory feature.
883
884  * Update headers
885
886  * Update AUTHORS
887
888  * Update man page
889
890  * Move string_to_long() to misc.c
891
892  * Update CircleCI config
893
894  * Update tio gif
895
896  * Update README
897
898  * Update LICENSE date
899
900  * Remove redundant COPYING file
901
902 Liam Beguin:
903
904  * Document configuration file options
905
906  * Add support for a configuration file
907
908  * misc: add _unused macro
909
910    Some parameters are expected to be unused.
911    Add a basic macro to mute these compiler warnings.
912
913  * options: expose string_to_long()
914
915    Expose string_to_long() so that other source files can use it.
916
917
918
919 Changes since tio v1.34:
920
921  * Add support for automatically generated log filename
922
923    Automatically generate log filename if none is provided.
924
925    The auto generated file name is on the form:
926    "tio_DEVICE_YYYY-MM-DDTHH:MM:SS.log"
927
928  * Add support for configurable timestamp format
929
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.
932
933    And reintroduces strict but optional ISO8601 format.
934
935    This feature allows to easily add more timestamp formats in the future.
936
937  * Reintroduce asm-generic/ioctls.h
938
939    It is needed for ppc builds.
940
941  * Add macro hack to workaround older buggy glibc
942
943 Robey Pointer:
944
945  * Add support for high bps on OS X
946
947
948
949 Changes since tio v1.33:
950
951  * Fix setspeed2 compilation
952
953  * Only apply color formatting when using color option
954
955    To help the color blind who may use custom terminal foreground /
956    background colors.
957
958  * Update README
959
960  * Add '-c, --color' option
961
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
964    0..255.
965
966    If color code is negative tio will print all available ANSI colors.
967
968    The default color is changed to bold white to make tio defaults usable
969    for most users, including color blind users.
970
971  * Fix setspeed2 check
972
973  * Fix meson header check string
974
975  * Reintroduce long timestamp format
976
977    But make the timestamp format RFC3339 compliant instead. The RFC states:
978
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.
983
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.
986
987  * Update version year
988
989 Sylvain LAFRASSE:
990
991  * Fix TTY device listing on Darwin. (#136)
992
993  * Fix TCGETS2 search on Darwin.
994
995
996
997 Changes since tio v1.32:
998
999  * Show auto connect status in show configuration
1000
1001  * Use '#pragma once' in all headers
1002
1003  * Improve printed output
1004
1005    Get rid of inconsistencies in the printed output (error printing,
1006    colors, etc.).
1007
1008    Prepare for user configurable color.
1009
1010  * Rename option -i to -L
1011
1012  * Shorten timestamp
1013
1014  * Shorten timestamp description
1015
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.
1019
1020  * Replace Travis with circleCI
1021
1022  * Replace autotools with meson
1023
1024    To introduce much simpler build configuration which is also easier to
1025    maintain.
1026
1027  * Add list serial devices feature
1028
1029    For convenience, add a --list-devices option which lists the available
1030    serial devices.
1031
1032  * Cleanup: Use dot notation for default options struct
1033
1034  * Update AUTHORS
1035
1036  * Add command to show version
1037
1038    The key sequence ctrl-t v will now show the version of tio.
1039
1040  * Align format of timestamps
1041  
1042  * Add Sylvain as official co-maintainer
1043
1044 Sylvain LAFRASSE:
1045
1046  * Add '-t' option description for time stamping.
1047
1048  * Add description for time stamping.
1049
1050  * Resolved tio/tio#84: Added timestamps in log file if enabled.
1051
1052 attila-v:
1053
1054  * Refine timestamps with milliseconds and ISO-8601 format (#129).
1055
1056    * Show milliseconds too in the timestamp (#114) and log file (#124)
1057    * Change timestamp format to ISO-8601.
1058
1059 Yin Fengwei:
1060
1061  * Output newline on stdout with hex print mode
1062
1063    This is to fix the issue #104. The timestamp will always be
1064    printed at the beginning of line:
1065
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
1068
1069    is changed to:
1070
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
1075
1076 Jakob Haufe:
1077
1078  * Make comparison POSIX compliant
1079
1080    String comparison with == is not POSIX compliant and can fail with e.g.
1081    dash.
1082
1083 Henrik Brix Andersen:
1084
1085  * Add bash completion of tty devices.
1086
1087  * Add -t/--timestamp to bash completion script.
1088
1089 Henner Zeller:
1090
1091  * Local echo: show character by character even if stdout buffered.
1092
1093 Björn Stenberg:
1094
1095  * Show error when failing to open a tty
1096
1097 Alban Bedel:
1098
1099  * Fix out of tree builds
1100
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.
1106
1107    To fix this add -I$(srcdir)/include to the CPPFLAGS in Makefile.am.
1108
1109 Fabrice Fontaine:
1110
1111  * src/setspeed2.c: fix redefinition of termio
1112
1113    Include ioctls.h and termbits.h from asm-generic instead of asm to avoid
1114    build failures.
1115
1116 Erik Moqvist
1117
1118  * Exit if output speed cannot be set.
1119
1120 Lars Kellogg-Stedman:
1121
1122  * fflush() after putchar() for print_hex and print_normal
1123
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().
1127
1128  * Disable line buffering in stdout
1129
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.
1133
1134 George Stark:
1135
1136  * dont show line state if ioctl failed
1137
1138  * add serial lines manual control
1139
1140 arichi:
1141
1142  * Flush every local echo char
1143
1144    Flush stdout at every char in case it
1145    happens to be buffered.
1146
1147 Mariusz Midor:
1148
1149  * Newline: handle booth NL and CR
1150
1151    Flag ONLCRNL expects code \n after press Enter, but on some systems \r is send instead.
1152
1153
1154
1155 Changes since tio v1.31:
1156
1157  * Update AUTHORS
1158
1159  * Minor code style cleanups
1160
1161  * Cleanup print macros
1162
1163  * Flush output
1164
1165    Make sure output is transmitted immediately by flushing the output.
1166
1167 Robey Pointer:
1168
1169  * add optional timestamps
1170
1171    with "-t" or "C-t T", toggle a timestamp prefix to each line.
1172
1173 Jakub Wilk:
1174
1175  * Fix typos
1176
1177 Sylvain Lafrasse:
1178
1179  * Added macOS compatibility
1180
1181  * Made O_NONBLOCK flag to open() call specific to macOS only.
1182
1183  * Added macOS-related details.
1184
1185  * Added O_NONBLOCK flag to open() call for macOS (10.13.6) compatibility.
1186
1187
1188
1189 Changes since tio v1.30:
1190
1191  * Update date
1192
1193  * Update AUTHORS
1194
1195 Henner Zeller:
1196
1197  * Clarify the input/output variable names (No-op change)
1198
1199  * Organize options the same sequence they are mentioned in cmdline help.
1200
1201  * Update README.
1202
1203  * Map CR->NL locally on output instead of using tio.c_oflag |= OCRNL.
1204
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.
1209
1210  * Provide local-echo option.
1211
1212    Can be switched on with -e on the command line.
1213    Can be toggled with Ctrl t e while program is running.
1214
1215  * Write to logfile as soon as we have the data, don't buffer.
1216
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
1219    to disk.
1220
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
1224    tail -f <logfile>
1225
1226
1227
1228 Changes since tio v1.29:
1229
1230  * Update README
1231
1232  * Update man page and bash completion
1233
1234  * Update AUTHORS
1235
1236 qianfan Zhao:
1237
1238  * ONLCRNL: change the method to map NL to CR-NL
1239
1240
1241
1242 Changes since tio v1.28:
1243
1244  * Add mapping flags INLCRNL and ODELBS
1245
1246    The following new mapping flags are added:
1247
1248    INLCRNL: Map NL to CR-NL on input.
1249    ODELBS: Map DEL to BS on output.
1250
1251    Flags requested and tested by Jan Ciger (janoc).
1252
1253
1254
1255 Changes since tio v1.27:
1256
1257  * Update README
1258
1259  * Update AUTHORS
1260
1261  * Add snap status to README.md
1262
1263  * Add README.md to prettify GitHub page
1264
1265  * Add missing header
1266
1267 Petr VanÄ›k:
1268
1269  * Add missing header file under musl-libc
1270
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
1273    too.
1274
1275 Jakub Wilk:
1276
1277  * Fix grammar and typos
1278
1279
1280
1281 Changes since tio v1.26:
1282
1283  * Update man page
1284
1285  * Add support for setting non-standard baudrates
1286
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.
1291
1292  * Cleanup
1293
1294  * Update AUTHORS
1295
1296
1297
1298 Changes since tio v1.25:
1299
1300  * Reconfigure stdin
1301
1302    Make stdin behave more raw'ish. In particular, don't
1303    translate CR -> NL on input.
1304
1305  * Add special character map feature
1306
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.
1309
1310  * Cleanup
1311
1312  * Update AUTHORS
1313
1314  * Update README
1315
1316  * Mention website
1317
1318  * Update man page
1319
1320
1321
1322 Changes since tio v1.24:
1323
1324  * Fix error applying new stdout settings
1325
1326    On Fedora 26 tio will quit with the following error message:
1327
1328    "Error: Could not apply new stdout settings (Invalid argument)"
1329
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.
1334
1335  * Remove unused pkgconfig in configure
1336
1337  * Code cleanup
1338
1339    Remove unused variable.
1340
1341
1342
1343 Changes since tio v1.23:
1344
1345  * Optimize clear screen command
1346
1347    Replaced system call with inline ANSI/VT100 clear screen code sequence
1348
1349  * Fix bash completion installation
1350
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.
1354
1355    Use the configure option '--with-bash-completion-dir=PATH' if you need
1356    to install the bash completion script elsewhere.
1357
1358 Jakub Wilk:
1359
1360  * Add missing commas in conditional sentences
1361
1362
1363
1364 Changes since tio v1.22:
1365
1366  * Update copyright headers
1367
1368 Jakub Wilk:
1369
1370  * Fix typos
1371
1372
1373
1374 Changes since tio v1.21:
1375
1376  * Update man page date
1377
1378  * Update copyright year
1379
1380  * Code cleanup
1381
1382  * Update README and man page
1383
1384
1385
1386 Changes since tio v1.20:
1387
1388  * Add support for hexadecimal mode
1389
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.
1393
1394  * Do not distribute src/bash_completion/tio
1395
1396    Since the bash completion tio script is now autogenerated from tio.in it
1397    should not be distributed in the tarball.
1398
1399  * Add missing forward flag
1400
1401  * Update AUTHORS file
1402
1403 Adam Borowski:
1404
1405  * 'ctrl-t b' to send serial break.
1406
1407 Jakub Wilk:
1408
1409  * Removed git commit references from ChangeLog
1410
1411    ChangeLog is primary useful for users who don't have the git repository
1412    at hand.
1413
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.
1417
1418
1419
1420 Changes since tio v1.19:
1421
1422  * Added more error handling of terminal calls
1423
1424    Also removed duplicate terminal flushing calls.
1425
1426  * Revert "Added support for non-standard baud rates"
1427
1428    This reverts a change made in v1.18.
1429
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.
1434
1435
1436
1437 Changes since tio v1.18:
1438
1439  * Rearranged key commands
1440
1441    Rearranged the key commands:
1442
1443    ctrl-t c (clear screen) is now
1444    ctrl-t l which is similar to the well known shell ctrl-l
1445
1446    ctrl-t i (show settings information) is now
1447    ctrl-t c (show configuration)
1448
1449    Updated man page accordingly.
1450
1451  * Added "ctrl-t c" key command to clear screen
1452
1453
1454
1455 Changes since tio v1.17:
1456
1457  * Updated man page
1458
1459  * Added support for non-standard baud rates
1460
1461    Only enabled when possible, that is, when the BOTHER definition is
1462    available.
1463
1464    It is untested but it should work as described here:
1465    https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=683826
1466
1467    Some Cypress USB<->serial devices supposedly supports arbitrary speeds.
1468
1469  * Generate baudrate switch cases based on detection
1470
1471    Support a single source of baud rate configuration as discussed in
1472    https://github.com/tio/tio/issues/45 .
1473
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.
1477
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
1480    systems (POSIX).
1481
1482  * Minor cleanup
1483
1484  * Exit when not a tty device in autoconnect mode
1485
1486 Jakub Wilk:
1487
1488  * Added non-standard baud rates that are defined on FreeBSD
1489
1490  * Capitalized "GitHub" in README
1491
1492
1493
1494 Changes since tio v1.16:
1495
1496  * Compacted tty_configure() a bit
1497
1498  * Fixed automatic baud rate enablement
1499
1500  * Minor cleanups
1501
1502  * Added autodetection of available baud rates
1503
1504    Various platforms support different baud rates.
1505
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.
1510
1511    Note:
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.
1514
1515  * Updated bash-completion
1516
1517  * Fixed printf() format type
1518
1519  * Added Travis build configuration
1520
1521 Jakub Wilk:
1522
1523  * Generated bash completion at configure time
1524
1525  * Reduce code duplication in baud rate detection
1526
1527  * Add support for baud rates 200 and 1800
1528
1529  * Fixed baudrate type
1530
1531
1532
1533 Changes since tio v1.15:
1534
1535  * Updated man page
1536
1537  * Updated README
1538
1539  * Removed obsolete packaging files
1540
1541  * Removed use of deprecated bzero()
1542
1543
1544
1545 Changes since tio v1.14:
1546
1547  * Removed + to remove potential confusion
1548
1549  * Added input digit checks
1550
1551  * Fixed license string
1552
1553  * Introduced tty_configure()
1554
1555    Moved tty configuration actions to tty_configure() in tty.c. This way
1556    options.c is strictly about parsing options nothing else.
1557
1558  * Function names cleanup
1559
1560  * Updated AUTHORS file
1561
1562    Added Nick who created the new tio package for Arch Linux.
1563
1564  * Fixed tx/rx counters type
1565
1566 Jakob Haufe:
1567
1568  * Include config.h before standard headers
1569
1570    Large file support was meant to be enabled in v1.11.
1571    This change enables it for real.
1572
1573
1574
1575 Changes since tio v1.13:
1576
1577  * Fixed tio_printf macro
1578
1579  * Fixed launch hints
1580
1581    Fixed launch hints not being printed in no autoconnect mode.
1582
1583  * Added 'ctrl-t ?' to list available commands
1584
1585  * Fixed log mechanism
1586
1587    To avoid echoing only log what is received from tty device.
1588
1589  * Improved tio output
1590
1591    Added titles and indentation to commands output for clearer separation
1592    when firing commands repeatedly.
1593
1594    Also added print of tio version and quit command hint at launch.
1595
1596  * Cleaned up tio print mechanism
1597
1598 Jakub Wilk:
1599
1600  * Fixed grammar
1601
1602    "allow" is a transitive verb, which requires an object,
1603    so "allow to <verb>" is ungrammatical.
1604
1605  * Fixed typo
1606
1607
1608
1609 Changes since tio v1.12:
1610
1611  * Fixed some error prints
1612
1613  * Fixed error printing for no autoconnect mode
1614
1615    Always print errors but only print silent errors when in no autoconnect
1616    mode.
1617
1618  * Added key command for showing session settings
1619
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.).
1622
1623    This is useful in case you have a running session but have forgotten
1624    what the settings are.
1625
1626
1627
1628 Changes since tio v1.11:
1629
1630  * Consolidated command key handling
1631
1632  * Moved delay mechanism into separate function
1633
1634  * Retired obsolete usleep()
1635
1636    Replaced with nanosleep()
1637
1638  * Added simple tx/rx statistics command (ctrl-t s)
1639
1640    To display the total number of bytes transmitted/received simply perform the
1641    'ctrl-t s' command sequence.
1642
1643    This feature can be useful when eg. trying to detect non-printable
1644    characters.
1645
1646  * Further simplification of key handling
1647
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).
1651
1652    This change also eases adding new key commands if needed.
1653
1654    Updated man page accordingly.
1655
1656  * Cleaned up and simplified key handling
1657
1658 Jakub Wilk:
1659
1660  * Insert output delay only if something was output
1661
1662
1663
1664 Changes since tio v1.10:
1665
1666  * Enabled large file support (LFS)
1667
1668    Added autotools AC_SYS_LARGEFILE to support 64 bit file size handling.
1669
1670  * Updated tio title
1671
1672
1673
1674 Changes since tio v1.9:
1675
1676  * Introduced lock on device file
1677
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.
1680
1681  * Updated AUTHORS
1682
1683 Jakub Wilk:
1684
1685  * Treat EOF on stdin as error
1686
1687
1688
1689 Changes since tio v1.8:
1690
1691  * Cleanup of error handling
1692
1693    Introduced consistent way of handling errors and printing error messages.
1694
1695    Also upgraded some warnings to errors.
1696
1697  * Updated localtime() error message
1698
1699  * Cleanup
1700
1701 Jakub Wilk:
1702
1703  * Fix error handling for select()
1704
1705    Previously the error handling code for select() was unreachable.
1706
1707  * Removed unneeded quotes from AM_CFLAGS
1708
1709  * Expanded tabs
1710
1711  * Fixed setting "tainted"
1712
1713    Set "tainted" if and only if any character was read from the device.
1714
1715    Ctrl-t is no longer sent to the device on exit, so the trick to avoid
1716    its echo is not necessary.
1717
1718    Characters read from stdin don't directly affect output, so they
1719    shouldn't enable "tainted".
1720
1721  * Used \r in color_printf()
1722
1723    \033[300D is an unusual way to move the cursor back to column 1.
1724    Use straightforward \r instead.
1725
1726  * Added missing \r\n to warning messages
1727
1728    \n alone is not enough, because the terminal is in raw mode.
1729
1730
1731
1732 Changes since tio v1.7:
1733
1734  * Fixed enablement of compiler warnings
1735
1736  * Fixed log_open() prototype
1737
1738  * Fixed index error wrt ctrl-t detection
1739
1740  * Fixed handling of ctrl-t
1741
1742    Before, when exercising the quit key sequence (ctrl-t + q) the ctrl-t code
1743    (0x14) would be sent.
1744
1745    This is now fixed so that it is not sent.
1746
1747    However, in case it is needed to send ctrl-t to the device it is possible by
1748    simply repeating the ctrl-t.
1749
1750    Meaning, ctrl-t + ctrl-t = ctrl-t sent to device.
1751
1752  * Improved error handling
1753
1754    Fixes a memory leak and avoids aggressive busy looping when problems
1755    accessing tty device.
1756
1757  * Removed redundant log_close() call
1758
1759  * Enabled compiler warnings
1760
1761 Jakub Wilk:
1762
1763  * Stopped copying arguments to fixed-size buffers
1764
1765    Don't needlessly copy command-line arguments into fixed-size buffers.
1766
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
1769    MAXPATHLEN at all.
1770
1771  * Added const to log_open() prototype
1772
1773  * Completed the ^g to ^t transition
1774
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.
1777
1778  * Used HTTPS for tio.github.io
1779
1780  * Man page beautification
1781
1782  * Bumped date in man page
1783
1784  * Improve man page formatting
1785
1786    Use regular font for metacharacters such as "[]", "," or "|";
1787    use italic font for metavariables.
1788
1789  * Fixed hyphen vs minus vs em-dash confusion in man page
1790
1791    - prints as hyphen;
1792    \- prints as minus sign;
1793    \em prints as em-dash.
1794
1795
1796
1797 Changes since tio v1.6:
1798
1799  * Changed escape key from ^g to ^t
1800
1801    After renaming to "tio" it makes sense to change the escape key
1802    accordingly. Hence, the new escape key is ^t.
1803
1804    Meaning, in session, its now ctrl-t + q to quit.
1805
1806 Jakub Wilk:
1807
1808  * Fixed silly "tio or tio" in man page
1809
1810  * Fixed typo
1811