Introduction
Kermit is an older, but common, file transfer protocol for moving a file from one system to another over a currently open communications channel. Similar to Zmodem file transfer, kermit can run on most any host, over serial or TCP/IP. Kermit binaries and sources are available for most UNIX hosts from the Columbia University Kermit Project, and it's FREE!
Anzio Lite supports kermit auto-reception and AnzioWin support kermit send and receive functions. While kermit is not the fastest means of transferring files, it is common on most systems and again, virtually free to use.
Kermit commands
There are many options available to Kermit on the UNIX system. See the documentation available at the Columbia University Kermit Project site and the many Kermit White Papers. Anzio will respond to those options that influence the remote end of the connection as it should. However, it is important to note that many commands in kermit influence only the local host's behavior.
Some implementations of Kermit create a file in the users home directory on the host called ".kermrc". This file contains global defaults that affect the way Kermit behaves. Check the options in this file to know how Kermit defaults are defined. A typical ".kermrc" file looks like:
set file type bin
set file name lit
set rec pack 1000
set send pack 1000
set window 5
set prompt Linux Kermit>
Note: The ".kermrc" file may be the culprit in preventing Kermit from behaving correctly. If you can not get Kermit to work, try renaming the ".kermrc" file and try your transfer again. The global variables that get set may not work properly for your current connection type or host.
Some basic instructions are as follows. Refer to your Kermit documentation for additional commands and explanations.
ParityIf your UNIX system is set for even parity, you will need to set up Kermit that way too. To do this do the following on startup:
kermit -p e
or once in Kermit, enter
Text vs. Binaryset parity even
UNIX Kermit must know the file type being transferred. The two file types are TEXT (Kermit will translate UNIX files with linefeeds to DOS type files with carriage-return linefeed) or BINARY (no translation takes place). This is set by doing a
set file type text
or
Server Modeset file type binary
For less confusion, we recommend putting Kermit in to "server" mode. At the Kermit prompt, enter:
server
Then you can give it commands using Anzio's Kermit commands. To take it out of "server" mode, give it the Anzio Kermit command of "finish".
AnzioWin commands
While Anzio Lite supports only Kermit auto-reception, AnzioWin supports a limited set of kermit commands. Through the "Transfer : Kermit : Send", the "Transfer : Kermit : Receive" and the "Transfer : Kermit : Command" dialogs you can give AnzioWin Kermit commands to control how the transfer will work. Some of these commands get passed along to a host running Kermit in Server mode. The basic set of available commands are (refer to the Kermit documentation for a further explanation of each command:
kermit |
Issue a command to Kermit in "server" mode |
cwd |
Create a new directory |
directory |
List a directory |
erase |
Erase a file |
finish |
Quit Kermit "server" mode |
help |
Get Kermit Help from "server" |
login |
Log in to host through Kermit |
journal |
Start a journal |
copy |
Copy a file |
logout |
Log out of host through Kermit |
message |
Send a message through Kermit |
program |
Run a program through Kermit |
query | Query Kermit settings |
rename |
Rename a file |
type |
Type (list) a file |
Scripting a Kermit file transfer
As with most commands within AnzioWin (and many in Anzio Lite), you can send commands from the host to control the behavior of certain Anzio functions. This include Kermit file transfer. The following two scripts are simply basics of setting up a UNIX shell script to perform a Kermit file transfer. Refer to our pages on Scripting Anzio Commands for more information.
Sending From The HostReceiving To The Hostclear
printf "Rasmussen Software, Inc. Kermit Send Thru AnzioWin\n"
printf " Transfer File: $1 into c:\\\temp \n"
printf "\034log c:\\\temp \035 \n"
kermit -s $1
clear
printf "Rasmussen Software, Inc. Kermit Receive Thru AnzioWin\n"
printf " Transfer File: $1 into c:\\\temp \n"
printf "\034ksend $1\035 \n"
kermit -r
Setting an Anzio macro to do a Kermit file transfer
It is also possible to do a Kermit file transfer through a macro on the PC. The following defined key is an example of this (refer to our page on user-defined macros in AnzioWin).
define k kermit -C "server"|F6kcommand set file names literal|
F6kcommand send test.txt.new|F6kcommand finish|
all entered on one line within the "Function" line of Anzio. To get to the "Function" line, press Ctrl-Shft-f. From a shell prompt on the UNIX, run the defined key "k" by pressing Ctrl-F1 and the letter "k".