rev |
line source |
nuclear@0
|
1 dterm: A simple terminal program
|
nuclear@0
|
2
|
nuclear@0
|
3
|
nuclear@0
|
4 dterm is a simple terminal emulator, which doesn't actually emulate
|
nuclear@0
|
5 any particular terminal. Mainly, it is designed for use with xterm
|
nuclear@0
|
6 and friends, which already do a perfectly good emulation, and therefore
|
nuclear@0
|
7 don't need any special help; dterm simply provides a means by which
|
nuclear@0
|
8 keystrokes are forwarded to the serial line, and data forwarded from
|
nuclear@0
|
9 the serial line appears on the terminal.
|
nuclear@0
|
10
|
nuclear@0
|
11
|
nuclear@0
|
12 Running dterm
|
nuclear@0
|
13
|
nuclear@0
|
14 dterm is invoked thusly:
|
nuclear@0
|
15
|
nuclear@0
|
16 dterm [options|device ...]
|
nuclear@0
|
17
|
nuclear@0
|
18 dterm attempts to read the file ~/.dtermrc for options; if this doesn't
|
nuclear@0
|
19 exist, it tries /etc/dtermrc. Then it parses the options passed on the
|
nuclear@0
|
20 command line.
|
nuclear@0
|
21
|
nuclear@0
|
22 The options read should include a device name, e.g "ttyS0" or "ttyd0"
|
nuclear@0
|
23 for the first serial port on a Linux or FreeBSD system respectively. If
|
nuclear@0
|
24 no device is specified, dterm tries /dev/ttyS0, /dev/ttyd0, /dev/ttyUSB0
|
nuclear@0
|
25 and /dev/ttyU0.
|
nuclear@0
|
26
|
nuclear@0
|
27 Once started, dterm can be got into command mode using Ctrl/]. Press
|
nuclear@0
|
28 enter once from command mode to get back into conversational mode. (The
|
nuclear@0
|
29 command character can be changed with the esc= option, e.g. esc=p to
|
nuclear@0
|
30 use Ctrl/P instead of Ctrl/].)
|
nuclear@0
|
31
|
nuclear@0
|
32
|
nuclear@0
|
33 Options
|
nuclear@0
|
34
|
nuclear@0
|
35 The following options can be used from command mode
|
nuclear@0
|
36
|
nuclear@0
|
37 - 300, 1200, 9600 etc: Set speed, default 9600.
|
nuclear@0
|
38 - 5, 6, 7, 8: Set bits per character, default 8.
|
nuclear@0
|
39 - 1, 2: Set number of stop bits, default 1.
|
nuclear@0
|
40 - e, o, n, m, s: Set parity to even, odd, none, mark or space, default none.
|
nuclear@0
|
41 - cts, nocts: Enable / disable CTS flow control, default nocts.
|
nuclear@0
|
42 - xon, noxon: Enable / disable XON/XOFF flow control, default noxon.
|
nuclear@0
|
43 - modem: Enable / disable modem control (hang up modem on exit, exit if
|
nuclear@0
|
44 modem hangs up), default nomodem.
|
nuclear@0
|
45 - bs, nobs: Enable / disable mapping of Delete to Backspace, default nobs.
|
nuclear@0
|
46 - del, nodel: Enable / disable mapping of Backspace to Delete, default nodel.
|
nuclear@0
|
47 - maplf, nomaplf: Enable / disable mapping of LF to CR, default nomaplf.
|
nuclear@0
|
48 - igncr, noigncr: Ignore / output carriage returns, default noigncr.
|
nuclear@0
|
49 - crlf, nocrlf: Enable / disable sending LF after each CR, default nocrlf.
|
nuclear@0
|
50 - ctrl, noctrl: Enable / disable control character display mode. In this
|
nuclear@0
|
51 mode, non-printable characters are displayed as ^c for the codes 0-31 (except
|
nuclear@0
|
52 CR, LF & TAB), [DEL] for 127, or [xx] for non-printing characters >= 128.
|
nuclear@0
|
53 - hex, nohex: As for ctrl, but prints [xx] for all characters except 7-bit
|
nuclear@0
|
54 printable ASCII, CR and LF.
|
nuclear@0
|
55 - b: Send a 500 ms break.
|
nuclear@0
|
56 - dtr, nodtr: Raise / lower DTR, default dtr.
|
nuclear@0
|
57 - rts, norts: Raise / lower RTS, default rts.
|
nuclear@0
|
58 - d, r: Toggle DTR / RTS.
|
nuclear@0
|
59 - esc=<c>: Set command mode character to Ctrl/<c> (default ']')
|
nuclear@0
|
60 - @<filename>: Read and process configuration from <filename>.
|
nuclear@0
|
61 - !<command>: Execute shell command
|
nuclear@0
|
62 - sx <filename>: Send a file using XMODEM.
|
nuclear@0
|
63 - rx <filename>: Receive a file using XMODEM.
|
nuclear@0
|
64 - sz <filename>: Send a file using ZMODEM.
|
nuclear@0
|
65 - rz: Receive file(s) using ZMODEM.
|
nuclear@0
|
66 - show: Display current configuration and modem status.
|
nuclear@0
|
67 - help, h, ?: Display a summary of commands.
|
nuclear@0
|
68 - version: Display version, copyright and warranty information.
|
nuclear@0
|
69 - quit, q: Exit
|
nuclear@0
|
70
|
nuclear@0
|
71
|
nuclear@0
|
72 File Transfer
|
nuclear@0
|
73
|
nuclear@0
|
74 If the rzsz package (or lrzsz) package is installed, the sx, sz, rx & rz
|
nuclear@0
|
75 commands can be used to initiate file transfers using the reliable
|
nuclear@0
|
76 XMODEM and ZMODEM file transfer protocols. Note that the program files
|
nuclear@0
|
77 for rzsz must be in /usr/bin or /usr/local/bin for dterm to find them.
|
nuclear@0
|
78
|
nuclear@0
|
79 Note that rx, sx and rz require that the transfer be initiated at the
|
nuclear@0
|
80 remote end before escaping back to the dterm command prompt. sz will send
|
nuclear@0
|
81 an "rz" command down the serial link in start-up to initiate the transfer.
|
nuclear@0
|
82
|
nuclear@1
|
83 This version also supports plain ascii transfers using `ascii-xfr`. Use
|
nuclear@1
|
84 commands sa/ra to do ascii transfers.
|
nuclear@1
|
85
|
nuclear@0
|
86
|
nuclear@0
|
87 Examples
|
nuclear@0
|
88
|
nuclear@0
|
89 Connect via ttyS1 to a system running at 2400 bps, 7 bits even parity:
|
nuclear@0
|
90
|
nuclear@0
|
91 dterm ttyS1 2400 7 e
|
nuclear@0
|
92
|
nuclear@0
|
93 Send a break in a running session:
|
nuclear@0
|
94
|
nuclear@0
|
95 ^]
|
nuclear@0
|
96 dterm> b
|
nuclear@0
|
97 dterm>
|
nuclear@0
|
98
|
nuclear@0
|
99 Transmit a file using ZMODEM:
|
nuclear@0
|
100
|
nuclear@0
|
101 ^]
|
nuclear@0
|
102 dterm> sz file.txt
|
nuclear@0
|
103 rz waiting to receive.Sending: file.txt
|
nuclear@0
|
104 Bytes Sent: 22943 BPS:645
|
nuclear@0
|
105 Transfer complete
|
nuclear@0
|
106 dterm>
|
nuclear@0
|
107
|
nuclear@0
|
108
|
nuclear@0
|
109 Copyright
|
nuclear@0
|
110
|
nuclear@0
|
111 dterm is Copyright 2007 Knossos Networks Ltd.
|
nuclear@1
|
112 Copyright 2017 John Tsiombikas <nuclear@member.fsf.org>
|
nuclear@0
|
113
|
nuclear@0
|
114 This program is free software; you can redistribute it and/or
|
nuclear@0
|
115 modify it under the terms of the GNU General Public License version 2
|
nuclear@0
|
116 as published by the Free Software Foundation.
|
nuclear@0
|
117
|
nuclear@0
|
118 This program is distributed in the hope that it will be useful,
|
nuclear@0
|
119 but WITHOUT ANY WARRANTY; without even the implied warranty of
|
nuclear@0
|
120 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
nuclear@0
|
121 GNU General Public License for more details.
|
nuclear@0
|
122
|
nuclear@0
|
123 A copy of the GNU General Public License version 2 is available at
|
nuclear@0
|
124 http://www.knossos.net.nz/gpl.html or can be obtained from the Free
|
nuclear@0
|
125 Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
nuclear@0
|
126 02110-1301 USA.
|
nuclear@0
|
127
|
nuclear@0
|
128
|
nuclear@0
|
129 Source Code
|
nuclear@0
|
130
|
nuclear@1
|
131 Mercurial repo: http://nuclear.mutantstargoat.com/hg/dterm-nuc
|
nuclear@1
|
132
|
nuclear@1
|
133 original dterm source code is located at
|
nuclear@0
|
134 http://www.knossos.net.nz/downloads/dterm-0.3.tgz
|
nuclear@0
|
135
|