%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%                                                           %
% UniTerm Users Guide, Copyright 1986, 1987 Simon Poole     %
%                                                           %
% This file may not be changed without permission, all      %
% rights reserved.                                          %
%                                                           %
% Simon Poole                                               %
% Bahnhofstr. 51 b                                          %
% CH-5430 Wettingen                                         %
% Switzerland                                               %
%                                                           %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\chapter{File Transfer}\index{File Transfer} 
\label{ftref}

\section{General}        

  To change the current file transfer mode use the \button{Transfer}\ menu. 
Changing the file transfer type here, changes the dialog box that 
is displayed when you select \button{File Transfer}\ from the \button{Settings} menu 
and what happens when you type \keytwo{Alt}{T}\ (start file transfer).

  
\section{ASCII File Transfer}\index{ASCII File Transfer}       


\subsection{Using ASCII File Transfer}\index{Using ASCII File Transfer}    


  There is nothing much to say about ASCII  file  transfer,  just 
press  \keytwo{Alt}{T}\ and choose the file you want  to  send.  Pressing 
\key{Help}\ gets you to the Help screen,  so you can change the  delay 
between characters to a different value during an upload (this is 
useful  with  VMS which normally has a lot of  trouble  with  the 
first line sent).  The transfer can be interrupted at any time by 
pressing \mbox{\key{A}.} Normally some experimentation is needed to find the 
shortest  delay  time for your system.  You can use  a  character 
translation table to map incoming characters to Atari characters.  

 To receive  files use the file capture function.  A  translation 
table  is  used  in the same way as with sending files. When file 
capture  is  in effect  the characters are displayed as they will 
be saved.   


\subsection{Setting the ASCII File Transfer Parameters}\index{ASCII File Transfer Parameters}    


The following parameters can be set: 

\begin{description}
\explain{Start of file transfer}{a  string that is sent before  file 
                             transfer starts.}  
\explain{End of file transfer}{a  string  that is  sent  when  the 
                             transfer finishes.}  
\explain{Send}{ determines     if    the     output 
                             translation   table  is  used   for 
                             sending files.}  
\explain{Receive}{determines     if     the     input 
                             translation   table  is  used   for 
                             capturing files.} 
\explain{Delay Time}  
                             {sets   the time [ms] \UniTerm\  waits  
                             after   every character sent  (this 
                             is   implemented  with  the   200Hz 
                             system clock.}  
\explain{Method}{if \button{Paced by Echo}\ is selected,  \UniTerm\  
                             waits for every character sent 
                             to be echoed (except ASCII  control 
                             codes), this doesn't time out!}
\explain{Translate EOL to}{selects    if  \ASCII{CR}\ASCII{LF}\footnotemark is sent  as 
                             \ASCII{CR} \ASCII{LF},  \ASCII{CR},  
                             \ASCII{LF}\ or as \ASCII{SP}\ASCII{CR}.   This  
                             function will send single \ASCII{CR}'s  and 
                             \ASCII{LF}'s correctly!}
\explain{Translation  on  input}{allows you to change the translation
                                 table used during file capture} 
\explain{Translation on output}{enables    you   to    edit     the  
                             translation   table which is used for 
                             sending files,    enter  the 
                             decimal   ASCII  values   of    the  
                             characters   or  nothing   if   you  
                             want  the character to be ignored.}
\end{description}
\footnotetext{The normal Atari ST end-of-line marker.}

\section{XModem/YModem}\index{XModem}\index{YModem}        




\subsection{Using XModem}       


 To receive a file, start the remote XModem and type \keytwo{Alt}{T}. To  
receive  a file select \button{Receive}\ from the dialog box and enter  the 
filename  in the file selector form.  If you have set  the  error 
check  mode to \button{CRC}\ \UniTerm\ will try to initiate a  file  transfer 
with  CRC  error check,  if it gets no response  in  the  maximum 
allowed number of errors, it will retry with the normal checksum. 
To send a file select \button{Send}\ and enter the name of the file in  the 
file selector.   

\subsection{Using YModem Batch}      


  YModem is a version of the XModem protocol with CRC type  block 
check  and  with a batch send/receive protocol  added.  The  file 
length  will  be set to the value received in the  header  block, 
file  date  and time  is  set  to  0  and   the    attribute   to 
000644 (octal) on sending  and  ignored  on receiving.   Filename 
collision  handling  and   wildcard expansion  are  done  on  
receiving/sending a group of files.  

\subsection{Setting the XModem Parameters}\index{XModem Parameters}    


 The following parameters can be set: 

\begin{description}
\explain{Timeout after}{ sets  the  maximum time XModem  waits  for  a 
                   character  to  be received  from  the  serial 
                   port.}  
\explain{Maximum number of errors}
                   {sets the maximum number of errors before  the 
                   file transfer is aborted.}  
\explain{Accept ASCII NUL}{allows you to use XModem for none binary file 
                   transfers,  when ASCII \ASCII{NUL}\ is used as padding 
                   character.}  
\explain{Packet size}{chooses the packet size for XModem transfers, 
                   the  1kB size may be more efficient on  noise 
                   free lines.}  
\explain{Error check type}{sets the default checksum type,  if  possible 
                   use the CRC check for the larger packet size.}  
\end{description}

\section{Kermit}\index{Kermit}        

\subsection{\UniTerm\ Kermit Capabilities}\index{Kermit Capabilities}      


   \UniTerm\ Kermit capabilities at a glance:

\begin{tabbing}{ll}
MMMM\=MMMMMMMMMMMMMMMMMMMMM\=\kill 
   \> Local operation:                 \>  Yes \\
   \> Remote operation:                \>  No  \\
   \> Transfers text files:            \>  Yes \\
   \> Transfers binary files:          \>  Yes \\
   \> Wildcard send:                   \>  Yes \\
   \> \Caret X/\Caret Y interruption:   \>  No \\
   \> Filename collision avoidance:    \>  Yes \\
   \> Can time out:                    \>  Yes \\
   \> 8th-bit prefixing:               \>  Yes \\
   \> Repeat count prefixing:          \>  Yes \\
   \> Alternate block checks:          \>  Yes \\
   \> Terminal emulation:              \>  Yes (\UniTerm) \\
   \> Communication settings:          \>  Yes (\UniTerm) \\
   \> Transmit BREAK:                  \>  Yes (\UniTerm) \\
   \> IBM mainframe communications:    \>  Yes \\
   \> Transaction logging:             \>  No  \\
   \> Session logging:                 \>  No  \\
   \> Act as server:                   \>  No  \\
   \> Talk to server:                  \>  Yes \\
   \> Advanced server functions:       \>  No  \\
   \> Advanced commands for servers:   \>  Yes \\
   \> Local file management:            \>  Yes \\
   \> Handle file attributes:          \>  Yes\footnotemark \\
   \> Command/init files:              \>  Yes (\UniTerm) \\
   \> Command macros:                  \>  Yes (\UniTerm) \\
   \> Large packets:                   \>  Yes \\ 
   \> Windows:                         \>  No  \\
\end{tabbing}
\footnotetext{``Handle'' is the wrong word, all attribute types except
the file size are ignored}

Please  don't  forget if you miss a feature,  that \UniTerm\  is  a 
terminal emulator and not a ``real'' Kermit (whatever that maybe).

\subsection{Simple File Transfer}     

  To  receive a file,  type the correct command  for  the  remote 
Kermit and type \keytwo{Alt}{T}\ on the ST keyboard,  a large dialog  box 
should appear. Select \button{Receive}\ if you want to use a different name 
than the original filename use the file selector form to select a 
name (this will only effect the first file received in a  mutiple 
file transfer).  If you want to receive the files with the  names 
supplied  by the host,  just press \key{Return}\ (the path entered  is 
retained till the end of your \UniTerm\ session).  A new form  will 
appear  and  will display the current file  being  received,  the 
total  number  of  packets,  the current  number  of  errors  and 
timeouts and the last non-fatal error that occurred.  The transfer 
can be aborted by typing \keytwo{Control}{C}.



 To send a single file or a group of files, setup the remote host 
for receiving,  type \keytwo{Alt}{T}\ and select \button{Send}. Enter the filename 
or  wildcards  (*,  ?)  in the file  selector  dialog  and  press 
\key{Return}.  

\subsection{Binary File Transfer}\index{Binary File Transfer}     

  Set  both sides (host and local computer) to binary  mode   (on 
most mainframes with {\tt set file type binary} or {\tt set file binary}, 
select the \button{Binary}\ button on \UniTerm),  if you have set  parity 
to  none  and have selected 8 data bits,  binary  files  will  be 
transferred without 8th-bit prefixing; in all other cases 
prefixing  will be used (be sure that the parity is the  same  on 
the complete connection to the remote computer).  One note, since 
the  Kermit ``end of record'' is the same as the TOS ``end of  line'' 
no  translation  of \ASCII{CR}'s or \ASCII{LF}'s is done,  this may  lead  to 
problems if you have a file on the ST which uses \ASCII{LF}\ as ``end  of 
line'' marker.  

\subsection{Server Commands}\index{Server Commands}      


 This is probably the simplest way to use Kermit,  connect to the 
remote host and start the remote Kermit in server mode.  A  large 
subset of the possible Kermit server commands is implemented (not 
implemented: Journal, Who, Variable):


\begin{tabular}{lp{3in}}
   Put & send a file to the host. \\
   Get & receive a file from the host. \\
   Finish & terminate the remote Kermit. \\
   Logout & terminate the remote Kermit and logout. \\
   Dir &  send  a  directory  to the local  Kermit  and  have  it 
    displayed on the screen (argument: file-spec). \\
   Remote & send a command to the remote host (argument: commandline). \\
   Type &  send a file to the local Kermit and display it on  the 
    screen (argument: file). \\
   CWD &  change  the  current working directory  of  the  remote 
   Kermit (arguments: directory, password). \\
   Usage & show disk usage (argument: area). \\
   Program &  start  a program on the host  computer  (arguments: 
    program-file, program-commands). \\
   Erase & delete a file on the host computer (argument: file). \\
   Copy &  copy a file on the host computer  (arguments:  source, 
    destination). \\
   Rename &  rename  a  file on  the  host  computer  (arguments: 
    oldname, newname). \\
   Login &  login on a remote Kermit in server  mode  (arguments: 
    user, password, account). \\
   Help & get help from the remote host (argument: topic). \\
   Status & get the current status of the server. \\
\end{tabular}

For more information consult the ``Kermit Protocol Manual''. 




\subsection{Setting the Kermit Parameters}\index{Kermit Parameters}    


   The following parameters can be set:


\begin{description}
\explain{Timeout after}
    {sets  the  maximum time Kermit waits for a character  to  be 
    received from the serial port.}
\explain{Maximum number of retries}
    {the  maximum  number of re\-tries before  the  transmission  is 
    aborted.}
\explain{Number of padding characters}
     {the number of padding characters sent before each packet.}
\explain{Packet size}
    {the  maximum  packet  size you want  to  use  (maximum  size 
    without large packets is 94 bytes, with 2048).}
\explain{Quote character}
     {the ASCII character used for control character quoting.}
\explain{8 bit quote character}
     {the ASCII character used for 8th-bit quoting.}
\explain{Repeat prefix character}
     {the character used for repeat prefixing.}
\explain{Padding character}
     {the character used for padding.}
\explain{Start of packet}
     {the character that marks the start of a Kermit packet.}
\explain{IBM mode}
    {wait for a \ASCII{XOn}\ character before sending a packet (XOn/XOff 
    flowcontrol\index{flowcontrol}  naturally has to be turned off  for  this  to 
    work).}
\explain{Error check type}
     {two and single character checksum and CRC check.}
\end{description}


Normally  you shouldn't have to change any of  these  parameters, 
please consult the Kermit literature for more details.

