home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 8 Other
/
08-Other.zip
/
XFER.ZIP
/
ESLASYNC.DOC
< prev
next >
Wrap
Text File
|
1991-10-06
|
13KB
|
268 lines
################################################################################
# NOTICE #
# PROPRIETARY AND CONFIDENTIAL #
# #
# Copyright (C) 1990 Easel Corporation. #
# All Rights Reserved. #
# #
# This computer program, created in 1990, is and contains trade secret and #
# confidential and proprietary information of Easel Corporation. All use, #
# disclosure, and/or reproduction not specifically authorized in writing #
# by Easel Corporation is prohibited. This program may also be protected under#
# the copyright and trade secrets laws of countries other than the U.S.A. #
# #
# EASEL is a registered trademark of Easel Corporation. #
################################################################################
The files on this disk are provided as a free service of Easel
Corporation but are not supported in any way by the company.
Specifically this means the following:
--The code has not been rigorously tested; we make no guarantees of
how or if it will perform;
--NO technical support is available for this code other than the
comments in the code, any readme or .doc files, and the sample
programs (if any) supplied.
--As our products change, we make no guarantees that the code
herewith will be maintained to reflect those changes.
--No other liabilities or conditions are implied by the distibution
of this product. Simply: if you find this code useful, and we hope
you will, then everyone is better off!
################################################################################
Overview
--------
The ESLASYNC.EXE local application is designed to provide XModem, 1K XModem,
and YModem file transfer protocols for Easel/2 applications. It is assumed
that you are fairly familiar with file transfer protocols. Much of the
interface between ESLASYNC.EXE and Easel/2 is similar to that of the
supported AVT100.EXE local application, which is due to the fact that
ESLASYNC.EXE incorporates much of the same source code that AVT100.EXE uses.
Because of this, and the fact that the AVT100.EXE source code is proprietary,
the source code for ESLASYNC.EXE can not be distributed to customers.
Included with ESLASYNC.EXE is a very simple Easel terminal emulation program
which makes a good example of how to use the application. At the bottom of
this document is a list of every error and status message that can be
displayed by the application, along with a brief description of each.
Use
---
ESLASYNC.EXE behaves much like the Easel "start remote" command, in that it
performs absolutely no manipulation on the data that is received from the
communications port. Once you have started the local application it
behaves much like the AVT100.EXE local application in filter mode (without
the filtering effect).
Before any text or commands can be sent to the local application it must
be properly started. The syntax for starting the local application is
identical to the AVT100.EXE local application, except that no mode is
specified. Therefore, an appropriate command from Easel/2 would look like:
start local ESLASYNC "ESLASYNC.EXE" "com1: BAUD2400 TANDEM NOPARITY"
The default settings for ESLASYNC are 2400 baud, no parity, 8 databits,
1 stopbit, and flow control is enabled. Once the application has been
properly started it will respond with the message "READY". If the local
application has any problems initializing itself, it will display one of
the messages listed at the bottom of this file.
Responses to ESLASYNC.EXE can be written using either the "response to char"
or "response to line" format. When sending characters you would use the
exact same command format as AVT100.EXE. Any data to be sent must be
preceeded by a "T " and followed by a "\^D". The following command would
caise the modem to dial a telephone number:
send "T ATDT 868-0524\r\^D" to ESLASYNC
File Transfers
--------------
When performing a file transfer you must first send the appropriate command
to the host to have it initiate it's end of the transfer. Once this has
been done you send a command to ESLASYNC.EXE telling it what type of
transfer to perform, and the name of the file. The file ESLASYNC.INC
contains the following strings, which contain the commands needed to
initiate a file transfer:
string XMODEM_Send is "UX " # Upload using the XModem protocol
string XMODEM1K_Send is "U1 " # Upload using the 1K XModem protocol
string YMODEM_Send is "UY " # Upload using the YModem protocol
string XMODEM_Receive is "DX " # Download using XModem or 1K XModem protocol
string YMODEM_Receive is "DY " # Download using the YModem protocol
These strings, or the appropriate literals, can be used to initiate a file
transfer from within ESLASYNC.EXE. Note that there are both XModem and
1K Xmodem choices for uploading, but not for downloading. When downloading,
ESLASYNC.EXE will automatically try to use the 1K method, but will fall back
to the normal XModem protocol if the host doesn't support the 1K method.
For more information on these file transfer protocols see the included file
XYMODEM.DOC. More information can be found on Compuserve, as well as in
many manuals on serial communications.
The following commands are examples of implementing file transfers:
copy "COMMAND.COM" to FileName
send XMODEM_Send FileName "\^D" to ESLASYNC
send "U1 AUTOEXEC.BAT\^D" to ESLASYNC
send YMODEM_Receive "DATA.ZIP\^D" to ESLASYNC
Note that there are no carriage returns (\r or \n) or spaces between the
end of the filename and the "\^D" character.
The included program "EMULATE.EAL" demonstrates the use of this local
application. It is a very simple terminal emulator which can perform
file transfers. This Easel program may seem slow due to the fact that it
uses only a "response to char" to display data received from ESLASYNC.EXE.
----------------------------------------------------------------------
The following group of messages are displayed only during an XModem or
YModem file upload. They are as follows:
XY send: Waiting for remote
This message indicates that the transfer protocol has successfully
started (a valid filename was passed to the local, and it was opened).
At this point the local is waiting for the host to trigger the start
of the transfer.
XY send: i 1024 and j 128 byte packets
XY send: k total packets
These two messages are displayed after the previous message. This
alerts you to the number of packets that are to be transfered during
the upload procedure. Note, k = i + j in the above messages.
XY send: Packet i
At the beginning of each packet transfer this message is displayed.
It allows you to keep track of the progress of the transfer. Note
that when using the YModem protocol the first packet is 0, the XModem
protocol begins with packet 1.
XY send: Attempt i
Up to ten attempts will be made to transfer each packet of information.
If the first attempt fails then this message will notify you of the
second through tenth attempt. This only appears if the first attempt
for transfering the packet was unsuccessful.
XY send: Transfer canceled by remote
This message notifies you if the receiving (host) computer canceled
the transfer. This situation is not very common when accessing BBS's,
mainframes, and networks such as Compuserve.
XY send: Empty File (YModem only)
When uploading using the YModem protocol, the receiving computer is
notified of the end of the file transfers by sending an "empty" or
non-existant file. This message is displayed when this happens.
XY send: Batch transfer complete (YModem only)
XY send: Transfer complete
Depending on the type of transfer one of the above two messages will
appear when the transfer is complete. The YModem protocol will display
the Batch message, whereas the XModem and 1K XModem protocols display
the normal message.
XY send: Transfer failed
If a transfer fails for any reason (ten unsuccessful attemts to transmit
a packet, a timeout from the host, a cancelation, etc.) then this
message is displayed.
XY send: END
When the file transfer protocol has entirely finished (successfully or
unsuccessfully) this message is displayed. This is provided mainly as
a means of synchronization between the local application and Easel.
----------------------------------------------------------------------
These messages are encountered during a XModem or YModem download session
only. They are identical to the upload messages, with the exception of
the "Bad packet" message and the "File" message. The "Bad packet" message
occurs if the packet received from the host fails its CRC or checksum test,
and will cause the packet to be retransmitted (up to 10 times). The "File"
message displays the filename obtained from the first packet of a YModem
file transfer.
XY receive: Waiting for remote
XY receive: File <filename> (YModem only)
XY receive: k total packets (YModem only)
XY receive: Packet i
XY receive: Bad packet
XY receive: Transfer canceled by remote
XY receive: Transfer complete
XY receive: Batch transfer complete (YModem only)
XY receive: END
----------------------------------------------------------------------
These are a list of error messages that can be encountered when both
uploading and downloading files. Most are fairly self-explanitory, and
all of them will currently cause the file transfer to fail.
XYERROR: Unable to open <filename>
The specified file couldn't be opened. Make sure that there are
no control characters (carriage returns, line feeds, etc.) on
the specified filename.
XYERROR: Startup not acknowledged
The host (remote) computer never acknowledged the file transfer
protocol. Check that it was ready to transmit/receive the file.
XYERROR: Packet timeout
Not all the information was received for the current packet, or
the remote computer didn't acknowledge the receipt of the last
packet.
XYERROR: Error on disk read
A packet couldn't be read from or written to the file. Check the
disk for damage.
XYERROR: EOT not acknowledged
(Upload only) When a file transfer has completed, an EOT (End of
Transfer) message is sent. If the remote computer doesn't
acknowledge this message then the transfer is assumed to have
failed. When this error occurs it is possible that the file was
successfully transfered, although not guaranteed.
XYERROR: Invalid command line
If the file transfer command line sent to ESLASYNC.EXE isn't
correct you will get this message.
XYERROR: Timeout waiting for remote
(Download only) This occurs if an entire packet has not been sent
and the local application hasn't received any data within a
specific amount of time.
XYERROR: Unexpected character
During certian points in the transfer specific characters are
expected from the remote computer. If a character other than one
of the expected characters is received then this message is
displayed.
----------------------------------------------------------------------
The error messages below have to do with the actual communications between
the local application and the computers com port. These errors are
identical to the error messages displayed by the AVT100.EXE local
application. For more information on these refer to the Easel/2, Easel/Win,
or Easel/DOS VT100 support manual.
ESLASYNC ERROR: Invalid command
ESLASYNC ERROR: illegal serial port name
ESLASYNC ERROR: illegal syntax in port characteristics
ESLASYNC ERROR: failed to open serial port
ESLASYNC ERROR: failed to set port characteristics
ESLASYNC ERROR: failed to write characters to serial port