From 8b050d328288dc3f8e7c7a429fc750e08f1a242d Mon Sep 17 00:00:00 2001 From: =?utf8?q?Karel=20Ko=C4=8D=C3=AD?= Date: Fri, 16 Sep 2016 22:23:34 +0200 Subject: [PATCH] Add manual page Every good program should have its manual page. --- Makefile | 3 +++ sterm.man | 75 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 78 insertions(+) create mode 100644 sterm.man diff --git a/Makefile b/Makefile index 27dd2fc..6aa5b90 100644 --- a/Makefile +++ b/Makefile @@ -12,3 +12,6 @@ clean: install: all install -d $(DESTDIR)/usr/bin install -m 755 sterm $(DESTDIR)/usr/bin + install -d $(DESTDIR)/usr/local/man/man1 + install -m 644 sterm.man $(DESTDIR)/usr/local/man/man1/sterm.1 + gzip -f $(DESTDIR)/usr/local/man/man1/sterm.1 diff --git a/sterm.man b/sterm.man new file mode 100644 index 0000000..f053302 --- /dev/null +++ b/sterm.man @@ -0,0 +1,75 @@ +.\" vim: ft=groff +.\" Manpage for sterm. +.TH man 1 "16 September 2016" "16102015" +.SH NAME +sterm \- simple serial terminal +.SH SYNOPSIS +sterm [OPTION]... DEVICE +.SH DESCRIPTION +.PP +sterm is simple program for accessing serial devices/console. Can be used in +scripts or directly as interactive terminal. It also allows control of additional +pins (DTR and RTS) on top of standard ones. +.PP +In interactive mode all keys are send trough serial connection, including '^C'. So +to exit this program there is special keystroke series to exit: '~.' +.SH OPTIONS +.TP +\fB\-c\fR, \fB\-\-all\fR +Enter command mode. See command mode section for details on what command mode is +and how to use it. +.TP +\fB\-d[PULSE]\fR +Make pulse on DTR. You must specify length of the pulse and its polarity, see +following section for more details. +.TP +\fB\-e\fR +Ignore '~.' escape sequence. Be aware that this locks your terminal to sterm, +only way is to kill it from other terminal. But this can be desirable in scripts, +specially if you are sending binary data trough serial terminal. +.TP +\fB\-n\fR +Don't switch the device to raw mode. +.TP +\fB\-r[PULSE]\fR +Make pulse on RTS. You must specify length of the pulse and its polarity, see +following section for more details. +.TP +\fB\-s \fR +Specifies baudrate in which serial device will be switched at start of sterm. +Here are few common values: 4800, 9600, 19200, 115200. For full list of supported +baudrates see source files or test what is acceptable. + +.SH PULSE +For arguments controlling DTR and RTS you can optionally specify number which sets +length of pulse and its polarity. Length of the pulse in milliseconds is absolute +value of specified number and sign, which can be either '+' or '-', corresponds +to positive or negative polarity. If sign is given without any number, then it +generates one millisecond pulse of given polarity. + +.SH COMMAND MODE +Command mode allows you to generate arbitrary combinations of pulses with DTR and +RTS pins. You can input white character (space, new line) separated following +commands. + +.I dtr PULSE +.RS +Generates pulse on DTR. For details on PULSE see previous section. +.RE +.I rts PULSE +.RS +Generates pulse on RTS. For details on PULSE see previous section. +.RE +.I go +.RS +Exits command mode. +.RE + +Any other input in command mode that described commands raises error and causes +program exit. + +.SH BUGS +No known bugs. + +.SH AUTHOR +Michal Sojka (sojkam1@fel.cvut.cz) -- 2.39.2