Open topic with navigation
V+ Language User's Guide, 17.x
Kermit Communication Protocol
The Kermit protocol is an error-correcting protocol for transferring sequential files between computers over asynchronous serial communication lines. This protocol is available as an option to the Adept V+ system.
Kermit is nonproprietary and was originally developed at Columbia University. Computer users may copy Kermit implementations from one another, or they may obtain copies from Columbia University for a nominal charge.1
The following information is not intended to be a thorough description of Kermit and its use. You should refer to the Kermit User Guide and the Reference Kermit Protocol Manual (both available from Columbia University) for more details on implementation and operation of the Kermit protocol.
The Adept implementation of Kermit can communicate only with a server (see the Kermit User Guide for a definition of terms). The following material describes use of Kermit from the V+ system. In addition to this information, you will need to know how to perform steps on your computer to initiate the Kermit protocol and access disk files.
When the V+ implementation of the Kermit protocol is enabled, it makes use of one of the general-purpose USER serial lines on the Adept system controller. For a serial line to be used with Kermit, the line must have been configured using the Adept controller configuration program.2
Starting a Kermit Session
This section will lead you through the steps involved with initiating a Kermit file transfer session using Kermit with the V+ system. The term remote system is used in this discussion to refer to the computer system that is to be accessed with Kermit.
NOTE: The following information should be considered an example. The specific details may not be correct for the computer system you are accessing with Kermit.
The first step is to start up a Kermit server on the remote system. One way to do this is to go into pass-through mode on the V+ system by typing the monitor command:PASSTHRU KERMIT
The system terminal is now connected directly to the serial line to the remote system: Anything you type at the system terminal (except Ctrl+C and Ctrl+P) is sent directly to the remote system.
If you cannot get any response from the remote system at this point, there is probably a problem with the serial line connection. A common problem is a mismatch of baud rates or other communication characteristics, or a bad serial line connection. Previous experience is helpful in solving such problems.
Once you are able to communicate with the remote system, you may have to log onto the remote system. After you have reached the point of being able to enter commands to the system, the Kermit program may be started simply by typing:KERMIT
or a similar command appropriate to the operating system of the remote computer.
The Kermit program starts up in its command mode, with a prompt such as:C-Kermit>
You may then enter commands directly to the Kermit program. For example, you may want to enter commands to initialize various parameters in preparation for communication with the V+ Kermit. For instance, you may type:SET FILE TYPE TEXT
to initialize the remote file type to ASCII. (The actual syntax needed for these commands will depend on the remote system. Refer to that system's user guide. Most Kermit programs are equipped with help facilities that can be invoked by typing HELP or a question mark [?].)
After successfully initializing the desired parameters, the Kermit server can be started by typing:SERVER
The remote server starts up and typed a short message about basic server usage. This message may not be applicable to use of Kermit communications with the V+ system. Whenever the instructions for handling and terminating the server differ from those in this manual, the instructions in this manual should be followed.
At this point, you should escape back to the (local) V+ system by typing a Ctrl+C to terminate the PASSTHRU command.
NOTE:A Ctrl+C may be typed at any time while in PASSTHRU mode to escape back to the local system. This implies that you will not be able to send a Ctrl+C to the remote system. If the remote system uses Ctrl+C for special purposes (for example, the DEC VAX/VMS system uses it to interrupt operations), you will have to use some other means to achieve those special purposes.
Most Kermit servers cannot be aborted or terminated, except by a special communication packet. In order to terminate the remote server when communicating with a V+ system, you must go into PASSTHRU mode as described earlier. Then, when a Ctrl+P is typed, a special packet of information is sent to the remote server that causes it to terminate. After this is achieved, the remote Kermit program returns to command mode and displays its command prompt. You may then exit Kermit and log off the remote system.
File Access Using Kermit
After the remote Kermit server has been initiated, you are ready to use the Kermit line for file access. In general, to access a file via Kermit with the V+ system, all you have to do is specify the KERMIT> physical device in a normal V+ file-access command or instruction. For example, the command:LOAD K>file_spec
loads (from the remote system) the programs or data contained in the specified file. The file specification may be a simple file name, or it may contain device and directory information. The actual interpretation of the file specification depends on the remote Kermit server as well as on the type of remote system being used.
You may also use the V+ DEFAULT command to define the default disk device to be the Kermit line. For example, you can enter:DEFAULT = K>directory/
In this command, K> tells the V+ system it should access the Kermit device (when the local disk device is not explicitly specified), and directory represents directory information to be used as the default in subsequent file specifications.
After the above DEFAULT command is entered, the command:LOAD file_name
loads a program or data file from the Kermit line.
It is also possible for a V+ program to READ and WRITE to remote sequential files over the Kermit line. To do that, the program has to perform the following steps:
- ATTACH a disk logical unit, specifying the physical device KERMIT (explicitly or via the current default).
NOTE: Only one logical unit in the entire V+ system can be attached to the KERMIT physical device at any one time. An attempt to perform a second attachment will result in the error *Device not ready*.
FOPEN_ the desired file on that logical unit (if the file is open in fixed-length-record mode as long as the length is less than about 90).
READ or WRITE variable-length records using that logical unit.
The following V+ commands and instructions can be used to access files with Kermit:
FCOPY FOPEND STORE STORES FDELETE FOPENR STOREL VLOAD FLIST FOPENW STOREP VSTORE FDIRECTORY LOAD STORER
VLOAD and VSTORE can be used with Kermit only in binary mode.
The specific commands for the remote system will depend on the system you are using.
Disk files created by the V+ system are called ASCII files because the files contain only ASCII characters. V+ application programs (and other computers) can create non-ASCII disk files, which contain information that is not interpreted as ASCII characters. Such files are often called binary files.
When Kermit is transferring normal text (ASCII) files, the file contents are not adversely affected if the eighth bit of a byte is corrupted. For example, the serial line hardware would affect the eighth bit if parity checking is enabled, since that bit is used for the parity information.
However, when binary files need to be transferred, the eighth bit of each byte must be preserved. Thus, the serial line parity must be set to no parity (that is, the serial ports on both the V+ system and the remote system must be set). Also, the Kermit file mode must be set to binary.
The parity mode for the V+ serial ports is set with the Adept controller configuration program (CONFIG_C). You may be able to set the modes on the remote system by performing the following steps:
Go into PASSTHRU mode at the V+ system terminal.
Enter a command to the remote system to exit the Kermit program (it may first be necessary to terminate the server by typing Ctrl+P).
Enter a command to the remote system to set the terminal mode to no parity.
Enter a command to the remote system to restart the Kermit program.
Enter a command to the remote Kermit to set its file mode to binary. For example:SET FILE TYPE BINARY
Enter a command to Kermit to start the remote server.
Type Ctrl+C to escape back to the (local) V+ system.
When a binary file is accessed over the Kermit line, the file specified to V+ must have a /B qualifier. For example, the following command copies the file REMOTE.DAT from the Kermit line to the local disk drive A:FCOPY A:local.dat = K>remote.dat/B
NOTE: If the default setting for the remote system's serial line is other than no parity, and there is no way you can change that setting, it will not be possible to successfully transfer binary files using Kermit. An ASCII file may be accessed as a binary file, but not vice versa. A file that is transferred back and forth over the Kermit line must be transferred in the same file mode each time. For example, if a file is copied in binary mode from the remote system to the V+ system, then it must be copied back to the remote system in binary mode in order to preserve the file contents.
Kermit Line Errors
The error *Nonexistent file* is common when using Kermit. This error could mean any of several things in addition to the inability to find the desired file on the remote system (the command FDIR K> will verify the contents of a remote directory). The transactions over the Kermit line are generally considered to be file transfers. When the V+ system tries to start a file operation, the local Kermit driver generally tries to open a file on the remote server. If this operation fails, V+ returns the error *Nonexistent file*. Among the things that could possibly cause this error are: mismatched line settings (like baud rate and parity), unexpected server state (the server didn't terminate the previous transaction as expected), the server was not started correctly, or the file may really not exist.
NOTE:When an error occurs that is associated with the use of Kermit, it sometimes helps to perform the following steps to make sure the remote server is in a known state: (1) enter PASSTHRU mode, (2) stop the remote server by typing Ctrl+P several times, and (3) restart the remote server. If a Kermit file access is aborted by the user (for example, Ctrl+C is typed to abort a V+ monitor command), it may take five seconds for the abort request to be processed.
System Parameters for Kermit
Two V+ system parameters are provided for setting communication parameters for the Kermit protocol.
The parameter KERMIT.TIMEOUT sets the amount of time that the remote server is to wait for a response from the V+ system before the remote server declares a time-out error and retransmits its previous message. This parameter should be set to a high value (less than or equal to 95 seconds) when V+ READ or WRITE instructions performed on the Kermit line are far apart, that is, when there are long pauses between disk requests. (This can occur, for example, when the V+ program is being executed in single-step mode with the program debugger.)
The parameter KERMIT.RETRY is the number of errors and retransmissions that are allowed by the local V+ Kermit. When this number of errors is exceeded, the error *Too many network errors* will occur. When this parameter is set to a large value (less than or equal to 1000), the equivalent parameter for the remote server must be set to the same value. Otherwise, the settings will not be effective.
1Kermit documentation and software are available from:
Columbia University Center for Computing Activities
612 West 115th Street
New York, NY 10025 (USA)
Web site: http://www.columbia.edu/kermit/
2Only one line can be configured at any one time for use with Kermit. The controller configuration program is in the file CONFIG_C.V2.
Submit comments to: email@example.com
Last modified on: 6/24/2014
Copyright © 1994 - 2014. Adept Technology, Inc.