Modems in Microsoft Windows Operating Systems Microsoft Corporation December 15, 1998 (Editor's Note: The information in this article is subject to change. For the most current version, please check the Web page at http://www.microsoft.com/hwdev/devdes/modem_up.htm.) This paper defines Microsoft© Windows© modems and describes how they fit into various Microsoft operating systems. Design considerations for controllerless modems, software modems, and USB modems are presented. Note Windows CE is not within the scope of this paper. What Is a Windows Modem? Narrowly defined, a Windows modem is one that moves some traditional modem functions into a Windows driver. Typically, this driver emulates Serial.vxd for systems running Windows or Serial.sys for Windows NT©. A common classic modem has five components: 1. Hardware telephone line interface with connectors, high-voltage transient protection, ring detectors, relays, transformers, codecs, and so on. 2. Digital signal processing (DSP; for example, V.34 signaling). 3. Modem-to-modem protocols (for example, V.42 error control, V.42 bis data compression). 4. Modem control command interpreter (for example, V.25 ter and proprietary command sets). 5. Serial PC-modem interface, either a COM port (V.24), or by a serial port device exposed on another bus (ISA, PC Card, PCI). As described in this article, a controllerless modem implements items 3 to 5 in a Windows driver. In contrast, a software modem implements items 2 to 5 in a Windows driver. The lower end of either driver will connect to proprietary hardware through a bus-specific driver. More broadly defined, a Windows modem includes any modem that depends on a Windows driver. In particular, this group includes modems installed on USB. USB modems can be complete (items 1 to 4 in the list above), controllerless (items 1 to 2), or software (item 1). How These Modems Fit into Windows Operating Systems Legacy modems expose logical serial interfaces with AT commands and responses for data, fax, voice, video, and mobile communications. Legacy modem access software is designed to those standard interfaces. Telephony API (TAPI) and Unimodem are also designed to the same interfaces. In Windows 95, the Unimodem VxD drives modems through Vcomm.vxd. Traditional modems are accessed through Serial.vxd. Windows modem drivers under Windows 95 emulate Serial.vxd. The system loads this new driver when Plug and Play finds the hardware, the ID points to an INF file, and the INF file invokes the system to load it. In Windows NT 4.0 or Windows 2000, the kernel-mode SYS driver named Modem.sys drives Serial.sys directly. In Windows NT 4.0, without Plug and Play, installation is not simple. In Windows 2000, the driver must support Plug and Play and power management. In Windows 98, both VxD and SYS drivers can be supported. A properly designed Windows 95 VxD modem driver will work directly in Windows 98. With a suitable adaptation layer, a Windows 2000-style SYS modem driver that uses only Windows Driver Model (WDM) kernel services will also work. In Windows 98, the advantage of designing to WDM is that the driver can access other WDM services, such as the USB and IEEE 1394 bus drivers, kernel-mode streaming, and HID support. This is particularly important for voice modems and software modems. Ccenum.vxd and Ccport.vxd are adapters that would allow Serial.sys drivers to be detected, installed, and run under Vcomm. These adapters will not be included in Windows 98. However, they might be completed and released for use by modem independent hardware vendors (IHVs) and PC original equipment manufacturers (OEMs) at some future date. Considerations for Controllerless Modems Controllerless modems are the easiest type of Windows modem to deal with. The functions moved into Windows are data processing functions, previously implemented in controllers (for example, 6500 family, Z80 family, 68302, 80186, 386EX, 8051 family, and so on). There is no floating point and the processing load is small. With enough buffer in the data paths, the system responsiveness provided by Windows 95 or Windows NT 4.0 is sufficient. It saves the cost of the controller CPU, I/O, and memory. Substantive problems with controllerless modems-which are common to all Windows modems-are the following: * Multiple target platforms: Windows 95, Windows 98, Windows NT 4.0, Windows 2000. * Installation: Retail or OEM. * Multiple modems running in a system. * Uninstallation, reinstallation after a disk rebuild, and operating system upgrade. * Multiprocessor operating environment under Windows NT. * Anecdotal evidence of performance problems. For common modems, the drivers are based on a common INF file format between various versions of Windows. If the particular modem is not recognized, the "standard modem" INF file (Mdmgen.inf) is usually sufficient to achieve basic data and fax functionality. Currently, the hardware for controllerless or software modems in not standardized. Drivers for these modems are not routinely included in operating system releases. Therefore, if the driver is inadvertently lost or crippled due to operating system changes, then the modem is broken. The same modem INF file format is used in all Windows 9x and Windows NT operating systems. A code-dependent modem needs adaptation to these different platforms: * Windows 95 only supports VxD and lacks support for USB or ACPI. * Windows NT 4.0 has a completely different driver model and lacks Plug and Play support. * Windows 98 adds power management support, which is a requirement for some modem types. It also adds the WDM option and USB support. * Windows 2000 has a different driver model, but adds Plug and Play, ACPI, and USB. Most of these modems are sold through PC OEMs. In that case, the initial installation is done before the customer can see a problem. However, it is Microsoft's experience that poorly implemented drivers can lock up a system during uninstallation (for example, during operating system upgrade or modem upgrade.) Microsoft requires a Windows 2000 driver for all new hardware to pass WHQL testing. Windows modems are not an exception. There are no basic technical barriers. Some controllerless modems have already passed testing with Windows 2000 drivers. The basic resource is the current version of the Windows 2000 DDK, available at http://www.microsoft.com/ddk/ddk2kb3.htm. Microsoft intends to push development of Windows 2000 drivers and include these in the CD to enable end users to upgrade from Windows 95 without breaking their modems. Meanwhile, Microsoft technical support staff is accumulating complaints about modem performance, particularly connection failures. The anecdotal evidence is that these are more common with controllerless modems, but there is not enough evidence yet to prove a connection. This might be due to unpredictable delays in interrupt responsiveness, which in turn are due to competition for resources with other software. Considerations for Software Modems Software modems are very challenging. Besides the issues that apply to controllerless designs, software modems are CPU resource hogs. Most known implementations need about 100 MHz on a Pentium processor without MMX technology, maybe half that on a Pentium processor with MMX technology. In either case, software modems depend heavily on use of the floating point unit in ring 0 or in kernel mode. Such modems depend on much tighter control of delay for interrupt request to interrupt response. In perspective, the software modem bucks a strong trend toward hardware accelerators. For example, graphics cards now routinely have rendering accelerators. Common inexpensive Integrated Device Electronics (IDE) drive controllers contain plenty of intelligence. Meanwhile, printers that migrate functions into Windows haven't sold as well as those that include embedded controllers, so they are being discontinued. There are many software modems in development, but they have not yet shipped in quantity. The attraction is the reduced cost from cutting the hardware DSP. The opportunity is the Pentium MMX family of CPUs. If it turns out that controllerless modems are vulnerable to unpredictable interrupt response delays, these problems might be compounded with software modems. Considerations for USB Modems In the short term, there is no standard USB modem driver planned for inclusion in either Windows 98 or Windows 2000. Therefore, modem IHVs need to create their own drivers, to map legacy serial-oriented software (for example, Unimodem) to various versions of USB modems. As with any other applicable bus, USB can support modems with embedded controllers, controllerless modems, and software modems. All three types are illustrated in the current version of the USB Communications Class Device (CDC) specification, currently in development. The draft USB CDC provides support for mapping legacy AT command sets to a pair of endpoints. This configuration does not take advantage of USB's ability to provide separate interfaces for control and data, but it does allow a simple interface between a USB modem and legacy modem software such as Modem.sys, Unimodem.vxd, and Vcomm.vxd. The driver would emulate a serial port (Serial.sys or Serial.vxd), mapping the multiplexed serial data through Usbd.sys. USB drivers for Windows controllerless or software modems would be driving proprietary interfaces and configurations, so the manufacturers are responsible for creating Windows modems drivers, just as they are for similar modems on ISA, PCI, or PC Card modems. Programming Support and Sample Driver For all Windows modems, the primary support tools are the standard DDKs available at www.microsoft.com/ddk/ and through MSDN Professional Subscription and supported by the Microsoft Developer Technical Support team: * Windows 95 and Windows 98: See the appropriate DDK, particularly sample source for Serial.vxd. * Windows NT 4.0: See the Windows NT 4.0 DDK, including sample source for Serial.sys. * Windows 2000: See the current version of the Windows 2000 DDK. More Information For more information, see the Modem Developers Kit and Unimodem Driver, located at www.microsoft.com/hwdev/modem/, which provides access to the Modem Developers Kit (MDK) and related DDK tools. The current PC System Design Guide Modem Requirements, located at www.microsoft.com/hwdev/modem/softmodem.htm, provide further information about software modems. _______________________________________________________________ Send feedback on this article. Find support options. ¸ 2000 Microsoft Corporation. All rights reserved. Terms of use.