A COMMUNICATIONS PRIMER Prepared by Joan Schraith Micro Consultant 94 Comm West 244-0608 Quite a large percentage of the questions we deal with in the Micro-Consulting Office have to do with communications problems. Information about hooking up to mainframes can be difficult to acquire, sometimes requiring a long series of referrals before the answer can be found. Communications requires setting a large number of variables in agreement or it will not be successful; mere knowledge of the phone number will not guarantee a successful connection, and some trial and error experimentation must be expected. This little guide is an attempt to explain some of the issues so that experimentation won't seem so terrifying to the newcomer to communications between computers. WHAT DO I NEED? A typical set-up is as follows: * Microcomputer, with monitor, and disk drive * Hayes compatible 300 or 1200 baud modem * Asynchronous Communications Adapter, Serial port, or Modem port * RS-232C cable with DB-25 male and female connectors (for IBM) * A Disk Operating System and a communications package (IBM PC: Smartcom, PC-Talk, Procomm, Qmodem, Kermit, Crosstalk; Macintosh: MacKermit, Red Ryder, etc.) * For Communicating with Mainframes: A terminal emulator (such as VT100) and file transfer protocol (Kermit, XMODEM, etc.). Some communications packages, such as Procomm or Red Ryder, include these features. You can acquire Kermit 2.29 and the Cyber Interface at the Micro-Consulting Office. The best communications packages are distributed as Shareware. This means that you can acquire a disk to try the program for free, but if you use it, you should register. Registration provides you with documentation and upgrades. These can be found on electronic bulletin boards or from various User's Groups that collect public-domain and user-supported software (these advertise in many computer magazines). Smartcom is an adequate program for dialing which comes with the Hayes Smartmodem, but it is not adequate if you wish to upload and download files with any sort of error-checking protocol, such as Kermit or Xmodem. WHAT IS A MODEM? A modem enables computers and terminals to communicate with each other by sending signals over the telephone lines. Digital microcomputers generate and use digital signals, whereas (historically) the telephone system transmits only analog signals as tones. A modulator converts digital signals to analog signals and a demodulator reconverts the analog signals to digital signals. (The word modem comes from the combination of MOdulatorDEModulator.) To communicate, both ends of a line must be equipped to perform these functions and various characteristics (called COMMUNICATIONS PARAMETERS) must match. COMMUNICATIONS PARAMETERS DATA BITS Data bits are single bits, either 1 or 0, of data. These are ASCII bits. ASCII,which stands for American Standard Code for Information Interchange, is an "alphabet" of binary digits ("bits") organized into strings 7 bits long to represent letters, symbols and control codes. (Control codes control operations such as carriage return, clear screen, backspace, etc.) A word length of 7 bits allows ASCII codes 0-127, but cannot transmit the high order bit used by some word processors, such as WordStar. (If you ever want to upload a word processed file to a mainframe, it is a good idea to PRINT the file to an ASCII text file, and upload that. This will get rid of control codes the mainframe wouldn't understand and will eliminate the problem of the high order bit. In addition, public domain programs, such as STRIP8, can be used to convert WordStar files, and most word processors which do not store documents as text provide some sort of ASCII FILE CONVERSION UTILITY.) If DATA BITS are set to 7, the 8th bit can be used for parity.An 8 bit word length will not allow a parity bit, but is necessary for binary files (object code, e.g. *.EXE, *.COM, *.ARC) PARITY BITS A parity bit may be added for a parity check, a method of error detection. The following possibilities exist for the value transmitted, and how it is determined: SPACE - The parity bit is set to 0 ODD - The sum of the parity bit and all the bits in the data "word" add up to an odd number (i.e. 1 is added if it adds up to an even number) EVEN - This is the opposite of ODD, except that the sum will add up to an even number MARK - The parity bit is set to 1 NONE - No parity bit is transmitted If the computer at the other end does not receive the parity bit for which it is set, an error in transmission has occurred and your screen may display garbage. STOP AND START BITS These bits are added to indicate the beginning and end of a transmission. The start bit, a logical 0, tells the receiving system that the following bits comprise an ASCII character. After the ASCII character and optional parity bits are set, one or more stop bits may be transmitted to define the end of one character before the beginning of the next. TRANSMISSION SPEED (BAUD) Baud is the modulation rate or the number of times the carrier signal is modulated per second. Transmission speed is determined by the speed of the remote system with which a modem will communicate. A connection at any transmission rate is possible only between two modems capable of and set for the same rate and modulation technique. If a connection is attempted between incompatible equipment, unintelligible data appear on the screen or the connection is not successful. DUPLEX (ECHO) Your communications package may use either of these terms. If it uses the term Duplex, it is probably using it metaphorically, to indicate the manner in which a "full" or "half" duplex system would actually receive and display data. Full Duplex is equivalent to No Echo, or Echo off, and Half Duplex is equivalent to Echo on, or Echo. HALF DUPLEX - Conducts alternating two-way communication over a single channel. In half-duplex data communication systems, a terminal must wait for a computer at the other end of a line to stop sending data before it may transmit data. Outgoing keyboard or disk characters are displayed locally; incoming characters are not echoed for remote display. FULL DUPLEX - Allows simultaneous two-way communication via two communications channels, one going in each direction. The originator neither displays nor echoes characters. Outgoing characters are echoed bythe host and displayed just like incoming characters. SYMPTOMS - If characters are echoed for display by both the remote and local systems, they appear twice on the screen. If they are not echoed by either system, they do not appear at all. CSO POLICY FOR REPORTING COMMUNICATIONS PROBLEMS If you don't understand how to set your modem, or need to acquire one of the programs (Kermit or Cyber.Com) we distribute, call the PC Consultants (at 244-0608). To help us help you, please bring in the manual for your modem and the manual for the program you are using. If you want a copy of a program, please bring in a blank, formatted diskette (we cannot distribute diskettes). If your problem is due to a terminal malfunction, call the CSO Communications hotline. CSO provides a communications problem hotline, which should be called to report any terminal or communication problem, or to inquire about any service or previously reported problem. This "hotline" telephone number is 333-0969. It is staffed from 7am to 11pm by personnel trained in communication problem isolation (and some correction). Problems that cannot be corrected through the process of isolation will be passed on to the most appropriate group within CSO to look into the problem in more depth. Between 11pm and 7am the telephone will be answered and the problem recorded, but initial problem determination will be done by a technician as he becomes free. In either case, be sure to WRITE DOWN exactly what happens: what error messages appear, whether characters are doubled or do not appear, when the terminal locks up (before logon, after, etc.), and use the STATUS command (or equivalent for your communications program) and note the settings of your communications protocols and terminal emulation. The more adventurous can try to experiment with settings: LOGOFF (if you got that far), HANGUP, reset a parameter, and try again. The next section of this guide lists some of the most commonly occuring problems and how to correct them COMMON PROBLEMS AND SOLUTIONS Communications problems are usually caused by incorrect settings. They can also be due to malfunctioning equipment or a bug in the communications program or emulation. ECHO PROBLEMS PROBLEM: Two characters appear on the screen when one is typed from the keyboard. CAUSE: Your system is set to Half Duplex (echo on); the remote is set to Full (echo off). SOLUTION: Set to Full Duplex (echo off). PROBLEM: No characters appear on the screen when they are typed at the keyboard. CAUSE: Your system is set to Full Duplex; the remote is set to Half. SOLUTION: Set to Half Duplex (echo on). GARBAGE ON SCREEN PROBLEMS PROBLEM: Total Garbage on screen. CAUSE: Wrong baud rate. SOLUTION: Be sure that if you are going through the switch, your baud is set to 1200. If you are dialing up directly to CYBER or VMD, be sure it is set to 300. PROBLEM: Characters entered from your keyboard, while on line, are not always displayed correctly. CAUSE: The parity setting required by the remote computer is not matched locally, or you could have a noisy connection. SOLUTION: Change your parity setting. (See the document PHONE.DOC for the settings, if you have received Kermit or Cyber.Com from the PC-Consultants.) PROBLEM: When sending a file, characters are not displayed correctly on your screen. CAUSE: The Stop Bit setting required by the remote is not matched locally. This is also a common indicator of noise problems. SOLUTION: All the U of I mainframes require a setting of 1 Stop Bit. PROBLEM: When sending text to another system at 1200 baud, not all characters are displayed. CAUSE: Remote unable to handle incoming data at 1200 bps. SOLUTION: Increase the character delay and retransmit. LOCK UP AND DIALING PROBLEMS PROBLEM: After dialing up and connecting, the terminal locks up CAUSE: 1) The modem is not operating correctly or is set for the wrong speed (baud rate). 2) The terminal is not configured properly or emulation is incorrect. 3) Parity is incorrect. SOLUTION: 1) Change the baud rate. 2) Check your terminal emulation program. Did you specify the correct terminal type? You might have a problem with your emulation program. 3) Check the parity. PROBLEM: You are dialing one of the VM (IBM) Machines, and after dialing up and connecting, you fail to see VM/ONLINE appear, or a message READ ERROR appears. CAUSE AND SOLUTION: These are symptoms of the same problem described previously (terminal locking up). If you dialed through the Switch, which number did you dial? If you dialed the direct dialup number, VMD, DVMD, or RVMD, you are in line mode and must be set for 300 baud, Local Echo, No parity. For Full Screen Mode (to use XEDIT, etc.) you MUST dial through the switch or use a LocalNet terminal. From the switch, type DVMDFS, and make sure that you are set for Mark Parity and No Echo. You could also be having a problem with emulation. If you are using Kermit, did you specify "vt100" at the prompt ENTER TERMINAL TYPE? (If you didn't get that prompt, you were not using a full screen access number.) If you are using another program, make sure that you declared a supported terminal type and that your program is capable of emulating a supported terminal type. NOTE: IF YOU DECLARE AN UNSUPPORTED (OR THE WRONG) TERMINAL TYPE, OR ARE NOT USING AN EMULATOR, YOUR TERMINAL WILL LOCK UP. DO NOT JUST TYPE A RANDOM NUMBER WITH SIM, OR SELECT RANDOMLY FROM THE LIST IN CSO HELP 7171 IF YOU WANT TO AVOID HAVING THIS HAPPEN. PROBLEM: After dialing up and trying to connect to a specific machine, you receive a message containing the words "LINES NOT AVAILABLE". CAUSE: For some reason, there are no available lines. There could be two reasons for this: 1) Some remote hardware has crashed. 2) All the lines are busy (occupied). SOLUTION: Call the system operator and find out if the system is down. It is more likely that there are too many people on, and you will have to wait until a less busy time to try again. PROBLEM: You have a Hayes Compatible Modem, and when you try to send a command to it, you do not get back an OK response. (Note: If Echo is OFF, you may not see the command as you type it, but you should get the response back regardless of echo setting.) CAUSE: 1) Your modem may be "hung" from an improperly concluded previous communications session. 2) If you've never used the modem before, you may not have set the communications port properly - either in the hardware switches or the software. SOLUTION: 1)Try to reset the modem. For a Hayes Compatible, the command for this is ATZ. 2) Make sure that the dip switches are set correctly on your modem, and make sure that the software is set up for the communications port which is associated with your modem. PROBLEM: You can't get the modem to hang up properly. CAUSE: The communications package may not be sending the correct codes to drop the DTR signal on your modem. SOLUTION: Assuming that you have a Hayes Compatible modem (if not, you need to check the hardware reference manual for your modem), the command to hang up the modem is +++ATHí The three plus signs tell the modem that what is coming through next is not data, but a command for it; AT is the command preface, and Hí is the actual hang up command. PROBLEM: You have an internal modem, and when you try to dial with ATDT, you either get no dialing, or the modem dials and hangs up before connecting. (Make sure that you typed ATDT in CAPITAL LETTERS.) CAUSE: The registers which contain the timing instructions for dialing are probably too short. In a Hayes 1200B, these registers are s6, s9, and s10. SOLUTION: 1) Try to dial with ATD or ATDP. 2) Send an initialization string (before dialing) which lengthens the timing for these registers. For example, an initialization string which could be used with the 1200B is: ATC1HíM1QíV1XíS6=5S9=1íS1í=15 You send an initialization string immediately before the ATDT command (after issuing the connect command with Kermit). 3) Alternatively, you could type the phone number as follows: ATDT3334íí8,, Placing a comma after the phone number will instruct the modem to wait longer for a speed tone handshake. SOME OTHER THINGS TO CHECK If you are not connecting at all, or are getting no response from your modem, check that: * All cables are tightly connected. * All power cords are plugged in. * If you have more than one serial port (such as for a mouse), make sure you have set your communications package for the correct port. * Jumper and Dip Switch settings are correct (especially if this is the first time you have used your modem). If you are using a communications package that may be configured for color or monochrome screens (such as Procomm or Kermit), and your screen blanks completely in connect mode, make sure that the package is installed to the correct display mode. (In Kermit, this is handled in the initialization file MSKERMIT.INI. If you have a monochrome monitor, make sure that this file does not contain the instruction SET COLOR 3x,4x. This instruction may be removed by entering any text editor and placing a semicolon before the offending line. Further, check any take files for color commands, such as VM.INI or UNIX.INI)