usb modem driver don't produce DBT_DEVICEARRIVAL message

Dear all.
I’m writting a USB modem driver, after register setup class interface for this modem driver, I created a symbol link COM*. So application can use this COM port to send AT command to USB modem driver. It work successfully.
But application can not receive the DBT_DEVICEARRIVAL message with DBT_DEVTYP_PORT. why?. I find application can receive the DBT_DEVICEARRIVAL message with modem’s registered setup class interface GUID.

Does anyone know this?

thank you very much.

huaping jiang wrote:

But application can not receive the DBT_DEVICEARRIVAL message
with DBT_DEVTYP_PORT. why?. I find application can receive the
DBT_DEVICEARRIVAL message with modem’s registered setup
class interface GUID.

I don’t know the answer, but here’s how I would go about it…

  1. Set up a simple app that prints out arrival/removal messages and the DBT_DEVTYP_xxx value. Then disable/enable the (real/hardware) serial ports on your machine. Do you get the message?

  2. Try #1 again with usbser.sys or some other reference driver, does it work?

  3. Are you setting your device type to FILE_DEVICE_SERIAL_PORT? Or what?

Admittedly the SDK docs don’t seem to say what/how/who generates DBT_DEVTYP_PORT, but this seems like a reasonable guess.

This piqued my interest so I searched through the source to see who broadcasts DBT_DEVTYP_PORT. What I found was when an instance of GUID_DEVINTERFACE_COMPORT (or GUID_DEVINTERFACE_PARALLEL) is enabled, this message is also sent. This does depend on the “PortName” value being present in the devnode’s Device Parameters key for the device as well so that the sender knows why port name to put into the message.

d

-----Original Message-----
From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of xxxxx@gmail.com
Sent: Wednesday, February 27, 2008 7:18 PM
To: Windows System Software Devs Interest List
Subject: RE:[ntdev] usb modem driver don’t produce DBT_DEVICEARRIVAL message

huaping jiang wrote:

But application can not receive the DBT_DEVICEARRIVAL message
with DBT_DEVTYP_PORT. why?. I find application can receive the
DBT_DEVICEARRIVAL message with modem’s registered setup
class interface GUID.

I don’t know the answer, but here’s how I would go about it…

  1. Set up a simple app that prints out arrival/removal messages and the DBT_DEVTYP_xxx value. Then disable/enable the (real/hardware) serial ports on your machine. Do you get the message?

  2. Try #1 again with usbser.sys or some other reference driver, does it work?

  3. Are you setting your device type to FILE_DEVICE_SERIAL_PORT? Or what?

Admittedly the SDK docs don’t seem to say what/how/who generates DBT_DEVTYP_PORT, but this seems like a reasonable guess.


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

Doron Holan
I have fixed this issueusing the GUID_DEVINTERFACE_COMPORT.
Thank you very much.

BTW, thank you Chris.