Comm Overruns


From: Robert.Foster@f1.n379.z1.fidonet.org (Robert Foster)
Date: Thu, 25 Apr 1996 10:22:00 -0500
Subject: Comm Overrun & Faq

There has been a lot of discussion concerning the Comm Overruns problem.
Contrary to popular belief, Comm Overruns by themselves are usually not
a result of a Winsock program.  In fact the program is correctly
monitoring everything and reporting a Comm Overrun.  Frequently the
problem is associated with not just one, but multiple settings on the
system.  Users not having a working knowledge of all interactions taking
place, can easily overlook something.  Numerous items need to be
"tweaked" or "fine tuned" to get optimum performance from an operating
system.

Table Of Contents
-----------------

        1. Introduction and Purpose
        2. Comm Overruns
        3. Selecting a Modem
        4. UARTS
        5. Transmission Speed
        6. Configuring the System
        6a.  Configuring the Modem
        6b.  Configuring the PC
        6c.  Configuring Windows 3.1/3.11
        6d.  Configuring Windows 95
        6e.  Configuring Applications
        7. Other UART Problems
        8. Frequent Disconnects
        9. USR Sportster Problems
       10. Other Notes

Listed below is a document that will (hopefully) help.


1. Introduction and Purpose This document is intended to help Windows users who have established (or are in the process of establishing) dialup Internet connections using SLIP or PPP. It assumes that those users will want to achieve high speed connections of at least 14,400 bps and, in most cases, 28,800 bps. It is not intended as a comprehensive guide to the Internet. There are many fair to excellent books which already address this need. It does, however, provide some practical advice on the data communications aspects of such a project including the issues associated with the dreaded "Comm Overrun" error.
2. Comm Overruns Comm Overrun errors are reported by Winsock programs such as Trumpet. They arise when your PC is unable to keep up with the transmitted data. Although your computer will generally recover without intervention, large data blocks will need to be re-transmitted, significantly reducing overall system performance. Comm Overrun errors are a source of great confusion. If these errors are driving you nuts, don't worry :-) Simply study this document carefully because it almost certainly contains the solution. In fact, you may want to print a hard copy now. One of the many variables affecting overruns is the system loading, so do not be surprised if you find that their frequency varies depending on what programs are running and how they are being used.
3. Selecting a Modem You will of course need a modem. Modems can be segmented into two broad categories, internal or external. The difference can be very significant (see discussion of UARTS in the next section). When using an external modem, be sure to purchase a high quality cable to connect it to the comm port on your computer. Some cheap cables do not support hardware handshaking which is essential for reliable high speed communications. Typically, these cables only provide 3 or 4 conductors rather than the 7 (or more) required. Support for the following RS232 signals is recommended as a minimum: Transmit Data (Tx) Receive Data (Rx) Signal Ground Data Terminal Ready (DTR) Carrier Detect (CD) Request to Send (RTS) Clear to Send (CTS) Other important features to consider when selecting a modem include: Transmission speed Fax capabilities. In order to communicate at speeds of up to 14,400 bps, you'll need a modem which supports V.32bis. In order to communicate at speeds of up to 28,800 bps, you'll need a modem which supports V.34. The V.Fast and V.FC protocols may be important if you need to establish 28,800 bps connections with sites that do not yet have full V.34. However, V.34 is the protocol of choice for the future and users who are looking for a 28,800 bps modem should focus on that capability. Although a number of other manufacturers advertise FLASH ROM features, this frequently does not extend to the "data pump" (an important internal component of the modem). The US Robotics Courier V.Everything does include a capability to update the data pump through FLASH ROM. Recently, so called, RPI modems have entered the market. These low cost devices perform data compression and error correction in software rather than hardware thereby saving the cost of some additional circuitry. These RPI modems represent, IMHO, a false economy. The software drivers can be very buggy and RPI is a highly proprietary protocol.
4. UARTS A chip known an a Universal Asynchronous Transmitter and Receiver (UART) is fundamental to serial data communications. In short, this device converts parallel data (e.g. 8 bit bytes) into a serial data stream which can be transmitted over a telephone line. Internal modems are equipped with their own UARTS. External modems, however, utilize the UART incorporated into your PC's COMM port. If you are using an external modem, it is essential that you understand what type of UART your COMM port is using. If you use an internal modem there's a good chance the device will be equipped with a suitable UART. Nevertheless, you should check to confirm. You can establish the type of UART installed on your machine by running the MSD.EXE (Microsoft System Diagnostics) utility which should be found in your DOS and/or Windows directories. Run the program and select the PORTS option. Be sure to run MSD in native DOS mode. It can produce incorrect results if run from Windows or in a DOS session under Windows. If MSD reports a 16550A type UART, the chances are that you will be able to run at speeds of up to 28,800 bps. However, if MSD reports a 8250 or 16450 type UART, the chances are that you will not be able to run at speeds above 19,200 bps. If your PC uses the older 8250/16450 UART and you want to run at 28,800 bps, all is not lost. If you have a serial card (or motherboard) with a socketed 8250 or 16450 UART, you can replace the chip with a 16550A. Add-on high speed data communications cards with 16550A (or equivalent) UARTS are also available at your local computer store at prices ranging from $20 to $75 depending upon the number of ports and other features.
5. Transmission Speed It is important to understand the difference between "line speed" (the speed with which your modem talks to the other modem), and Data Terminal Equipment or "DTE speed" (the speed with which your PC talks to the modem). Modern modems attempt to compress the data they transmit. When transmitting text, the degree of compression attained can be quite significant - perhaps a factor of 4. However, the modems will not be able to achieve any significant degree of additional compression when transmitting pre-compressed files (e.g. ZIP files). It is, therefore, generally recommended that you set your DTE speed at a value two or four times greater than the actual line speed. With 14,400 modems, use a DTE speed of 57,600 bps for maximum performance or 38,400 bps if you experience problems. With 28,800 modems, use a DTE speed of 115,200 bps for maximum performance or 57,600 bps if you experience problems.
6. Configuring the System Assuming that you have an appropriate modem and UART, it's time to configure the system. There are five main aspects: Configuring the Modem. Configuring the PC. Configuring Windows 3.1/3.11. Configuring Windows 95. Configuring your Communications Applications.
6a. Configuring the Modem Most modems are shipped with default configurations which are designed to allow them to operate in the optimum mode. Some changes may be required but, since the options are highly specific to the make and model of modem, you are advised to consult your modem manufacturers documentation. If you suspect a modem configuration problem you might want to seek out another subscriber to your Internet Service Provider with a similar or identical modem and compare notes. Alternatively, you might try posting to the News Group comp.dcom.modems. However, you should ensure that your modem is configured for Hardware Flow Control and Fixed Serial Port Rate.

6b. Configuring the PC Most PC's have some form of setup program which includes various COMM port options. Typically the parameters include the which ports are enabled together with the IRQ and Base Address for each port. These parameters appear to be almost universally standardized. However, if you suspect problems you should consult your PC manufacturers documentation. If possible, configure your modem on COM2 (IRQ3). This port is assigned the highest priority for interrupt processing.
6c. Configuring Windows 3.1/3.11 Almost all communications programs ignore the Control Panel COMM Port settings. Nevertheless, you may want to configure them properly to avoid any subsequent confusion. Start Control Panel and select the Ports icon. The default setting of Data=8, Parity=None and Stop=1 should be fine. Set the Flow Control option to "Hardware". The Advanced options for IRQ and Base Address should correspond to your PC hardware configuration options. Set the Speed as discussed in the previous section. You may find that the speed you would like to select is not available on the drop down combo. Try typing the value in anyway. If that fails, you can force it by editing your win.ini file. Configuring System.ini. Next, you must understand which Windows communication driver (comm.drv) is installed on your system. Open up system.ini in the Windows directory and look in the [Boot] Section for the following entry: comm.drv = ????.drv If ????.drv is set to comm.drv (i.e. the entry reads "comm.drv = comm.drv") the standard Windows comm driver is installed. If you are running Windows 3.0 or 3.1 with the standard comm.drv driver, you may need to install a replacement (details below). However, if you are running Windows for Workgroups 3.11 you should be aware that Microsoft improved the driver and it should not be necessary to replace it. However, it is quite possible that the standard Windows driver was replaced when you installed a communications software package. You might find that yours is set to one of the following: comm.drv = turbocom.drv or comm.drv = cybercom.drv or comm.drv = wfxcomm.drv. Most of these drivers are capable of sustaining V.34, 28,800 bps modem speeds (115,200 DTE speeds). In summary, if you are running Windows 3.0 or 3.1, you will probably need an enhanced comm.drv driver. I highly recommend Cybercom which is free ware. If you are running Windows for Workgroups 3.11, it should not be necessary to change the standard comm.drv. Next we need to examine some other system.ini settings. The optimum values will depend upon which comm.drv you have installed, together with other factors (some settings are specific to certain drivers and others will be interpreted differently by different drivers). In general, the following combination of settings is likely to work first time. This example assumes that your modem is installed on COM2. In the [386Enh] Section, the following settings are recommended: com2fifo=1 comboosttime=10 com2buffer=1024 The entry "com2fifo=1" is especially important. This entry turns on the buffering capabilities of your 16550A UART. Note that the entry should read "com2fifo=1" rather then "com2fifo=on" or "com2fifo=yes" - this common mistake stems from erroneous documentation published by Microsoft some time ago. The com2buffer=1024 setting should work in most instances. If you are experiencing comm overruns you might try increasing this value. If your system is running without errors, you may want to try reducing this value (default: 128) to optimize your system. You should aim for the smallest possible value necessary to eliminate comm overruns. I do not recommend that you adjust the COM2RxTrigger setting from the default setting of 8 (even though some folk may tell you otherwise). Additional information concerning Windows support of the 16550A UART and the associated system.ini settings is available in an article from the Microsoft Knowledge Base: Windows Support of the 16550A UART. A Word about bicomm.drv. You may find that your system.ini contains the entry: comm.drv = bicomm.drv. If that's the case, bicomm.drv was almost certainly installed during the installation and configuration of a Hewlett Packard Laser Printer (probably a LaserJet 4). Bicomm.drv appears to cause comm overrun problems in some systems. Replacing it with other drivers causes other problems related to printing. At least some users have eliminated all of the problems by upgrading their HP Printer drivers from Version 1.00 to Version 1.35. The latest Version presumably works also. After this upgrade, cybercomm or wfxcomm should also work correctly without causing printer problems.
6d. Configuring Windows 95 The comm port setup has been dramatically overhauled in Windows 95. Users of the Preview Edition and early Betas should note that these releases do not provide support for 16550 UARTS. However, full support for 16550 UARTs is provided at Build 950 and the commercial release. There is no requirement to replace the standard Windows 95 comm.drv.
6e. Configuring Applications The options will depend upon the specific application but, in general, stick to the following guidelines: Set speed as discussed in the previous section. Set Auto Baud to OFF. Set Port Speed locked to ON. Set Carrier Detect to ON. Set Hardware Flow Control to YES. Set Software Flow Control to No. Set Data Bits as required by the host (normally 8). Set Stop Bits as required by the host (normally 1). Set Parity as required by the host (normally None). Set Parity Check as required by the host (normally Off). Set Modem Initialization strings as recommended by the manufacturer.
7. Other UART Problems Certain newer models of computer (especially PCI local bus Pentium machines) are equipped with SMC 665 i/o controllers. These devices serve the same purpose as the 16550A UART in addition to other functions. Furthermore, the MSD program will report them as a 16550A UART. Unfortunately, there is a problem with this 16550A UART implementation which may result in system "lock-up" or "hang". This problem is completely unrelated to the comm.drv issues discussed above although they are frequently confused. To establish whether your computer has the SMC 665 controller, you will need to inspect the motherboard. Look for a chip with "SMC" in large lettering and "FDC37C665GT" just below it. If you are unable or unwilling to inspect the motherboard you should check the the system documentation of contact the manufacturer. Solutions to this problem are available but depend on the version of Windows (and the comm.drv) you are using. Users of Windows 3.0 should start by upgrading to Windows 3.1, 3.11 or Windows for Workgroups 3.11. Users of Windows 3.1 or 3.11 should replace the comm.drv file in the Windows System directory with an updated version (see below). Users of Windows for Workgroups 3.11 should replace the serial.386 file in the Windows System directory with an updated version (see below). In fact, all Windows for Workgroups 3.11 users (with or without the SMC 665 controller) should install the updated version of serial.386 since it also corrects another communications problem. Both of these files together with a DOS utility and readme's are included in the file serial.zip available from ftp.smc.com and mirrored at ftp.best.com.
8. Frequent Disconnects Hopefully, the above information will enable you to establish communications. However, it's possible that you will be plagued by frequent disconnections. You have my sympathies because these problems can be extremely difficult to diagnose and resolve. Unfortunately, every link in the chain is suspect. You will need to look for "patterns". For example, does the problem occur when communicating with one particular site or many ? Or, is the problem related to one particular host modem ? There may be a software configuration problem, a hardware problem (at either end) or a telephone line quality problem anywhere en route. Here are some tips I've accumulated over the years. If you use an internal modem, ensure that the card is seated firmly. And, if you use an external modem, be sure to use a high quality cable from the PC to the modem and check that it is securely connected. Ensure that you have the cleanest possible connection from your modem to the telephone company junction box ("inside wiring"). I recommend that you run a direct line from the modem to the Standard Network Interface (SNI - the telephone company junction box). Use good quality cable and route it away from power lines and other sources of electromagnetic interference. Use "Telephone Station Wire" with 24AWG solid conductor (available from Radio Shack) in preference to regular "modular" cable sold in many electrical stores. If absolutely necessary, use shielded cable (available from specialist network suppliers). Try to eliminate as many junction boxes as possible. Where they are unavoidable, ensure the best possible connection (use a soldering iron if possible). Yes, I know several folk who have solved problems by tightening down the connectors. Do not be too reluctant to blame the telephone company. In my experience, there's at least a 50% probability that the problem lies with the telephone company. The following experiment has solved many problems in the past: Turn off the television, stereo etc. Connect a regular telephone handset to the data line. Pick up the handset, dial 1 (this will silence the dial tone) and listen very carefully. If you can hear a lot of hiss or, more likely, an occasional "scratching" noise, there is definitely a line problem and you should report it to your telephone company. Unfortunately, a line that sounds "quiet" may still be faulty. If (when) you call the telephone company, do _not_ let them know that you are a nerd with a modem (it really is an advantage if you can "hear" the problem). Telephone companies _hate_ modems and they will probably give you a standard lecture informing you that they don't guarantee more than 3 bits per hour. Curiously though, you may find more sympathy and responsiveness if you tell them that you have a Fax problem. After all, Fax machines don't contain modems, do they ??? . Some modems will provide quantitative readouts of signal strength and line quality. Consult your modem manufacturers documentation for details. This can be useful in diagnosing problems (but don't expect the phone company to be very interested in your results).
9. USR Sportster Problems A problem has become apparent and it goes under the now infamous name of "Spiral Death Syndrome". The communications link falls back to progressively slower speeds such that a 28,800 connection may actually be running at 9,600 after half an hour or so. The ATI6 command will show the speed of the current (or last) connection. After some weeks of controversy, USR have issued a fix. Ensure your ROM date is 4/18/95 or later. New ROM's are available free of charge to registered Sportster owners. Those customers who have obtained and installed new ROM's report substantial improvements in the reliability and performance of their connections. Many of us dearly wish that USR would provide more specific details of the problems fixed (and not fixed) by their various firmware revisions. Nevertheless, I strongly recommend that all Sportster owners obtain the latest ROM's.
10. Other Notes A number of data communications (and other) problems with Windows have been associated with video drivers. There have been many instances of video cards based on the S3 chip causing data loss and dropped characters. People have experienced this problem with a Number 9 GXE64/Pro video card. Updated drivers are available and you are encouraged to contact your video card manufacturer. Video cards and drivers are a source of many problems - always ensure that you have the latest version. In addition S3 based video cards can conflict with devices configured on the COM 4 port. Other hardware drivers and DOS Terminate and Stay Resident (TSR) programs have also been known to cause comm overruns and other errors. Generally, these problems arise when the program hogs the processor and prevents the processor from servicing the comm port in a timely fashion. Communications software that utilise INT14 i/o can also cause comm overruns. Check system.ini for the presence of an int14 driver.

 Mail  HOME