Path: utzoo!utgpu!water!watmath!clyde!rutgers!sunybcs!bingvaxu!leah!emb978 From: emb978@leah.Albany.Edu ( Eric M. Boehm) Newsgroups: comp.sys.ibm.pc Subject: Re: Request for Kermit 2.30. Summary: Docs for Kermit-MS 2.30, Part 3 of 6 Message-ID: <576@leah.Albany.Edu> Date: 23 Jan 88 21:49:44 GMT References: <20064@amdcad.AMD.COM> <574@leah.Albany.Edu> <575@leah.Albany.Edu> Organization: The University at Albany, Computer Services Center Lines: 1001 ------------------------------------------------------------------------------- CWD Changing of directories, disabled entirely. DEL Deletion of files confined to current directory. DIR Production of directory listings confined to current directory. FIN Shutting down the server (applies also to BYE) disabled entirely. GET Getting files from the server confined to current directory. HOST Execution of all REMOTE HOST (DOS) commands disabled entirely. SEND Forces files sent to server into current directory. SPACE Asking the server for a disk space report, disabled. TYPE REMOTE TYPE files confined to current directory. ALL All of the above. TEK Automatic invocation of Tektronix graphics mode by host commands. This function is not related to server mode, and is not included in the ALL term. For reasons which should be obvious, the Kermit server does not provide a REMOTE ENABLE command! The GET Command Syntax: GET remote-filespec The GET command requests a remote Kermit server to send the file or file group specified by remote-filespec. This command can be used only when Kermit-MS has a Kermit server active on the other end of the connection. This means that you must have CONNECTed to the other system, logged in, run Kermit there, issued the SERVER command, and escaped back (e.g. "^]C") to the local Kermit-MS (or, in the case of LAN operation, a Kermit server must be running somewhere on the network). If the remote Kermit does not have a SERVER command, then you should use SEND and RECEIVE as described above. You may use the GET command in a special way to specify a different name for storing the incoming file. Just type GET alone on a line, and you will be prompted separately for the remote filespec and the local filespec: Kermit-MS>get Remote Source File: com1 txt Local Destination File: a:xcom1.txt The local file name may contain a device field, and/or a directory specifica- tion. Device and directory specifications in the local destination file name work the same way as in the RECEIVE command. The remote filespec is any string that can be a legal file specification for the remote system; it is not parsed or validated locally. It can contain whatever wildcard or file-group notation is valid on the remote system. Once the file transfer begins, the GET command behaves exactly like the RECEIVE command. Warning: If the remote filespec is to contain a semicolon, and the GET command is being issued from a TAKE command file, you must prefix the semicolon with a backslash. Otherwise, all characters beginning with the semicolon will be ig- nored: get me.home\;0 1.6.7. Commands for Controlling Remote Kermit Servers The BYE, FINISH, and LOGOUT commands allow you to shut down a remote Kermit server: BYE When communicating with a remote Kermit server, use the BYE command to shut down the server, log out its job, and exit locally from Kermit-MS to DOS. On local area networks, BYE also terminates the network ses- sion. FINISH Like BYE, FINISH shuts down the remote server. However, FINISH does not log out the server's job. You are left at Kermit-MS prompt level so that you can connect back to the job on the remote system. On local area nets, FINISH shuts down the MS-Kermit server, but in a way that allows it to be restarted as if no interruption had occurred. LOGOUT The LOGOUT command is identical to the BYE command, except you will remain at Kermit-MS prompt level, rather than exit to DOS, so that you can establish or use another connection without having to restart MS-Kermit. The REMOTE Commands The REMOTE keyword is a prefix for a number of commands. It indicates that the command is to be performed by a remote Kermit server. Not all Kermit servers are capable of executing all of these commands, and some Kermit servers may be able to perform functions for which Kermit-MS does not yet have the correspond- ing commands. In case you send a command the server cannot execute, it will send back a message stating that the command is unknown to it. If the remote server can execute the command, it will send the results, if any, to your screen. Here are the REMOTE commands that Kermit-MS may issue: REMOTE CWD [directory] Ask the server to Change your Working Directory on the remote host, that is, the default source and destination area for file transfer and management. You will be prompted for a password, which will not echo as you type it. If you do not supply a password (i.e. you type only a carriage return), the server will attempt to access the specified directory without a password. If you do not supply a directory name, your default or login directory on the remote system will be assumed and you will not be prompted for a password. REMOTE DELETE filespec Ask the server to delete the specified file or files on the remote sys- tem. In response, the server may display a list of the files that were or were not successfully deleted. REMOTE DIRECTORY [filespec] Ask the server to display a directory listing of the specified files. If no files are specified, then the list should include all files in the current working directory. REMOTE HELP Ask the server to list the services it provides. REMOTE HOST [command] Ask the server to send the command to the remote system's command processor for execution. REMOTE KERMIT command Send the command to the remote Kermit for interpretation as a Kermit command in the remote Kermit server's own command syntax. Most Kermit servers, including Kermit-MS, do not yet recognize REMOTE KERMIT com- mands. REMOTE SEND message Send the one line message to be displayed on the Server's screen. REMOTE SPACE [directory] Ask the server to provide a brief summary of disk usage in the specified area on the remote host or, if none specified, the default or current area. REMOTE TYPE filespec Ask the server to display the contents of the specified remote file or files on your screen. REMOTE WHO [who-spec] Ask the server to list actively logged on users; optional who-spec qualifies the list and uses the syntax of the server system. 1.6.8. The LOG and CLOSE Commands Syntax: LOG {PACKET, SESSION} [filespec] CLOSE LOG SESSION specifies that your terminal session during CONNECT will be recorded in the indicated file (whose name defaults to KERMIT.LOG in the cur- rent directory), with any input character translations applied according to SET TRANSLATION INPUT. The filespec may include a device specification and/or directory path. The LOG SESSION command allows you to "capture" files from a remote system that doesn't have Kermit, as well as to record remote typescripts. LOG PACKET causes the log file to record all packets in file ex- changes (DEBUG need not be set ON). Both kinds of logging can be active simul- taneously but only one filename can be specified -- everything goes to the same log file. The log is closed when you EXIT from Kermit-MS or when you issue an explicit CLOSE command. If the log file already exists then new material is appended to it. Try not to delete an open log file (CLOSE it first) because DOS will become confused. During terminal emulation, the LOG command records all the characters that ar- rive from the remote host in the specified file, including escape sequences. If you have SET LOCAL-ECHO ON, it will also record the characters you type. Logging may be suspended and resumed within a terminal session with the CONNECT escape-level commands Q and R. The log file will be composed of 7-bit ASCII bytes if (a) PARITY is other than NONE, or (b) DISPLAY is SET to 7. If DISPLAY is 8 and PARITY is NONE, or if DEBUG is ON, then the log will contain 8-bit bytes. You may LOG PRN to cause the logging information to be printed directly on your printer. Any escape sequences that are sent to the screen are also sent to the printer. If you want to record information without imbedded escape sequences, use the screen dump feature, invoked by the CONNECT escape-level command F, which is described under the CONNECT command. A session log cannot be played back directly on the PC from the log file. To relive the session, you must transfer it to the remote system and display it in "binary mode" (e.g. cat in Unix) which CONNECTed. 1.6.9. The SET Command Syntax: SET parameter value -or- SET parameter parameter value The SET command establishes or modifies parameters for file transfer or ter- minal connection. You can examine their values with the STATUS command. The following SET commands are available in Kermit-MS: BAUD Communications port line speed (synonym for SPEED) BELL Whether to beep at the end of a transaction BLOCK-CHECK-TYPE Level of error checking for file transfer DEBUG Display packet contents during file transfer DEFAULT-DISK Default disk drive for file i/o DELAY Wait number seconds before Sending a file DESTINATION Default destination device for incoming files DISPLAY For selecting the type of file transfer display DUMP Screen dump file (or device) name END-OF-LINE Packet termination character EOF Method for determining or marking end of file ESCAPE Escape character for CONNECT FLOW-CONTROL Enable or disable XON/XOFF HANDSHAKE Half-duplex line turnaround option INCOMPLETE What to do with an incompletely received file INPUT Behavior of INPUT command for scripts KEY Specify key redefinitions LOCAL-ECHO Specify which computer does the echoing during CONNECT MODE-LINE Whether to display a mode line during terminal emulation PARITY Character parity to use PORT Select a communications port PROMPT Change the "Kermit-MS>" prompt to something else RECEIVE Request remote Kermit to use specified parameters REMOTE For running Kermit-MS interactively from back port RETRY Packet retransmission threshold SEND Use the specified parameters during file transfer SPEED Communications port line speed (synonym for BAUD) TAKE-ECHO Control echoing of commands from TAKE files TERMINAL Emulation and parameters TIMER Enable/disable timeouts during file transfer TRANSLATION Enable/disable/specify conversion of arriving characters WARNING Specify how to handle filename collisions The SET commands are now described in detail, in alphabetical order. SET BAUD Syntax: SET BAUD number Set the speed (in bits per second, commonly called baud) of the currently selected terminal communications port (COM1 by default) to 300, 1200, 1800, 2400, 4800, 9600, or other common speed, and on the IBM PC family, higher speeds including 19200, 38400, 57600, and 115200. Both connected systems, as well as any intervening communication equipment, must be able to support the specified baud rate, and both systems should be set to the same baud rate. Some implementations do not support the SET BAUD command. But Kermit-MS leaves the current communication port settings alone unless you issue explicit SET commands to change them, so you may use MODE or other DOS programs to establish the desired settings before running Kermit. On certain systems, when you first run Kermit after powering the system up, you may get a message "Unrecognized baud rate". This means that Kermit tried to read the baud rate from the port and none was set. Simply use SET BAUD (if available) or the DOS MODE command to set the desired baud rate. SET SPEED is a synomym for SET BAUD. SET BELL Syntax: SET BELL {ON, OFF} Specifies whether the bell (beeper) should sound upon completion of a file transfer operation. Normally ON. SET BLOCK-CHECK-TYPE Syntax: SET BLOCK-CHECK-TYPE {1, 2, 3} Selects the error detection method: a 1-character 6-bit checksum (the normal case), a 2-character 12-bit checksum, or a 3-character 16-bit cyclic redundancy check (CRC). If the other Kermit program is not capable of type 2 or 3 check- ing methods, automatic fallback to type 1 will occur. The more secure type 2 and 3 block checks take essentially no more execution time than the simple 1 character checksum. SET BLOCK 3 is a stronger check than SET BLOCK 2. SET BLOCK 2 or 3 is recommended for use with long packets (see below), noisy com- munication lines, binary (8-bit data) files, and text files containing critical data (budgets, grades, etc). SET DEBUG Syntax: SET DEBUG {PACKET, SESSION, ON, OFF} With DEBUG PACKET, Kermit will display packet traffic on your screen during file transfer. With the normal file transfer display, regular-length packets sent and received are displayed in fixed-size slots. The display of extended-length packets, however (see SET RECEIVE PACKET-LENGTH), tends to overlap. If this bothers you, then also SET DISPLAY SERIAL, or LOG the packets rather than displaying them. With DEBUG SESSION, during terminal emulation (on the IBM PC, Rainbow, and a few others), control characters are displayed in uparrow ("^") notation and characters with the 8th bit set are preceded by the tilde ("~") sign, and your session log (if any) will record 8-bit bytes, rather than 7-bit ASCII, regard- less of SET DISPLAY or SET PARITY. Character translation (SET TRANSLATION INPUT) is not done during session debugging. The effect of SET DEBUG SESSION during terminal connection can be disconcerting, but it gives you a convenient line monitor equivalent to a specialized device that costs several thousand dollars, and it can prove very handy for tracking down data communication problems. SET DEBUG ON turns on both SESSION and PACKET debugging, and SET DEBUG OFF turns them both off. SET DEFAULT-DISK Syntax: SET DEFAULT-DISK x: Specify the default disk drive to use for file transfer, directory listings, and so forth. Equivalent to typing the DOS command for changing disks (A:, B:, etc). Affects Kermit and all inferior processes, but when you exit from Ker- mit, you will still have the same default disk as when you entered. SET DELAY Syntax: SET DELAY number Wait the specified number of seconds before starting a file transfer. Intended for use when the other side needs appreciable time to become ready, such as rearranging cables, changing programs, etc., or when MS-DOS Kermit is the remote Kermit (e.g. after CTTY COM1, SET REMOTE ON). The number is 0 to 63 seconds, normally 0. SET DESTINATION Syntax: SET DESTINATION {DISK, PRINTER, SCREEN} SET DESTINATION PRINTER will cause incoming files to be sent directly to the printer; SCREEN will send output normally destined for the disk to the screen. The normal destination is DISK. SET DESTINATION affects only files transferred with SEND, GET, or RECEIVE; it cannot be used to reroute the output from REMOTE server commands. SET DISPLAY Syntax: SET DISPLAY {QUIET, REGULAR, SERIAL, 7-BIT, 8-BIT} During file transfer, MS-DOS Kermit's regular display is a formatted screen whose fields are randomly updated with file names, packet numbers, error counts, percent done, error messages, and so forth. If you wish to run Kermit-MS interactively through the back port, for instance after the operator has done CTTY COM1, you must give the command SET REMOTE ON (which, currently at least, is equivalent to SET DISPLAY QUIET); this sup- presses the file transfer display screen, so that the display won't interfere with the file transfer itself. You can also use this command to suppress the display in local mode, in case you are using a system that allows you to do other work while file transfer proceeds in the background. If you have your PC connected to a speaking device (a common practice for visually impaired people), or you are logging the display screen to a printer (using DOS ^P or kermit > prn), the random nature of the regular display will make the results of little use. SET DISPLAY SERIAL is provided for this pur- pose; it causes the program to report progress "serially" on the screen. In serial mode, error messages are preceeded with the word "Error" and repeat mes- sages with the word "Retry". Packets are numbered as dots with every tenth be- ing a plus sign. The packet display is automatically broken across lines at every 70th packet. The serial display makes much more sense when spoken than does the regular display. The serial display does not show the percent and kilobytes transferred. It is the default display style for generic MS-DOS Kermit; REGULAR is the default for all others. The last two parameters, 7-BIT and 8-BIT, control the size of characters sent to the screen during terminal emulation. 7-BIT is the default and includes all ASCII characters. 8-BIT is useful with national and line drawing characters. SET DUMP Syntax: SET DUMP filespec On those systems that support this feature, change the file or device name of the screen dump file. The normal file name is KERMIT.SCN. See the section on terminal emulation for details about screen dumps. If the specified file al- ready exists then new material is appended to old. SET END-OF-LINE Syntax: SET END-OF-LINE number If the remote system needs packets to be terminated by anything other than car- riage return, specify the decimal value, 0-31, of the desired ASCII character. Equivalent to SET SEND END-OF-LINE (SET END-OF-LINE is kept only for historical reasons, and the parameter really should be called END-OF-PACKET anyway.) SET EOF Syntax: SET EOF {CTRL-Z, NOCTRL-Z} Controls how the end of file is handled. CTRL-Z specifies a Control-Z charac- ter should be appended to the end of an incoming file, unless it already ends with a Control-Z. Certain MS-DOS text editors and other applications require files to be in this format. For outbound files, treat the first Control-Z as the end of the local file, and do not send it or any subsequent characters. NOCTRL-Z is the default; incoming files are stored, and MS-DOS files are sent, exactly as is, in their entirety. SET ESCAPE Syntax: SET ESCAPE character Specify the control character you want to use to "escape" from remote connec- tions back to Kermit-MS. On most systems the default is "^]" (Control- Rightbracket), which was chosen because it is a character you would otherwise rarely type. The character is entered literally after SET ESCAPE or in backslash number form (\29), and should be chosen from the ASCII control range. It is not possible to use non-ASCII characters (like function keys) for this purpose (but see SET KEY for a way around this restriction). SET FLOW-CONTROL Syntax: SET FLOW-CONTROL {XON/XOFF, NONE} Specify the full duplex flow control to be done on the currently selected port. The options are XON/XOFF and NONE. The specified type of flow control will be done during both terminal emulation and file transfer. By default, XON/XOFF flow control is selected. XON/XOFF should not be used on half-duplex (local echo) connections, or with other systems that do not support it. If XON/XOFF is used, HANDSHAKE should be set to NONE. SET HANDSHAKE Syntax: SET HANDSHAKE {CODE number, BELL, CR, LF, NONE, XOFF, XON} Specify any half-duplex line turnaround handshake character to be used during file transfer on the currently selected port. The CODE number form allows any ASCII character to be specified by its decimal ASCII code. Handshake is NONE by default; if set to other than NONE, then FLOW-CONTROL should be set to NONE. In operation the handshake character is sought at the end of each received packet, following the normal END-OF-LINE character, but is not sent for out- going packets. SET INCOMPLETE Syntax: SET INCOMPLETE {DISCARD, KEEP} Specifies what to do with files that arrive incompletely: discard them or keep them. They are normally discarded. SET INPUT Syntax: SET INPUT {CASE, DEFAULT-TIMEOUT, ECHO, TIMEOUT-ACTION} SET INPUT controls the behavior of the script INPUT command (see the section on scripts for more information): SET INPUT CASE {IGNORE, OBSERVE} Says whether or not to distinguish upper and lower case letters when doing a matchup in the INPUT command. OBSERVE causes upper and lower case let- ters to be distinguished. The default is to IGNORE case distinctions. SET INPUT DEFAULT-TIMEOUT seconds Changes the waiting time from one second to this new value. SET INPUT ECHO {ON, OFF} Show on the screen characters read from the serial port during the script operation, or not. Default is ON, show them. SET INPUT TIMEOUT-ACTION {PROCEED, QUIT} Determines whether or not the current TAKE command file is to be continued or exited if a timeout occurs. PROCEED is the default and means that timeouts are ignored. QUIT causes the current script file to be exited and control passed to either the next higher level script file (if there is one) or to Kermit's main prompt. SET KEY Syntax: SET KEY key-specifier [key-definition] Also: SET KEY {ON, OFF, CLEAR} WARNING: The format and functions of this command have changed substan- tially since version 2.29B and earlier. The changes were made in order to allow key redefinition to work on a wider variety of systems and keyboards without customization of the program source code for each configuration. See section 1.10 for further details. The SET KEY command is one of the most useful -- and confusing -- features of MS-Kermit. Typical uses: - You're used to having the ESC key in the upper left corner of the keyboard, but your new PC keyboard has an accent grave ("`") there. You can use SET KEY to make the accent key transmit an ESC, and you can assign accent grave to some other key. - You send a lot of electronic mail, and always sign it the same way. You can put your "signature" on a single key to save yourself a lot of repetitive typing. - You must set up your PC's function keys or numeric keypad to work properly with a host application. The SET KEY command does these things and more, and SHOW KEY gives us assis- tance. A key can be defined to: - send a single character other than what it would normally send, - send a string of multiple characters, - invoke a CONNECT-mode Kermit action verb, - send itself again. SET KEY specifies that when the designated key is struck during terminal emula- tion, the specified character or string is sent or the specified Kermit action verb is performed. Key definitions operate only during CONNECT, not at Kermit-MS> or DOS command level. The key-specifier is the identification of the key expressed in system-depend- ent terms. This can be a letter, such as Q for the key which emits an upper case Q, or the numeric ASCII value of the letter in backslash notation (e.g. "\81"), or else the numerical "scan code" observed by the system when the key is pressed (e.g. "\3856" for Ctrl-Alt-Q on an IBM PC). Material printed on keycaps is not necessarily a guide to what the key-specifier should be. When the word CLEAR is used in place of a key-specifier, all key definitions are cleared and then any built-in definitions are restored. A string definition is one or more characters, including 8-bit values expressed in backslash form, such as SET KEY \315 top \13 list\13 IBM F1 key sends "top list" SET KEY S L S key sends upper case L SET KEY T \27[m T key sends three bytes ESC [ m The string begins with the first non-spacing character following the key iden- tification and continues until the end of line, exclusive of any trailing spaces. If a semicolon comment is used and the definition is given in a TAKE file, the line ends at the last non-spacing character before the semicolon. Curly braces, {...<}>, can be use to delimit the string in case you want the definition to include trailing spaces. All text after the closing bracket is ignored. SET KEY \315 {login } this extra text is ignored This manual does not contain a list of all the scan codes for all the keys on all the keyboards on all the PCs supported by MS-Kermit -- that would be a manual in itself. Rather, in order to obtain the key-specifier for the SET KEY command, you must type a SHOW KEY command and press the desired key or key com- bination. This will report a scan code that you can use as the key specifier in a SET KEY command. To do this for many keys is a laborious process, so you should collect all your SET KEY commands into a file, which you can TAKE, or put them in your MSKERMIT.INI file. If you enter SET KEY by itself, with no key specifier, the command will prompt you to press the selected key and again for the definition string. Certain characters, like ESC and CR, may not be entered literally into the string, but can be included by inserting escape codes of the form \nnn, a backslash fol- lowed by a 1- to 4-digit number corresponding to the ASCII value of the desired character. Where an ASCII digit follows directly after a backslash number, confusion can be avoided by placing curly braces {} around the backslashed num- ber; thus, \{27}5 represents the two ASCII characters ESC 5. Here is an example of the use of SET KEY to assign ESC (ASCII 27) to the accent grave key. First the user gets the key-specifier for the key: Kermit-MS>show key Push key to be shown (? shows all): ` ASCII char: ` \96 decimal is defined as Self, no translation. Free space: 145 keys and 96 string definitions, 894 string characters. The free space report says that 145 more keys may be redefined, and up to 96 of them may have multi-character strings assigned to them (as opposed to single characters), and that there are 894 bytes left for these strings, in total. Confident that there is enough space left for a new key definition, the user proceeds: Kermit-MS>set key Push key to be defined: ` Enter new definition: \27 Once a key definition is constructed and tested, it may be entered on a single line in a command file (such as MSKERMIT.INI): set key \96 \27 To prevent accidents, SET KEY shows the current definition before asking for a new one; enter a Control-C to keep the current definition, or a carriage return to undefine the key, or a query mark (?) to see available choices. A more exact definition of SET KEY follows these construction rules: SET KEY [] where is: - a single ordinary printable ASCII character, or - the numerical equivalent of an ASCII character (ESC is \27), or - a scan code written as a backslashed number (e.g. \3856 for Ctrl-Alt-Q), or - keyword CLEAR which removes all current key definitions and then restores any built-in definitions. - ? (a question mark), which displays a help message. Scan codes, non-printing ASCII characters, 8-bit characters, and other binary codes are written in backslash form (see Table 1-1 for ASCII codes): \123 a decimal number (decimal is the default number base) \d789 a decimal number (also \D) \o177 an octal number (also \O) \x0d a hexadecimal number (also \X) \{b###} braces around material following the slash, where the numerical base letter b is d, o, x, or absent. is one or more spaces and or tabs. is: missing altogether which "undefines" a key. \number (a number in backslash notation between 0 and 255 decimal) - assigns a character with the corresponding 8-bit value. \Kverb for a Kermit action verb; upper or lower case K is OK. \{Kverb} Same. Verb is the name of an action verb. text a string with allowed embedded whitespace and embedded bi- nary chars as above. This kind of string may not commence with sequences \K or \{K. The string begins with the first non-whitespace character and ends at the end of the line (exclusive of trailing spaces and comments). {text} string confined to material within but excluding the braces. Note, where the number of opening braces exceeds the number of closing braces the end of line terminates the string: {ab{}{{c}d ==> ab{}{{c}d but {ab}{{c}d ==> ab ? Displays help message and lists all action verbs. Control-C Quits the Set Key command without making changes. Curly braces can be used to separate backslash numbers from regular ASCII text, such as when we want to send the two bytes ESC 8 (ESC is decimal 27): SET KEY T \{27}8 SET KEY L {words \{27}8 more words} trailing junk to be ignored If a string begins with a left curly brace then Kermit counts them and ends the string on the matching right curly brace (or end of line); the SET KEY L ex- ample above relies on brace matching to omit the trailing comment. The outer curly brace delimiters are not sent but the inner ones are; for example: SET KEY U {a {b}\{27}8} sends the 7 bytes "a {b}ESC8" SET KEY U a{ {b}\{27}8} sends the 9 bytes "a{ {b}ESC8}" SET KEY U a{ {b}\{{27}}8} sends the 15 bytes "a{ {b}\{{27}}8}" A definition is removed, that is a key is defined as itself, by giving an empty definition: SET KEY q q key sends q again SET KEY \331 IBM left arrow key is undefined. The keyboard can be restored to its startup state, that is all redefinitions removed and all built-in defitions restored, by using the keyword CLEAR in place of the key identification: SET KEY CLEAR Undefined keys which do not send ASCII characters are trapped by the keyboard translator and are rejected; a beep results from using an undefined non-ASCII key. SET KEY OFF directs MS-Kermit to read keycodes from DOS, rather than BIOS, so that console drivers like ANSI.SYS that operate at the DOS level may be used during Kermit CONNECT sessions. This would also apply to any special keyboard replacements that come with DOS-level drivers. SET KEY ON turns key definition back on, and returns Kermit to processing keystrokes at the BIOS level. Kermit Action Verbs: An action verb is the shorthand expression for a named Kermit procedure, such as "generate the proper sequence for a left arrow," "show status," "send a BREAK," and others; verbs are complex actions and each verb has a name. In a key definition the verb name is preceeded by backslash K (\K) to avoid being confused with a string. Verbs and strings cannot be used together on a key. SET KEY \331 \Klfarr SET KEY \2349 \Kexit makes the IBM keyboard left arrow key execute the verb named lfarr which sends the proper escape sequence for a VT102 left arrow key (which changes depending on the internal state of the VT102). The leading \K identifies the definition as a Kermit verb, so no string can start as \K or as \{K in upper or lower case (use \92K). The second example has Alt-X invoking the Leave-Connect-Mode verb "exit" (same as Kermit escape character "^]" followed by C). Each system has its own list of verbs and predefined keys. Table 1-4 shows those available for the IBM PC family (there are also some additional verbs for reassigning Heath or VT100 function keys, see section 1.15.2). The SET KEY command shows the list of available verbs when a query mark (?) is given as a definition. SHOW KEY displays all currently defined keys or individually selected ones; SHOW KEY can be executed only interactively. ------------------------------------------------------------------------------- Verb Meaning \Kupscn Roll up (back) to previous screen \Kdnscn Roll down (forward) to next screen \Khomscn Roll up to top of screen memory \Kendscn Roll down to end of screen memory (current position) \Kupone Roll screen up one line \Kdnone Roll screen down one line \Kprtscn Print the current screen \Kdump Append the current screen to dump file \Klogoff Turn off session logging \Klogon Turn on session logging \Ktermtype Toggle terminal type \Kreset Reset terminal emulator to initial state \Kmodeline Toggle modeline off/on \Kbreak Send a BREAK signal \Klbreak Send a "long BREAK" signal \Khangup Drop DTR so modem will hang up phone \Knull Send a null (ASCII 0) \Kdos "Push" to DOS \Khelp Display CONNECT help message \Kstatus Display STATUS message \Kexit Escape back from CONNECT mode \Kgold,\Kpf1 VT102 keypad function key PF1 \Kpf2..\Kpf4 VT102 keypad function keys \Kkp0..\Kkp9 VT102 keypad numeric keys \Kkpdot,\Kkpminus,\Kkpcoma,\Kkpenter Other VT102 keypad keys \Kuparr,\Kdnarr,\Klfarr,\Krtarr VT102 cursor (arrow) keys Table 1-4: Kermit-MS Verbs for the IBM PC Family ------------------------------------------------------------------------------- Some systems have preset key definitions when Kermit first begins (those for the IBM PC are shown in section 1.15.2). You can find out what they are on your system by typing SHOW KEY, and then question mark on the next line. You may supplement or change the predefined keys with SET KEY commands typed inter- actively or in MSKERMIT.INI or other command files. The MS-Kermit CONNECT command may be used in conjunction with certain console drivers that do their own key redefinitions. Since MS-Kermit intercepts keystrokes at the BIOS level, drivers like ANSI.SYS which work at the DOS level will have no effect during CONNECT, even though they work at MS-Kermit command level. Other drivers, like SuperKey and ProKey, work at the BIOS level, and their key assignments will remain effective during Kermit terminal sessions, and additional Kermit SET KEY assignments may be made "on top" of them. SET LOCAL-ECHO Syntax: SET LOCAL-ECHO {ON, OFF} Specify how characters are echoed during terminal emulation on the currently selected port. ON specifies that characters are to be echoed by Kermit-MS (because neither the remote computer nor the communications circuitry has been requested to echo), and is appropriate for half-duplex connections. LOCAL-ECHO is OFF by default, for full-duplex, remote echo operation. SET MODE-LINE Syntax: SET MODE-LINE {ON, OFF} On systems, like the IBM PC family, which are capable of displaying a status, or "mode" line on the 25th line during terminal connection, disable or enable this function. This command has no effect on systems that do not display a mode line during connect. The mode line shows several important facts about the connection, like which port is being used, the baud rate and parity, the current escape character, etc. When the mode line is enabled, it may be turned on and off using the CON- NECT escape-level command M or the Kermit verb "modeline". The mode line occupies the 25th line of those systems that have such a thing, and is not affected by scrolling (on some systems that have large screens, the mode line should appear on whatever the bottom line is, e.g. the 43rd). When emulating a VT102 or Heath-19, Kermit will allow the host to address the 25th line directly using cursor positioning commands. If this happens, Kermit will remove its mode line and relinquish control of the 25th line to the host (as if you had typed SET MODE OFF). When no terminal is being emulated, the 25th line (if any) is available for scrolling. If the mode line is disabled by an ap- plication or by the command SET MODE OFF then the only way to revive Kermit's mode line display is to give the command SET MODE ON. On IBM systems support- ing different length displays, the host needs to address the bottom line ex- plicitly. Also, note the line is saved and restored when CONNECT mode is exited and reentered so an old "fossil" mode line may reappear unexpectedly. If this happens, you can escape back to the Kermit prompt, say SET MODE ON, CONNECT, and toggle it off ("^]M") to clear the line. SET PARITY Syntax: SET PARITY {EVEN, ODD, MARK, SPACE, NONE} Specify the character parity to be used on the currently selected port. NONE means no parity processing is done, and the 8th bit of each character can be used for data when transmitting binary files. This is the normal case. If parity is other than none, then there will be 7 data bits (use of parity with 8 data bits is not supported). If you have set parity to ODD, EVEN, MARK, or SPACE, then Kermit-MS will re- quest that binary files be transferred using 8th-bit-prefixing. If the other Kermit knows how to do 8th-bit-prefixing (this is an optional feature of the Kermit protocol, and some implementations of Kermit don't have it), then 8-bit binary files can be transmitted successfully. If NONE is specified, 8th-bit- prefixing will not be requested. Note that there is no advantage to using parity. It reduces Kermit's file transfer efficiency without providing ad- ditional error detection. The SET PARITY command is provided only to allow Kermit to adapt to conditions where parity is required, or 8-bit transmission is otherwise thwarted. You will need to SET PARITY to ODD, EVEN, MARK, or possibly SPACE when com- municating with a system, or over a network, or through modems, concentrators, multiplexers, or front ends that require or impose character parity on the com- munication line. For instance, most IBM mainframe computers use EVEN or MARK parity; Telenet normally uses MARK parity. If you neglect to SET PARITY when the communications equipment requires it, the symptom may be that terminal emulation works (well or maybe only partially), but file transfer or script IN- PUT commands do not work at all. If parity is in use, then the display during terminal emulation, as well as any session log, will be 7-bit ASCII, unless you have SET DEBUG ON (q.v.). There may be situations in which you require 7-bit ASCII with no parity during terminal emulation, but still want to force 8th bit prefixing during file transfer. To accomplish this, SET PARITY SPACE. The INPUT and TRANSMIT commands use 7 or 8 bits if parity is NONE, according to the SET DISPLAY command, and this may upset recognition of received characters when the host unexpectedly sends them with its own parity. SET PORT Syntax: SET PORT {number, COM1, COM2, NET [nodename]} On machines with more than one communications port, select the port to use for file transfer and CONNECT. This command lets you use a different asynchronous adapter, or switch between two or more simultaneous remote sessions. Sub- sequent SET BAUD, PARITY, HANDSHAKE, FLOW, and LOCAL-ECHO commands will apply to this port only -- each port remembers its own parameters, so that you may set them for each port and then switch between ports conveniently with the SET PORT command. SET PORT 1 selects COM1, SET PORT 2 selects COM2. All versions default to port 1, except for the IBM PCjr, which uses port 2 if its internal modem is in- stalled. Additionally, COM3 and COM4 are supported for IBM PC's if the system is informed of their presence (as explained in Section 1.16.3). In "generic" MS-DOS Kermit, the following alternate forms allow you to experi- ment with device names or numbers until you find the communication port: SET PORT {DEVICE, FILE-HANDLE} Just type a carriage return after either of these commands, and you will be prompted for a device name or a numeric port-handle. Keep trying till you find one that works. File-handle 3, the system auxillary device, is conventional on many machines, as are device names COM1, COM2, and AUX. MS-Kermit for the IBM PC family is able to operate over local area networks through the NetBIOS interface. The command SET PORT NET [nodename] redirects communications the LAN board installed in the local computer and the associated NetBIOS emulator software, if active, rather than the serial port or the COM device driver. It installs a unique Kermit node name in the local LAN, so that other nodes can refer to it when files are transferred or terminal emulation is done. This name is displayed when you give the SET PORT NET com- mand. The server should use SET PORT NET, and the client should use SET PORT NAME nodename, specifying the server's name, e.g. CHRIS.K. Note that al- phabetic case is significant in node names! Both the regular serial port and a network connection can be kept alive simul- taneously; clearly, only one can be used at a time under MS-DOS. MS-DOS 3.x is not required for Kermit network usage, but most LANS do need DOS 3.1 or later for conventional file server work. Kermit needs only the NetBIOS emulator net- work software. SET PROMPT Syntax: SET PROMPT [string] This command allows you to change the MS-DOS Kermit program's prompt. The string may be enclosed in curly braces. Control characters like ESC can be in- cluded as backslashed numbers like "\27". ANSI.SYS and similar console drivers can be programmed through this command. The string must be less than 128 characters. If the string is omitted (missing) Kermit's original prompt of "Kermit-MS>" is restored. SET RECEIVE Syntax: SET RECEIVE parameter value This command lets you modify the ways in which MS-Kermit asks the other Kermit to behave. That is, it controls the file transfer protocol options for packets sent to MS-Kermit by the other Kermit. The parameters and values you specify in the SET RECEIVE command are sent to the other Kermit during initial negotia- tions. END-OF-LINE number ASCII value of packet terminator to look for on incoming packets. Nor- mally carriage return. Use this command if the other Kermit is ter- minating its packets with some other control character. PACKET-LENGTH number Ask the remote Kermit to use the specified maximum length for packets that it sends to Kermit-MS. The normal length is 94 bytes. Use this command to shorten packets if the communication line is noisy or ter- minal buffers somewhere along the path are too small. Shorter packets decrease the probability that a particular packet will be corrupted, and will reduce the retransmission overhead when corruption occurs, but will increase the protocol overhead. If a length greater than 94 is specified, a protocol option called "long packets" will be used, provided the other Kermit also supports it. Kermit-MS handles extended-length packets up to 1000 bytes long. Long Packets can improve efficiency by reducing the per-packet overhead for a file, but they will not be used unless you issue this command. Before using this option, ensure that the equipment on the communica- tions pathway can absorb a long packet, and that the connection is clean (retransmission of long packets is expensive!). You should also SET BLOCK-CHECK 2 or 3 for more reliable error checking. PADCHAR number Ask the remote Kermit to use the given control character (expressed as a decimal number 0-31, or 127) for interpacket padding. Kermit-MS should never require any padding. PADDING number Ask the remote Kermit to insert the given number of padding characters before each packet it sends. MS-Kermit never needs padding, but this mechanism might be required to keep some intervening communication equipment happy. START-OF-PACKET number If the remote Kermit will be marking the beginning of packets with a control character other than Control-A, use this command to tell Kermit-MS about it (the number should be the decimal ASCII value of a control character). This will be necessary only if the hosts or com- munication equipment involved cannot pass a Control-A through as data, or if some piece of communication equipment is echoing packets back at you. TIMEOUT number Ask the remote Kermit to time out after the given number of seconds if a packet expected from Kermit-MS has not arrived. Use this command to change the other Kermit's normal timeout interval. SET REMOTE Syntax: SET REMOTE {ON, OFF} SET REMOTE ON removes the file transfer display (as if you had given the com- mand SET DISPLAY QUIET). It should be used when you are running Kermit-MS in remote mode when coming in from another PC through the Kermit-MS's "back port", to which the console has been reassigned using the DOS CTTY command, e.g. CTTY COM1 It is necessary to issue the SET REMOTE ON command because (a) Kermit-MS has no way of knowing that its console has been redirected, and (b) when the console is the same as the port, the file transfer display will interfere with the file transfer itself. SET REMOTE OFF returns the file transfer display to its preferred style (REGULAR or SERIAL). When you SET REMOTE ON, you might also want to SET DELAY 5 or thereabouts, to allow yourself time to escape back to the local system before MS-Kermit starts sending packets. WARNING: During CTTY console redirection, many programs still output to the real screen and require input from the real keyboard and will hang the system until keyboard requests are satisfied. On the IBM PC, CTTY CON returns control to the normal keyboard and screen (other systems may use other device names). See section 1.16.4 for further details about remote operation. SET RETRY Syntax: SET RETRY number Sets the number of times a packet is retransmitted before the protocol gives up. The number of retries can be between 1 and 63, and is 5 by default. This is an especially useful parameter when the communications line is noisy or the remote host is very busy. The initial packet of a file exchange is given three times as many retries to allow both systems to become ready.