TCP to Serial

(Better read the "Readme.doc" document)

What it does...

TCPtoSer waits for a TCP connection on a specified port (for example the Telnet port 23).
Or, it connects to any port of a host. 
After that, any data from that connection is forwarded to the serial port and vice versa. 
If the data can't be sent to the serial port immediately, they are buffered dynamically.

What you can do with it...

There are probably many different things you can do with it.
I can only give some examples of use:

Remote modem connetion: Youve got two computers in your local TCP/IP network. One of them 
has got a modem, and you want to connect, for example, to a mailbox via that modem from the
 other computer. 
If you want to transfer files from and to the mailbox, you should use a slightly different 
way, because a Telnet client normally doesn't know how to transfer files. 
The best way would be if the second PC (PC2) would have got two free serial ports. If it 
hasn't, there are several com port cards for about 25$ which add two serial ports to your 
computer. You will also need a Null-Modem cable to connect the two serial ports (loop 
back). 
Well, the rest is easy: A terminal software (Telix, ZOC, Hyperterminal) gives the data to 
the first serial port, which sends them over the Null-Modem cable to the second serial port
 on the same computer. TCPtoSer reads the data from that port and sends them 
via TCP/IP to the modem computer, where another TCPtoSer sends them to the modem. The 
same path is used for the other direction (download). It works, really!  I've tested it.
You think using a Loop-Back cable is a bit funny? Well, you could try to use ZOC (see 
http://www.emtec.com), which allows you to use for example the ZMODEM protocoll via a 
Telnet connection. I plan to implement a "Telnet compatibility mode", but actually TCPtoSer 
doesn't support the Telnet binary transmission described in RFC0856. Please take a look at 
the homepage of TCPtoSer in a few weeks. 

Remote printing: Youve got three computers in your local TCP/IP network, two Windows 
machines and one other machine (for example a Macintosh). One Windows computer is in 
another room, and a serial printer is attached to it. You want to print some documents 
(or pictures) created on your Macintosh.
Use TCPtoSer on both Windows machines. Connect the Macintosh to the Windows PC next to 
it using a serial cable. Make a TCP/IP connection between the two TCPtoSer, and use the 
standard printer driver for your printer on the Mac. The Mac gives the data to the first 
PC via the serial line, the first PC sends them to the second PC via TCP/IP, and the 
second PC gives them directly to the printer. It works, really! Ive testet it.  
The settings for a HP510 are: 57600,8n1,CTS/RTS. 


Remote UNIX printing: Youve got a UNIX machine and a Windows PC. A serial printer is 
attached to the Windows PC. You want to print some documents created on the UNIX-Machine.
Use a Perl script. There is an example script in TCP2Serial, the counterpart of my 
TCPtoSer for Macintosh computers. Please ask Peter Lewis, <peter.lewis@info.curtin.edu.au>.


What it doesnt do...

Well, it doesnt emulate a serial port. So, for example, you cant take a simple modem 
program, and communicate with a modem remotly. That is, because the simple modem program 
doesnt know how to send its data via TCP/IP. It tries to connect directly via the serial 
port. You can use another computer to get the data from that serial port and send it via 
TCP/IP (see Remote printing).  
Some people asked me, if TCPtoSer could be used to build a TCP/IP network over a serial 
link. Well, of course it is possible to connect the serial sites of two TCPtoSer. But in 
this case you won't have a TCP/IP network, because only one single TCP port can be used. 
You should better use the Dialup Networking in this case. It should be possible to use the 
Dialup Networking for a direct serial link, too, no only for a modem connection. 


What it needs...

A free serial port and Winsock 1.1 is needed. TCPtoSer runs on Win95 and WinNT platforms.


What it costs...

The registration costs 20 Dollar (or 35,- DM in Germany). You may use this program without 
registration for a period of 30 days. After that, it will stop working and you MUST 
register. The file "Register.doc" describes how to register.
You may use the registration key for two own TCPtoSer installations, if you use both 
installations together. So you wont have to buy two registration keys if you are 
interested in the "remote printing" example. You may not give the registration key to 
other people. The registration key is valid for all 1.x.x versions of TCPtoSer.

Shareware note...

All copyrights to TCPtoSer are exclusively owned by the author - Carsten Gottbehuet.
Anyone may use this software during a test period of 30 days. Following this test period 
of 30 days or less, if you wish to continue to use TCPtoSer, you MUST register.
The TCPtoSer unregistered shareware version, may be freely distributed, provided the 
distribution package is not modified. No person or company may charge a fee for the 
distribution of TCPtoSer without written permission from the copyright holder. 
TCPTOSER IS DISTRIBUTED "AS IS".  NO WARRANTY OF ANY KIND IS EXPRESSED OR IMPLIED.  YOU 
USE AT YOUR OWN RISK. THE AUTHOR WILL NOT BE LIABLE FOR DATA LOSS, DAMAGES, LOSS OF 
PROFITS OR ANY OTHER KIND OF LOSS WHILE USING OR MISUSING THIS SOFTWARE.
You may not use, copy, emulate, clone, rent, lease, sell, modify, decompile, disassemble, 
otherwise reverse engineer, or transfer the licensed program, or any subset of the 
licensed program, except as provided for in this agreement.
All rights not expressly granted here are reserved by Carsten Gottbehuet.
If you do not agree with the terms of this shareware note you must remove TCPtoSer from 
your storage devices and cease to use the product.


How to use TCPtoSer...

TCPtoSer doesnt need to be installed. You can just launch it. Use Deinstall.exe to 
remove TCPtoSer from the system. 
In the main window, there are different fields and five buttons at the bottom. Use the
 preferences button to open the preferences window and check the settings concerning the 
serial port. You can also enter your registration code there, see "Register.doc" for more 
information. The program remembers all settings and the last entries in the main window 
the next time you launch it. Press the "OK"-button to save the settings and to close the 
preferences window. If you enable the "Listen/Connect automatically after start" field, 
the application will immediatly try to listen or connect to the host you entered the last 
time.
Mode
In the main window, you have to decide which mode shall be used: The server mode or the 
client mode. 
In the server mode, the application listens on the port you specify. Clients can connect 
to TCPtoSer after youve pressed the start button. If a client disconnects, TCPtoSer 
directly restarts the listening. You dont have to press the start button again. So, you 
dont have to supervise that PC.  
In the client mode, the application connects to the specified host on the specified port 
after youve pressed the start button. 
Status
The status field shows the current state: IDLE, LISTENING, CONNECTING, CONNECTED, 
RESETTING. 
Buffer Size
During data exchange, you can see the current buffer size in the concerning field. 
Only data from TCP/IP to the serial port is buffered. The other data path doesnt need 
to be buffered because of the handshaking. 
Transfer Info
In the transfer info field youll find three LEDs: The first two ones for the "TCP/IP to 
serial port" path, the last one for the "serial port to TCP/IP" path. The LEDs will blink 
if data is exchanged.
STOP
The stop button shuts down the connection and clears the buffer. If you press this button, 
its an irreversible action. The application returns to its idle state.
PAUSE
The pause button will stop sending data to the serial port, and no data will be forwarded 
from the serial port to TCP/IP. But the receiving from TCP/IP doesnt stop working, and 
the buffer isnt cleared. You can press the pause button again to enable normal data 
exchange. Nothing should be lost. But some applications (which use, for example, ZMODEM) 
will probably run into a timeout if no data are received.


Homepage

http://www.aball.de/~gotti/tcptoser.html


EMail

carsten@gotti.aball.de


Version History

1.0	first try (non public)
1.1	Added buffering and other important stuff (non public)
1.2.0	Added GUI (graphical user interface) and hostname->number conv. (non public)
1.2.1	Added license stuff, buffer size display and transfer LEDs
1.2.2	Added Com5-Com8 support and the "AutoStart" feature	
1.2.3	Removed a registration requester which was too pertinacious, removed an error 
	message (Some data couldn't be sent) appearing on WinNT platforms.	

Additional Software

TCP2Serial is the counterpart of TCPtoSer for Macintosh computers. It works similar, but 
it just waits for connects and doesnt have any windows.
Look at  ftp://nic.switch.ch/mac/software/peterlewis/

ZOC is a terminal software, which is normally used to connect to mailboxes. It also offers 
the capability to connect to hosts via TCP/IP.
Look at   http://www.emtec.com


Ports

Service    Port     Description 	
FTP          21     File Transfer Protocol - for transferring files	
Telnet       23     For logging into an account on a Remote Host	
SMTP         25     For sending mail	
Gopher       70     Text menu based browser	
HTTP         80     WWW protocol - Netscape, Mosaic	
POP3        110     Downloading Mail	
NNTP        119     Internet Newsgroups	
IRC        6667     Internet Relay Chat	
Compuserve 4144     Compuserve WinCIM communications	
AOL        5190     America Online	
MSN         569     Microsoft Network	
<none>     1429     I suggest that you use this port for Remote Printing		

