; Telecommunication (Alpha + PC)
title Transferring files between the Alpha and the IBM
H


Introduction:

As many SuperVUE customers have multiple computers,  we  have provided a
means  for  transferring  files back and forth between these  computers.
These programs provide error checking and may be used either with modems
or by connecting the computers  together  directly with an RS-232 serial
cable.
\
WXTERM program on the IBM:

On the IBM, a program called WXTERM has been provided.  This is a public
domain telecommunications program.  This program  allows  you  to upload
and  download  files  with  another  system.   Simply type WXTERM at the
MS-DOS prompt.  The program will then clear the  screen  and connect you
with  the  remote computer or modem.  Pressing ALT-P will allow  you  to
change parameters  like  BAUD,  number of bits, parity, and port number.
Usually, you will use COM1 as your  serial port.  To communicate with an
Alpha Micro, you will need to use 8 bits  data,  1  stop bit, no parity.
If you are using a modem, you will need to set the BAUD  to  either 1200
or  2400  depending on your modem.  If you are connecting directly  with
the Alpha,  then  use  9600  BAUD.   This  is  the  highest speed WXTERM
supports.  If you use a different telecom program, you  may  be  able to
use higher speeds.  Note that the Alpha Micro will send data to your IBM
at higher speeds, but will not receive data faster than 9600 baud.  This
is due to limitations in the AMOS terminal service system.
\
WXTERM will give you a list of command keys when you press the HOME  key
on the numeric keypad.  This is what you will see:

      ALT-C will clear the screen on the IBM
      ALT-H will hang up your modem (Hayes compatible modems only)
      ALT-P allows you to examine and change communications settings
      ALT-R tells the IBM to receive a file from the Alpha
      ALT-S tells the IBM to send a file to the Alpha
      ALT-X will exit WXTERM and put you back in MS-DOS

Once  you  have used ALT-P to set your communications parameters, WXTERM
will save this information for next time.
\
XMODEM program on the Alpha:

A program called  WXMODEM is provided which will run on the Alpha Micro.
This program supports  XMODEM-CHK,  XMODEM-CRC,  XMODEM-1K  and  WXMODEM
protocols.  Don't worry about any of that, it is all automatic.  Use  of
this program will be covered in detail later in this document.

XMODEM will also allow you to transfer files from non-IBM computers like
the  Macintosh.  Such transfers are quite easy, but are beyond the scope
of this document.  In other words, you are on your own.
\
Cabling:

If you  are  using  a  modem  to  hook  the  computers together, use the
standard cables that your dealer recommends (on  the IBM and the Alpha).
However,  if  you  are  connecting  directly, you will  need  a  "gender
changer" adaptor in order to plug a terminal  cable  into the IBM serial
port.   Typically,  terminal  cables  end in a male connector,  and  the
terminal  has  a  female connector.  However,  IBM,  in  their  infinite
wisdom, uses male connector  on the serial port.  Hence, the need for an
adaptor.  Technoids take note:   You  DON'T  need to switch pins 2 and 3
(you don't need a "null modem" adaptor).
\
Talking to the Alpha with a modem:

When you enter WXTERM, it will put you in direct  communication with the
serial port.  Assuming you are using a Hayes compatible  modem,  you can
type  ATD###-####  to call the Alpha.  When the Alpha answers the phone,
you will get CONNECT, or something like it.  Then, press return a couple
of times, and you should  get the AMOS prompt.  If you can't communicate
with your modem, check the BAUD with ALT-P to make sure it is correct.

Talking to the Alpha directly:

The easiest way to do this  is to use a working terminal.  This way, you
don't have to change your AMOSL.INI  file,  or  add new cables.  As most
terminals run at 19200 baud, you will need to type  BAUD 9600 to slow it
down.  When you do this, you won't be able to type on  that terminal for
a while.  Unplug the terminal cable, and plug it into the  IBM  (using a
"gender changer" adaptor).  Enter the WXTERM program on the IBM and make
sure that it is running at 9600 baud (press ALT-P).  Then, press  return
and you should see the AMOS prompt.
\
Once you are hooked up to the Alpha:

After  you  have established comminications and have the AMOS prompt  on
your screen, you are ready to send or receive files.  WXTERM does not do
any terminal  emulation,  so  if  you  try  do do anything that requires
cursor control, it will look really messy.  If you have a program on the
Alpha (like AFFIX or DRIVER) to change terminal  drivers, you can change
to TELTYP.  If you don't do this, it will not cause  any  real problems;
it's just that you may see "trash" from time to time as the  Alpha tries
to  send  commands  like  "bright"  and  "dim" to your terminal.  Simply
ignore this and plow on anyway.
\
Taking a file from the Alpha:

Let's say you want to take the file DSK0:POISON.T[20,20] from the Alpha,
and put a copy on your IBM.  Connect with  the Alpha as described above.
Then, log into DSK0:[20,20].  You can do a DIR  to  make  sure  that the
file  POISON.T is really there.  When you are satisfied that you are  in
the right  account,  and  the  file you want is there, type XMODEM.  You
should now see something like this:

      .XMODEM
      Micro Concepts XMODEM protocol file transfer program.

      (S)end, (R)eceive, (H)elp, or (E)xit?
\
We want the Alpha to SEND us a file,  so  we  type  "S"  followed  by  a
return.   You  will  be asked "What file do you wish to take?".  Type in
the name of the file (POISON.T in our example).  If you don't specify an
extension, "T" will be assumed.  Your screen should now look like this:

      .XMODEM
      Micro Concepts XMODEM protocol file transfer program.

      (S)end, (R)eceive, (H)elp, or (E)xit? S
      What file do you wish to take? POISON.T
      POISON.T is 7243 bytes (57 xmodem blocks).

      Start XMODEM receive, press return when transfer is complete.
\
The Alpha is now ready  to  send your file.  To tell WXTERM to receive a
file, press ALT-R.  WXTERM will  then ask you what you want this file to
be called on the IBM.  Normally, you  would  use the same name as on the
Alpha Micro to avoid confusion.  Type POISON.T  and press return.  Then,
sit back and watch the fun.  WXTERM will display  a continually updating
status  report  on how things are going.  Watch the block  number  being
transferred.  As  our file is 57 xmodem blocks long (according to XMODEM
on the Alpha), it will  count  up to 57 then stop.  WXTERM will tell you
if there are any problems.  Assuming  everything  went  OK,  WXTERM will
tell you to "Press any key".  Go ahead and press any key.  You will then
be  put  back  in communications with the Alpha.  On the Alpha end,  the
XMODEM program is  waiting  for you to press return; telling it that the
file transfer is finished.  Press return, and you will see:

      Transfer complete - no errors.

      (S)end, (R)eceive, (H)elp, or (E)xit?
\
That's all there is to it!  Type "E" and press return to exit the XMODEM
program and get back to the AMOS  prompt.   Then,  if you don't have any
more files to transfer, type ALT-X.  WXTERM will ask  you  if you really
want  to  exit.   Type  "Y" and press return.  You will be back  at  the
MS-DOS prompt.  Of course,  if  you are using a modem, you will probably
want to hang up the modem with ALT-H (or do it yourself manually) before
you exit WXTERM.

Short cut: You may type "S POISON.T"  instead  of  typing  "S" (return),
"POISON.T" (return) to get XMODEM on the Alpha to send the file.
\
Sending a file from the IBM to the Alpha:

Let's  say you send MYFILE.T from your IBM to the Alpha Micro.   Connect
with the Alpha as described above.  Then, log into the account where you
want to  deposit  the  file.  When you are satisfied that you are in the
right account, type XMODEM.   We  want  the Alpha to RECEIVE a file from
us, so we type "R" followed by a return.   You  will be asked "What name
do you wish given to the file?".  Type in the name of the file (MYFILE.T
in  our  example).   If  you  don't specify an extension,  "T"  will  be
assumed.  Your screen should now look like this:

      .XMODEM
      Micro Concepts XMODEM protocol file transfer program.

      (S)end, (R)eceive, (H)elp, or (E)xit? R
      What name would you like given to the file? MYFILE.T
      All set to receive - Please send the file now.
\
The Alpha is now ready to receive  your  file.  To tell WXTERM to send a
file, press ALT-S.  WXTERM will then ask you  for  the  name of the file
you  want  to send.  Type MYFILE.T, and press return.  WXTERM  will  now
give you a status display similar to the one used when receiving a file.
You can watch  the "ACK'd" blocks count up to the "Total Blocks" number.
When they are the  same,  the transfer is complete.  WXTERM will ask you
to "Press any key to continue".   Do that, and you will be communicating
with the Alpha again.  XMODEM on the  Alpha  is now waiting you to press
return to tell it that the file has been transferred.  Press return, and
you will see:

      Transfer complete - no errors.

      (S)end, (R)eceive, (H)elp, or (E)xit?
\
That's all there is to it!  Type "E" and press return to exit the XMODEM
program and get back to the AMOS prompt.  Then,  if  you  don't have any
more files to transfer, type ALT-X.  WXTERM will ask you if  you  really
want  to  exit.   Type  "Y"  and  press return.  You will be back at the
MS-DOS prompt.  Of course, if you are  using  a modem, you will probably
want to hang up the modem with ALT-H (or do it yourself manually) before
you exit WXTERM.

Short  cut: You may type "R MYFILE.T" instead of  typing  "R"  (return),
"MYFILE.T" (return) to get XMODEM on the Alpha to receive the file.
\
Making your terminal work again:

When you  have  finished transferring files, you will need to disconnect
the IBM, and plug your terminal back in.  If your terminal runs at 19200
baud, you will need to type BAUD 19200 on the IBM before you exit WXTERM
and unplug the cable.   Plug the cable back into the terminal, and press
return.  You should now see  the  AMOS  prompt.  If you changed terminal
drivers  at the beginning of the session,  you  should  change  back  to
whatever your terminal requires at this time.
\
Aborting a transfer:

While in SEND or RECEIVE modes, you can press ^X to tell WXTERM to abort
the transfer.   This  may  take  a  few  seconds to take effect, but the
program will stop.  You will then be placed  in  communications with the
Alpha.  Press return, and the Alpha should wake up  and ask you what you
want to do.
\
Lightning hit my IBM during a transfer:

If some drastic thing happens to your IBM while you are doing a transfer
(or if your modem hangs up), you might find that the Alpha won't respond
to  anything you do.  Don't panic.  Press ^X twice, then  press  return.
If that doesn't work, wait 20 seconds then try again.  If you don't type
anything,  XMODEM  on  the  Alpha will eventually give up and wait for a
return to be pressed.  This takes about 3 minutes, so it isn't worth the
wait.
\
WARNING:

Do not, repeat DO NOT "abort", "purge", "nuke" or whatever a job that is
currentlly running XMODEM.  If  you  do,  the system will probably crash
when you try to use that job again.  XMODEM has to do some pretty tricky
fiddling  around  with  your  terminal  in  order  to  get  around  some
shortcomings  in  the  operating system.  This means  that  it  MUST  be
allowed to shut down and  put  things  back to normal.  If you abort the
job,  it will not get to do that, and the  secretary  will  disavow  all
knowlege  of  your  actions.   Also,  other  people  on  the system will
probably be quite upset when it crashes.
\
Using other telecom packages on the IBM:

You  may use a different telecommunications program on the  IBM,  rather
than WXTERM.   The  XMODEM  program  on  the  Alpha  Micro  is a generic
communication  program that will work with most of the telecom  programs
currently available.

A. Sending files to the Alpha

When you send files  to  the Alpha, XMODEM will direct the IBM as to the
specific protocol to be used.   Remember  that  the  Alpha will not take
data into a serial port at speeds over 9600 baud.  Normally, XMODEM will
try to get the IBM to send data using windowed-XMODEM (WXMODEM). If your
package  does  not  support  this, XMODEM will try XMODEM-CRC.   Failing
this, it will drop back to generic XMODEM-CHK.

There are two options that may  be  used  to control the RECEIVE mode on
XMODEM.  If you put "-O" in front of the filename,  XMODEM  will not try
Windowing or XMODEM-CRC, but will start off with XMODEM-CHK.   Try  this
if you can't get anything to work.
\
Another thing you can do is to put "-T" in front of the file name.  This
tells  XMODEM  to  use "TURBO" mode.  Use this only if you are connected
directly, or have an error-free modem connection.  Any error encountered
when receiving a file  in  "turbo" mode will cause the whole transaction
to  be  aborted.  If you are using  WXTERM,  or  your  package  supports
windowed-XMODEM,  don't  use this option.  Windowing is faster, and will
allow errors without aborting the transmission.  Note: This may not work
well with all send programs.  There are definitely problems with most of
the send programs on the Macintosh when using this mode.
\
B. Taking files from the Alpha

When you take files from the  Alpha,  your package will tell XMODEM what
kind of protocol is to be used.  The Alpha can send data as fast as your
receive program can take it; it is not  limited to 9600 baud as it is in
send mode.

The only option available when sending a  file from the Alpha is putting
a "-K" in front of the file name.  This will  cause  XMODEM  to send the
file  in 1024 byte blocks instead of the default 128 byte blocks.   This
speeds  up transfers (assuming your receive program supports 1k blocks).
Some receive  programs can request the "1k" buffers themselves, but most
can not.

If your receive  program  supports  "turbo"  mode,  and does not support
windowed-XMODEM,  you  can  enable  "turbo".   Some packages  call  this
"supercharged mode" or some other zippy sounding  name.  Remember,  that
the connection with the Alpha had better be error-free if you do this.
\
References and such:

WXTERM  is  a  public  domain program which we distribute on our release
disk for your convenience.  It is quite a nice program, but doesn't have
all the bells and whistles of the ones for which you have to pay money.

All protocols used by WXTERM  and  XMODEM  are  public domain protocols.
Peter  Boswell  (TOPPER  on PeopleLink) has put together  quite  a  good
protocol reference manual which discusses XMODEM-CHK, XMODEM-CRC and the
WXMODEM extensions.  This is available from bulletin board networks like
PeopleLink and CompuServe.   Chuck  Forsberg  has also posted an XMODEM,
XMODEM-CRC, YMODEM reference manual on CompuServe.
\
XMODEM Specifications (overly technical mumbo-jumbo):

Following are some specifications on the XMODEM  protocol.  If you are a
non-technical type, feel free to stop reading at this point.

ASCII control codes used:

      Name  Decimal   Hex     Description
      ------------------------------------------------
      SOH     01      01      Start Of Header
      EOT     04      04      End Of Transmission
      ACK     06      06      Acknowledge (positive)
      DLE     16      10      Data Link Escape *
      DC1     17      11      Transmit On (X-ON) *
      DC3     19      13      Transmit Off (X-OFF) *
      NAK     21      15      Negative Acknowledge
      SYN     22      16      Synchronous idle *
      CAN     24      18      Cancel

      * - used in windowed-XMODEM mode only
\
Either  128 byte or 1024 byte blocks may be used.   The  file  may  have
padding characters appende
d to the end of it to make it an even multiple
of 128 bytes.  If 1024 byte blocks are used, the file will not be padded
to 1024;  the  sender  will  revert  to  128 byte blocks to complete the
transfer.

Two different error checking methods are allowed.   XMODEM-CHK (the most
primitive system) employs a 1 byte checksum on the data.  As this is not
very  reliable  for  large  blocks, 1K block mode does not  allow  this.
XMODEM-CRC employs a 2 byte CRC (Cyclic Redundancy Check).  This is much
more reliable than CHK, and is the preferred method.

Receive program:

The receive program initiates  the  transfer by sending NAK to the other
computer.  This NAK is either a regular NAK (denoting XMODEM-CHK), a "C"
(denoting XMODEM-CRC), a "C" followed  by a "K" (denoting XMODEM-1K), or
a "W" (denoting WXMODEM).
\
WXMODEM:
      The receiver will send a "W" and wait 3 seconds for the beginning
      of an XMODEM packet.  This  will  be  repeated 3 times before the
      receiver will drop down to XMODEM-CRC.

XMODEM-CRC:
      The receiver will send a "C" and wait 3 seconds for the beginning
      of an XMODEM packet.  This will be repeated  3  times  before the
      receiver will drop down to XMODEM-CHK.

XMODEM-CHK:
      The receiver will send a NAK and wait 3 seconds for the beginning
      of  an  XMODEM packet.  This will be repeated 4 times before  the
      receiver will "time out" and abort the transfer.


The receiver  will  "time  out"  while waiting for a character (start of
packet, or data) after 15 seconds.   10 timeouts in a row will cause the
transmission to be cancelled.
\
Send program:

The  send  program  will respond to the receive  program  appropriately.
This is a receiver-driven protocol.

The sender will "time  out"  while  waiting for ACK or NAK from receiver
after 15 seconds.  10 timeouts in a row  will  cause the transmission to
abort.

When using WXMODEM, the sender will allow X-OFF.   While waiting for the
subsequent X-ON, the sender will "time out" after 10  seconds and resume
sending data.