1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203
|
README
Application:
TCPSER turns a PC serial port into an emulated Hayes compatible modem that
uses TCP/IP for incoming and outgoing connections. It can be used to allow
older applications and systems designed for modem use to operate on the
Internet. TCPSER supports all standard Hayes commands, and understands
extended and vendor proprietary commands (though it does not implement
many of them). TCPSER can be used for both inbound and outbound connections.
License:
TCPSER is distributed under the GPL 2.0 or later
Executable/Building:
UNIX/Linux/BSD:
Simply untar the archive into a directory, and use the appropriate make command
generate the exectutable. If unsure, try the default make command first.
Default/Linux: make
Solaris: make -f Makefile.solaris
*BSD: gmake
Windows 95/OSR2/98/SE/ME/NT/2000/XP/2003:
The application archive contains a pregenerated Windows 32 bit executable
(tcpser.exe). No compilation should be required, though the GNU toolchain and
the CYGWIN POSIX libraries can be used to regenerate the executable if desired:
Win32: make -f Makefile.win32
Note that at least the cygwin1.dll library is required to operate tcpser under
Windows. I recommend downloading a recent version from www.cygwin.com
Operation:
tcpser -d <dev> -s <speed> -l <leg_level> -t <tracing options> ...
sample: tcpser -d /dev/ttyS0 -s 38400 -l 7 -tsSiI -i "s0=1" -p 6400
Will start tcpser on ttyS0 at 38400 bps, level 7 logging, tracing of
inbound serial, outbound serial, inbound IP, outbound IP, init
modem to answer after 1 ring, and listen for incoming connections on port
6400
tcpser -h will provide additional information
tcpser can be configured to send the contents of a file upon:
connect ; -c -C
answer ; -a -A
no-answer ; -I
busy ; -B
inactivity-timeout ; -T
For connect and answer, there are separate options for sending a file to the
local serial connection (-c, -a) and the remote IP connection (-C, -A).
If tcpser connects to a telnet service, tcpser will negotiate the connection
using the telnet protocol. Note though that telnet connections are NOT 8-bit
clean, meaning file transfers will not likely work over such a connection.
Normal non-telnet connections are 8-bit clean and file transfers should
operate correctly.
tcpser can be configured to support multiple serial ports on one TCP/IP port
Simply repeat the -s and -d parameters on the command line for each serial
port to be configured. Options s,S,a,A,c,C,I, and T will "propagate" to
subsequent connections, unless they are redefined. Defaults for s and S are
38400. This configuration enables the operation of a multi-line BBS on one
TCP/IP port.
Frequently used addresses can be configured in the "phonebook", like so:
tcpser .... -nhome=jbrain.com:6400
This is also useful for systems that do not accept non-numeric phone numbers:
tcpser .... -n5551212=bestbbs.net
One can even "hide" a regular IP address or DNS entry by aliasing it to
something else:
tcpser .... -njbrain.com=bestbbs.com
At this point, phonebook support is very alpha, so use with care.
Emulation:
All of the standard Hayes commands should behave as expected. Some of
of the proprietary commands are not implemented, but should not cause
errors.
Examples:
ats0=1 ; set number of rings to answer
ata ; answer the line
ath0 ; hang up
ats12? ; query S register 12
ate0 ; turn off echo
at&k3 ; set flow control to RTS/CTS
atdtjbrain.com:6400 ; "dial" jbrain.com, port 6400 (defaults to port 23)
atdl ; "dial" last number
a/ ; repeat last command
Commands can be chained, as on a regular modem:
ats0=1z&c1&k3%f0s3=13dtjbrain.com
tcpser supports the Hayes break sequence semantics, so +++ should operate
correctly, even if the sequence of characters is used in normal data
transmissions.i
Cable:
tcpser can be used with a regular null modem cable, but it utilizes the DTR
line on the PC serial port to reflect the state of the DCD line as seen by the
target system. On a normal null-modem cable, DTR is mapped to DCD/DSR, which
implies DSR will also reflect the state of DCD on the target machine. However,
some systems (notably those utilizing the 6551 ACIA communication IC) will not
transmit unless DSR is held high. In this case, a quick qorkaround is to force
DCD to be held high by adding -i"&c0" to the tcpser parameter list. However,
this also prevents normal operation of the DCD line, which is needed by some
BBS systems. A more permanent solution is to construct a modified null-modem
cable or modify an existing cable to the following specifications:
PC Target
CTS-----RTS
RTS-----CTS
SND-----RCV
RCV-----SND
DTR-----DCD
DCD-+-+-DTR
| |
DSR-+ +-DSR
GND-----GND
This differs from a regular null-modem cable in that the target machine has DSR
looped to DTR, not to DCD. Note that this cable is directional.
Normally, the target machine will configure DSR to float to a high state if
unconnected. As well, PCs do not require a valid DSR line for operation. Thus,
a simpler cable can be constructed that is bi-directional:
CTS-----RTS
RTS-----CTS
SND-----RCV
RCV-----SND
DTR-----DCD
DCD-----DTR
GND-----GND
Unless there are issues, we recommend this simplified version, as it can be
installed in either direction.
As an even simpler solution, many have simply taken a normal rs232 DE-9F to
DE-9M cable and removed pin 6 from the male end (DSR). This is fine, but the
cable must be installed between the null modem adapter and the target machine:
PC ----- null-modem adapter ----- cable with pin 6 removed ------ target machine
Any other configuration will not work correctly.
Platform notes:
Win32 users should use /dev/ttyS0-3 for COM1-4. At present, using "com1:"
does not operate correctly.
This has been tested on the following platforms:
Linux 2.4.20-8
Windows XP
Windows XP SP1
Slackware 10.0
Help:
tcpser has a small but active user community. Help can be found by asking a
question in comp.sys.cbm, on the NEWNet #c64friends IRC channel, or by emailing
the author.
-----------------------------------
Jim Brain
brain@jbrain.com
www.jbrain.com
|