[This is
preliminary documentation and subject to change.]
This sample demonstrates
a simple controller-less modem driver. This driver supports sending and
receiving AT commands using the ReadFile/WriteFile calls or via a TAPI
interface using an application such as HyperTerminal.
The sample works on
Windows 2000, 32-bit and 64-bit platforms, and Windows XP. Both checked
and free builds are available.
From the
Free or Checked Build environment, execute build in the sample\sys
directory.
The
driver is installed using the INF file mdmfake.inf, which is provided in the
sample\inf directory.
To
install this driver, a PCI enumeration event must first take place. Mdmfake.inf has been pre-configured with the
device ID PCI\VEN_9999&DEV_9999.
In
the Phone and Modem Options CPL:
1.
Click Modems to view the list of modems installed.
2.
Click Add then Next
3.
The PCI device will then enumerate a PCI Simple
Communications Controller.
4.
At the found new hardware wizard, select Install from a
list or specific location (Advanced).
5.
Uncheck Search removable media (floppy, CD-ROM…)
6.
Check Include this location in the search:
7.
In the directory pull down list, enter the location of the
driver.
8.
Click Next.
Note
that if you get a warning dialog with regards to Windows Logo, or unsigned
drivers, testing then click on continue.
Once
installed, you can talk to the fakemodem driver through HyperTerminal, or via
ReadFile/WriteFile calls. The AT
command set supported by fakemodem includes:
AT returns OK
ATA returns CONNECT
ATD<number> returns CONNECT
With a checked version of
fakemodem.sys, you can control the volume of debug information generated by
changing the registry variable DebugFlags. Refer to fakemodem.h for more
information.
Directory: Inf
File Description
mdmfake.inf INF file for installing the fakemodem driver
Directory: Sys
File Description
init.c Fakemodem driver initialization entry points
readwrit.c Routines for receiving and sending text. This includes processing AT commands.
open.c Routines for opening and closing device extensions.
util.c Auxiliary functions.
pnp.c Routines for handling Plug & Play events.
ioctl.c Routines to handle IOCTL messages.
power.c Routines to handle power management messages.
|
© Microsoft Corporation
2000