Using C-Kermit 2Nd Edition
Total Page:16
File Type:pdf, Size:1020Kb
<< Previous file Chapter 1 Introduction An ever-increasing amount of communication is electronic and digital: computers talking to computers Ð directly, over the telephone system, through networks. When you want two computers to communicate, it is usually for one of two reasons: to interact directly with another computer or to transfer data between the two computers. Kermit software gives you both these capabilities, and a lot more too. C-Kermit is a communications software program written in the C language. It is available for many different kinds of computers and operating systems, including literally hundreds of UNIX varieties (HP-UX, AIX, Solaris, IRIX, SCO, Linux, ...), Digital Equipment Corporation (Open)VMS, Microsoft Windows NT and 95, IBM OS/2, Stratus VOS, Data General AOS/VS, Microware OS-9, the Apple Macintosh, the Commodore Amiga, and the Atari ST. On all these platforms, C-Kermit's services include: • Connection establishment. This means making dialup modem connections or (in most cases) network connections, including TCP/IP Telnet or Rlogin, X.25, LAT, NET- BIOS, or other types of networks. For dialup connections, C-Kermit supports a wide range of modems and an extremely sophisticated yet easy-to-use dialing directory. And C-Kermit accepts incoming connections from other computers too. • Terminal sessions. An interactive terminal connection can be made to another com- puter via modem or network. The Windows 95, Windows NT, and OS/2 versions of C-Kermit also emulate specific types of terminals, such as the Digital Equipment Cor- poration VT320, the Wyse 60, or the ANSI terminal types used for accessing BBSs or PC UNIX consoles, with lots of extras such as scrollback, key mapping, printer con- trol, colors, and mouse shortcuts. 1 • File transfer. Transferring either text or binary files from your computer to the other one, or vice versa, free of errors, using the most advanced and high-performance im- plementation of Columbia University's Kermit file transfer protocol available anywhere. On some platforms, other protocols such as ZMODEM are also included. • Client / server features. These allow uniform and convenient access from your desktop computer to the wide variety of other computers and services for which Kermit servers are available, in which you may initiate all sorts of file transfer and management func- tions from your client software. • International character-set conversion. Kermit software stands alone among com- munications protocols and software in its ability to reconcile the differences among in- compatible character sets used to represent text in many languages. • Automation. C-Kermit's command language is also a script programming language that is both powerful and easy to use, as well as portable across hundreds of platforms and diverse communication methods. Use it to automate all your routine communica- tion tasks, ranging from paging, to simple data exchange, to complex update opera- tions, to network monitoring and reporting. All of C-Kermit's features are configurable and customizable, giving you an unprecedent- ed and unparalleled degree of control over your connections. This book is the technical reference manual for C-Kermit in its many incarnations. It con- centrates on what all the versions have in common: the communications functions, the command language, file transfer, the character-set conversion features, and the scripting language. The specifics of each version are covered either in a separate publication such as the Kermit 95 manual, in an appendix to this book, or in an online file. Why Kermit? In the present age of graphical user interfaces, Web browsers, and near-universal Internet access, what use is a text-mode serial communications program like C-Kermit? Let's clear up two misconceptions right away. First, C-Kermit is not just a serial communica- tions program any more; it is also both a network client and a network server. And second, its text-mode user interface can be (and often is) concealed behind a graphical in- terface but can still brought bear on the hard problems when real power is needed. The world of computing and data communications is still surprisingly heterogeneous. To this day there remains a vast diversity of computers large and small, as well as devices that most of us might not think of as computers Ð laboratory equipment, cash registers, bar-code scanners, you name it Ð that do not fit the Internet-connected, multimedia, Web-browsing model, yet still need to exchange data with other computers. Minis and 2 Introduction / Chapter 1 mainframes still exist despite all attempts to kill them off, not to mention countless dis- continued ``legacy'' systems ranging from CP/M microcomputers to Soviet-era supercom- puters, still in good service, that would be powerless to communicate without Kermit. Kermit conforms to well-established open standards. It gives you freedom of choice. It does not lock you into a particular brand of hardware or operating system, or a particular or proprietary communication method. Learn it once, use it everywhere. • Kermit software is universal. Kermit programs have been written for hundreds of dif- ferent kinds of computers (see page 11). Kermit software is available for just about any computer and operating system you can think of. • Kermit software communicates not only over dialup connections, but also over direct serial connections, local area networks, and wide area networks, so you can use the same software for practically any kind of connection. • Kermit software is flexible. It is adaptable to the styles and formats of the many com- puter manufacturers and communication service providers. • Kermit software is easy to use. The commands are ordinary words, rather than cryptic codes. Menus are available upon demand. Some Kermit programs, such as Kermit 95 and Kermit/2, have a graphical user interface in addition to the traditional command interface described in this book. • Kermit software is powerful. Procedures can be automated using a script program- ming language composed of ordinary Kermit commands. • Kermit scripts are portable. The same scripting language is usable on hundreds of dif- ferent platforms. • Kermit file transfer is robust. It works in hostile or restrictive communication en- vironments where other protocols and software fail. • Kermit file transfer Ð perhaps contrary to popular belief Ð can be fast. • Kermit file transfer is international. It can transfer text in many languages and charac- ter sets without scrambling the special characters. • Kermit software is accessible. Because it offers a character-mode user interface, it is compatible with speech, Braille, and other enabling devices. One software package for practically all your communication needs: no switching from package to package to access different kinds of computers or services or to use different communication methods; no need to learn or support multiple packages. And as an added benefit, most Kermit software programs have the same basic set of commands and procedures Ð once you've learned one Kermit program, you've learned them all. Why Kermit? 3 Figure 1-1 Remote and Local Computers How Kermit Works Picture two computers, like the ones in Figure 1-1. You are using one of them directly: it is a PC or workstation on your desk, or it is a timesharing system connected to a terminal (or terminal emulator) on your desk. Let's call this the local computer. You want to con- nect your local computer to a more distant, remote computer or service and transfer data. IMPORTANT: Remember the terms local and remote. They are used through- out this book. The local computer is the one you are making the connection from. The remote computer is the one you are making the connection to. Let's say you are connecting the two computers by telephone. First be sure that each computer has a modem. Then you must know the name of the device on your local com- puter that the modem is connected to, the transmission speed to use, and the telephone number to call. Let's look at Figure 1-2. We start the local Kermit program simply by typing the word kermit. IMPORTANT: In the figures, and in all examples used in this book, the text you type is underlined. When you are typing commands to your operating sys- tem or to a Kermit program, you must terminate them by pressing the Return or Enter key at the point where the underlining ends (unless otherwise indicated). 4 Introduction / Chapter 1 Figure 1-2 Connecting the Local and Remote Computers When the local Kermit's prompt appears, tell it the modem type and the communication device name and speed, and then tell it to dial the other computer's phone number. When the other computer answers the phone, give your local Kermit the CONNECT command2 and now you are talking to the remote computer just as if you were using it directly. Log in as shown in Figure 1-3 and carry on a dialog to conduct your business. Eventually you might decide that you want to move a file from one computer to the other. To transfer a file, both computers must be running Kermit programs. Your local computer already is. Simply type ``kermit'' on the remote computer to start the remote Kermit program.3 Now you must tell each Kermit program what to do: one of them must be told to send a file of a certain name and the other must be told to receive the file. The basic rule is: (1) tell the remote computer what to do first (SEND or RECEIVE), then (2) get back to the local computer and tell it the opposite (RECEIVE or SEND)4 , as shown in Figure 1-4. 2If you give the DIAL command at the C-Kermit prompt and the call is answered successfully, C-Kermit CONNECTs automatically, so in this case no CONNECT command is needed.