Win4Lin User's Guide

About COM Port Device Definition

DOS and Windows sessions can use COM ports by having Linux control the physical port (virtual attachment). In addition, some systems allow DOS and Windows sessions to use a COM port by allowing DOS or Windows to control it (direct attachment).

Direct attachment is less reliable when the system is heavily loaded, but it may be faster than virtual attachment.

Use this view of the Device Definition window to view or modify existing COM1 and COM2 port definitions. Depending on which type of COM token you have selected, the information displayed will either contain a virtual or a direct attach device definition.

Using this view, you can also delete existing COM port definitions or create new ones.

For more information about the general subject of device definitions and managing them, see About Device Definition.

COM Port Virtual Attach Device Definition

A COM port virtual attach device is a Linux serial port that a DOS or Windows process refers to as COM1 or COM2 and accesses through Win4Lin.

You can create new COM port virtual attachment definitions when the standard ones provided by Win4Lin are not adequate. For example, you might have a multiport card, where the manufacturer provides a special driver to run under Win4Lin.

COM port devices defined here are available for attachment in the COM1 or COM2 selection lists in the Devices view of the Personal Win4Lin Session Configuration window.

VPI and PPI Specification

A virtual attach definition must specify:

IRQ and IO Port Specification

The controls that specify the IRQ and IO port of the device are below the VPI Device and PPI Device text boxes.

Creating New Definitions

NOTE: There is no current need to create new definitions, because all the possible definitions are created when Win4Lin is installed. There exists no facility to create new VPI and PPI devices. If in the future new VPI and PPI devices are made available, then use the following steps to create a new COM port virtual attach device definition:

  1. Click on the New button to create a new token name for the COM port device. Alternatively, you can select an existing definition (e.g., com1) from the list of tokens, modify the settings appropriately, and then save the resulting definition under a new token name.

  2. Enter the VPI device name in the VPI Device text box.

  3. Enter the PPI device name in the PPI Device text box.

  4. Click on the Add button below the IRQ list box, and enter the IRQ the device uses. Some devices may use more than one IRQ. If so, specify an entry for each IRQ the device uses.

    If you make a mistake, click on the incorrect entry to highlight it, and then click on the Remove button below the IRQ list box to delete the incorrect entry. Then, reenter the correct IRQ as described in step 4.

  5. Click on the Add button below the IO Port list box, and enter the IO port address range that the device uses. Some devices may use more than one range of IO port addresses. If so, specify an entry for each address range the device uses.

    If you make a mistake, click on the incorrect entry to highlight it, and then click on the Remove button below the IO Port list box to delete the incorrect entry. Then, reenter the correct address range as described in step 5.

  6. Enter a description for the device in the Description text box, and specify the appropriate Usable By and Failure Action settings. See About Device Definition if you need an explanation of the appropriate settings for these fields.

  7. Click on the Save or Save As button to save your new COM port definition. You can now use the Devices view of the Personal Win4Lin Session Configuration window to attach this device to your DOS or Windows session.


Note: The IRQ and IO Port settings you specify are only for informational purposes about the virtual IRQ and IO ports that are used. (For instance to find conflicts over the use of virtual IRQs or IO port addresses.) It is not important for these to match what the real device uses.