Fakemodem sample does not work under Windows 7

Hi,

I am using the current WinDDK, 7600.16385.0. The Fakemodem sample compiles fine under the Win7 x64 Checked Build Environment (I am using an x64 machine). However when trying to install the driver some errors surface.

Trying to install the driver using DevCon fails:

C:.…> devcon.exe install mdmfake.inf {b85b7c50-6a01-11d2-b841-00c04fad5171}\fakemodem

Device node created. Install is complete when drivers are installed…
Updating drivers for {b85b7c50-6a01-11d2-b841-00c04fad5171}\fakemodem from C:\src\fakemodem\objchk_win7_amd64\amd64\mdmfake.inf.
devcon.exe failed.

When I try to install the driver using the ‘Action->Add legacy hardware’ in the Device Manager, I get through all the steps, including choosing either COM1 or COM2 (both pre-existing devices) for the modem. Windows claims that ‘Your modem has been set up successfully’, however the DebugView log states otherwise:

Fakemode Function Driver Sample - Driver Framework Edition.
Built Feb 8 2010 18:36:59
FmEvtDeviceAdd routine
FmCreateDosDevicesSymbolicLink failed with Status code 0xc0000034

Some investigation reveals that the problem is the non-existent registry string value ‘PortName’ under HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\Root\MODEM\0001\Device Parameters. When I manually create that value and assign it e.g. the value “1”, then disable and re-enable the modem, the error disappears from the DebugView log.

However, trying to query the modem by clicking on ‘Query Modem’ in the Diagnostics tab of the properties page of the Modem device fails with ‘The modem failed to respond…’ message. Trying to communicate with the fake modem via the serial port using the ‘putty’ terminal emulator fails as well (maybe because putty is trying to communicate with the actual serial port to which no modem is attached).

I suspect that the problem lies with the install process, since I understand that the ‘PortName’ value should have been automatically created.

I would appreciate it if someone could tell me what I have done wrong.

Thanks,
Yariv

Hi Yariv,
You cannot install the fakemodem sample just by using devcon. You can take a look at the file fakemodem.htm, which is at the same directory as fakemodem.inx, to see detailed instructions on how to install the sample.

Ilias

-----Original Message-----
From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of xxxxx@hotmail.com
Sent: Monday, February 08, 2010 10:05 AM
To: Windows System Software Devs Interest List
Subject: [ntdev] Fakemodem sample does not work under Windows 7

Hi,

I am using the current WinDDK, 7600.16385.0. The Fakemodem sample compiles fine under the Win7 x64 Checked Build Environment (I am using an x64 machine). However when trying to install the driver some errors surface.

Trying to install the driver using DevCon fails:

C:.…> devcon.exe install mdmfake.inf {b85b7c50-6a01-11d2-b841-00c04fad5171}\fakemodem

Device node created. Install is complete when drivers are installed…
Updating drivers for {b85b7c50-6a01-11d2-b841-00c04fad5171}\fakemodem from C:\src\fakemodem\objchk_win7_amd64\amd64\mdmfake.inf.
devcon.exe failed.

When I try to install the driver using the ‘Action->Add legacy hardware’ in the Device Manager, I get through all the steps, including choosing either COM1 or COM2 (both pre-existing devices) for the modem. Windows claims that ‘Your modem has been set up successfully’, however the DebugView log states otherwise:

Fakemode Function Driver Sample - Driver Framework Edition.
Built Feb 8 2010 18:36:59
FmEvtDeviceAdd routine
FmCreateDosDevicesSymbolicLink failed with Status code 0xc0000034

Some investigation reveals that the problem is the non-existent registry string value ‘PortName’ under HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\Root\MODEM\0001\Device Parameters. When I manually create that value and assign it e.g. the value “1”, then disable and re-enable the modem, the error disappears from the DebugView log.

However, trying to query the modem by clicking on ‘Query Modem’ in the Diagnostics tab of the properties page of the Modem device fails with ‘The modem failed to respond…’ message. Trying to communicate with the fake modem via the serial port using the ‘putty’ terminal emulator fails as well (maybe because putty is trying to communicate with the actual serial port to which no modem is attached).

I suspect that the problem lies with the install process, since I understand that the ‘PortName’ value should have been automatically created.

I would appreciate it if someone could tell me what I have done wrong.

Thanks,
Yariv


NTDEV is sponsored by OSR

For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars

To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer

Hi Ilias,

Thanks for your response!

I tried installing it via the device manager as well, following the instruction on the fakemodem.htm file. It didn’t go smoothly - you can read the details in my original post. After some tweaking I got it to install, albeit in a hacky kind of way (had to manually add a value to the registry etc).

However, trying to communicate with the driver using the ‘putty’ terminal emulator, which is similar to hyperterminal, failed, as did querying the ‘modem’ in the Diagnostics tab of the properties page of the Modem device.

Is it possible that the sample was not tested on x64 machines running Windows 7?

Yariv

Hi Yariv,
In your original post you say that you tried to install the fakemodem sample using Action->Add Legacy Hardware, etc.

The fakemodem.htm sample says that you need to install the toaster bus driver first (how did that installation go?), then you need to call notify.exe and pass that particular guid and then you should see another “add new hardware” wizard. At that time you’ll install fakemodem. Is that what you did? If yes, would it be possible to share the logs from the file %windir%\inf\setupapi.dev.log and %windir%\setupact.log that correspond to these 2 driver installations?

Finally, since you’re using x64 systems, I assume that all these drivers (both the bus driver and the fakemodem driver) are signed (or test-signed, but you’ve already set your system to use test signed drivers).

Ilias

-----Original Message-----
From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of xxxxx@hotmail.com
Sent: Wednesday, February 10, 2010 10:28 AM
To: Windows System Software Devs Interest List
Subject: RE:[ntdev] Fakemodem sample does not work under Windows 7

Hi Ilias,

Thanks for your response!

I tried installing it via the device manager as well, following the instruction on the fakemodem.htm file. It didn’t go smoothly - you can read the details in my original post. After some tweaking I got it to install, albeit in a hacky kind of way (had to manually add a value to the registry etc).

However, trying to communicate with the driver using the ‘putty’ terminal emulator, which is similar to hyperterminal, failed, as did querying the ‘modem’ in the Diagnostics tab of the properties page of the Modem device.

Is it possible that the sample was not tested on x64 machines running Windows 7?

Yariv


NTDEV is sponsored by OSR

For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars

To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer