You are currently offline, waiting for your internet to reconnect

Troubleshooting Serial Port Problems in Windows

This article was previously published under Q105940
When you use the Microsoft Windows or Microsoft Windows for WorkgroupsTerminal program, you have problems connecting to the modem, or you receivethe following error message:
The COM<x> port is currently assigned to a MS-DOS application. Do you want to reassign the port to Windows?
You may also have difficulty attaching to the modem through other Windows-based communications packages, or your mouse (or other serial device) maynot operate properly in Windows.
Most problems associated with the serial ports occur when a machine doesnot recognize that it has the specified communications (COM) portavailable.

Windows supports the use of COM ports 3 and 4, although the following stepsmay be necessary to make them accessible. For example, if your mouse is notworking in Windows, or you cannot access your modem through Windows, youmay need to rewrite the BIOS Data Area for your serial ports. By placing anaddress for each serial port in a Debug script file, you can ensure futurecompatibility if you add or remove a device. (Creating a Debug script fileshould not be required for Windows for Workgroups 3.11.)
  1. When you troubleshoot communications problems in Windows, an MS-DOS-based communications program is often required to test the modem and ports outside Windows. This can help you to determine if you are having an issue in with Windows, or something else.

    If an MS-DOS-based program cannot be used, you can test the modem connections by typing the following command at a safe-mode command prompt outside Windows
    Echo ATM1L3X0DT12345 > COMx
    where "x" represents the COM port in question.

    The modem should dial the touch tone digits "12345".

    To hang up the modem, type
    Echo ATH0 > COMx
    where "x" represents the COM port in question.

    The ATM1L3X0DT12345 command is a signal to the modem to dial the numbers"12345". The first command, Attention, signals to the modem that it isabout to receive information, M1 is a universal command to turn themodem's speaker on if it is off by default, L3 is a universal command toraise the modem's speaker volume to the maximum level if it is at thelowest by default, X0 is a universal command that signals the modem toexecute the command without waiting for a dial tone (useful if modem andvoice calls use the same phone line), and the DT12345 command instructsthe modem to dial out the digits 1-5.
  2. To determine if your machine is recognizing the existence of the COM port your modem or mouse is on, do the following:

    1. Use the MS-DOS DEBUG command to look at the BIOS table.

      NOTE: You may also run the Microsoft Diagnostics utility (MSD).
    2. Quit Windows. At the MS-DOS command prompt, type:
      This returns a hyphen prompt (-).
    3. At the hyphen prompt, type:
      This returns a listing of the BIOS data and the hyphen prompt.

      NOTE: After you review the table, you can type Q to quit Debug.
    4. Look at the table of data on the screen. The first row is the important one. It shows a line resembling the following:
      0040:0000 F8 03 F8 02 E8 03 00 00-78 03 00 00 00 00 00 00
      All values to the left of the hyphen are COM ports; all values to the right are LPT ports. The example above shows that the computer has COM1 at address 03F8 (it is listed in reverse byte order), COM2 at 02F8, and COM3 at 03E8. COM4 is not found; therefore, 0000 is displayed just to the left of the hyphen. If the machine does not recognize the COM port desired to be used by Terminal (identified by the 0000 entries), continue as follows. If the machine does recognize the desired COM port, skip to the "SYSTEM.INI Modifications" section below in this article.
  3. The following instructions help you write the Debug script and place it in the AUTOEXEC.BAT file:
    1. Use a text editor such as Microsoft Windows Notepad and create the following file:
               E40:0         F8 03 F8 02 E8 03 E8 02         q								

      NOTE: You must follow the "Q" with a carriage return (press ENTER).
    2. Save the three-line file, and give it a name such as:
    3. Execute the Debug script file by typing the following at an MS-DOS command prompt outside Windows:
      debug < fixcom.deb > nul
    4. If the step above works correctly, add a line to the end of the AUTOEXEC.BAT file (but before launching Windows), such as the following:
      debug < fixcom.deb > nul								
      NOTE: The > NUL ending is just to keep the script from being echoed back to the screen. You can use Debug again to look at d40:0 and see if the change took effect.
    5. Save the AUTOEXEC.BAT file and reboot the machine.

      This procedure should work even if the machine does not have devices on all four serial ports. This also corrects problems if a device has been removed from COM1 and the addresses have slid down, which may cause mouse problems.

      You should now be able to run MSD or Debug and see all four COM ports.

SYSTEM.INI Modifications

If the port is recognized by the machine, note the address that is listedwhen using Debug, and, for Windows 3.0 and 3.0a, edit the SYSTEM.INI fileand include the following COMxBase= lines to coincide with the base I/Oaddress used by the hardware. The examples given above for COM1 and COM2 donot require any changes to the SYSTEM.INI file. If you are using Windows3.0, the examples given below for COM3 and COM4 require the followingentries in the [386Enh] section of the SYSTEM.INI file:
   COMxBase Setting                Windows 3.0 Default   ---------------------------------------------------   COM1Base=3F8h                   <default is 3F8h>   COM2Base=2F8h                   <default is 2F8h>   COM3Base=3E8h                   <default is 2E8h>   COM4Base=2E8h                   <default is 2E0h>				
For Windows 3.1 and Windows for Workgroups 3.1 and 3.11, choose the Portsicon in Control Panel to set the base I/O address and interrupt for eachCOM port instead of editing the SYSTEM.INI file.(This is the only steprequired for Windows for Workgroups 3.11.)

The defaults for Windows 3.1 and Windows for Workgroups 3.x are:

   COM1Base=3F8h                   <default is 3F8h>   COM2Base=2F8h                   <default is 2F8h>   COM3Base=3E8h                   <default is 3E8h>   COM4Base=2E8h                   <default is 2E8h>				
If you are using a serial mouse on COM1 and you have an internal modem onCOM3, this configuration may not work because the mouse is using theinterrupt that COM3 wants to share. This behavior also occurs if you areusing a serial mouse on COM2 and want to use an internal modem on COM4.This configuration is more likely to work on machines that allow for IRQsharing (such as Micro Channel Architecture [MCA] computers).

If COM3 is required, it should be reconfigured at the board level touse a different interrupt that is free, such as IRQ 5.
3.00 3.10 3.00a BIOS slide slip move sliding debugging terminal.exe com1 com2 com3 com4 AT DT DOS w_works hometool works for windows win95 hyperterminal win95x

Article ID: 105940 - Last Review: 07/07/2005 18:37:00 - Revision: 1.1

  • Microsoft Windows for Workgroups 3.2
  • Microsoft Windows 3.0 Standard Edition
  • Microsoft Windows 3.0a
  • Microsoft Windows 3.1 Standard Edition
  • Microsoft Windows 3.11 Standard Edition
  • Microsoft Windows 95
  • KB105940