Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

File Transfer Through Serial Port With Packages

Status
Not open for further replies.

fanpiro

Technical User
Dec 13, 2001
2
0
0
US

Hi everybody

I need to know how to send a file in packages through the serial port. I also have to do it using a wait and stop protocol. If anyone can tell me where can i find an example i would be greatfull. Thanks
 
Why not using TCP/IP and SLIP? in this case you could use sockets to handle the communication
hnd
hasso55@yahoo.com

 
That would be great, but i've been asked to do it this way.
 
There are at least 2 Networkprotocols that could be used for that

1. Slip: Download the Trumpet winsock DLL which supports SLIP, Configure it, Assign IP - Adresses Connect the Computers and you can use the connection like a common Network.

2. PPP: Establish a RAS-Connection and you can connect the computers via Ras. All network features are then available.

The configuration is dependent on your OS in UNIX both services are directly available. You only have to enable it. The way how to do that you can find in the manpages.
hnd
hasso55@yahoo.com

 
Another method for transfering packets thru a serial port that are a little easier to understand, but admittedly less robust are the "older" protocols like XModem, Ymodem, or even ZModem. The source for these are readily available. It's even pretty easy to write your own protocol for packet transmission on a serial line, but you be re-inventing the wheel. For pure ascii I've written my own in the past and prefer a simple protocol like:
<SOH><ByteCount><DataToBeTransmitted><EOT><Checksum>

Tim Moody
 
I am sure your protocol works, but the solution with TCP/IP on a serial line gives you the benefit to use all tools which you know from Internet, FTP, Telnet etc.... and you can route the packets even via the Internet.

It is in the forst view difficult to understand, but in the real it is easy to handle.


hnd
hasso55@yahoo.com

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top