Install usb kmdf bus driver

Hello guys:
I have to develop a kmdf bus driver for a usb-serial device and I took the code for dynamic enumeration from the DDK toaster examples. Now I was wondering, do I need to install it using the inf file modified? do I have to tell to the inf the vid/pid settings of my device as a regular fdo driver? I suppose that kmdf will know is a bus driver based in the kmdf-bus-specific calls I made in the code.
Thanks!

The INF has nothing to do with being the parent in a bus driver other than matching on the hw ID for your device to get the driver installed. Once your driver is installed, it can enumerate all the children it wants. Each of those children will probably have their own INF (if they are all the same type of child, one INF for all of the child will suffice). If the number of children you enumerate is static or based off of some hw constraint, I would think the static enumeration sample is a better starting point. Will the children you enumerate come and go dynamically or once enumerated, always stay?

d

-----Original Message-----
From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of xxxxx@pounceconsulting.com
Sent: Tuesday, March 15, 2011 2:56 PM
To: Windows System Software Devs Interest List
Subject: [ntdev] Install usb kmdf bus driver

Hello guys:
I have to develop a kmdf bus driver for a usb-serial device and I took the code for dynamic enumeration from the DDK toaster examples. Now I was wondering, do I need to install it using the inf file modified? do I have to tell to the inf the vid/pid settings of my device as a regular fdo driver? I suppose that kmdf will know is a bus driver based in the kmdf-bus-specific calls I made in the code.
Thanks!


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:
They are dynamic because you plug the device use it and unplug it as an usb memory. Ok so I am starting to understand. I develop the usb bus driver, the inf for this driver just has to be aware of the hw id of the usb device and matched it (so all the children must have the same hw id). Then I can install my fdo driver for the whole usb-serial device. Because they are dynamically enumerated I have to keep an unique id (like serial number) for each children

Do you have serial ports being plugged into your usb device or is just the usb device itself hotplug? If just the device itself is hotplug (just like any usb device), but the ports you enumerate are fixed (b/c the hw is constant), you should use static enumeration

d

-----Original Message-----
From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of xxxxx@pounceconsulting.com
Sent: Tuesday, March 15, 2011 4:07 PM
To: Windows System Software Devs Interest List
Subject: RE:[ntdev] Install usb kmdf bus driver

Doron:
They are dynamic because you plug the device use it and unplug it as an usb memory. Ok so I am starting to understand. I develop the usb bus driver, the inf for this driver just has to be aware of the hw id of the usb device and matched it (so all the children must have the same hw id). Then I can install my fdo driver for the whole usb-serial device. Because they are dynamically enumerated I have to keep an unique id (like serial number) for each children


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

xxxxx@pounceconsulting.com wrote:

They are dynamic because you plug the device use it and unplug it as an usb memory. Ok so I am starting to understand. I develop the usb bus driver, the inf for this driver just has to be aware of the hw id of the usb device and matched it (so all the children must have the same hw id). Then I can install my fdo driver for the whole usb-serial device. Because they are dynamically enumerated I have to keep an unique id (like serial number) for each children

I’m confused by your architecture (and suspect you may be, too). So,
your hardware is a USB serial device. Is that right? What sits on the
other side of the serial connector? Where does mass storage fit into
this? What will the child devices actually be?


Tim Roberts, xxxxx@probo.com
Providenza & Boekelheide, Inc.

Sorry guys probably I did not explain myself well. This device connects to the PC with an usb cable and in the other side of the board there is a serial connector so can communicate to other PC using serial communication. I assumed it that the bus driver must be developed and installed (on top of the usbhub) and then the FDO driver of the device will recognize the device when plugged and create the virtual com port (on top of the PDO created by the bus driver when the device plugged) So (sorry for my ignorance) the bus driver should enumerate the device as an virtual com port as well as the FDO of the device? and in this case as Doron points out, the static enumeration is the initial point.

xxxxx@pounceconsulting.com wrote:

Sorry guys probably I did not explain myself well. This device connects to the PC with an usb cable and in the other side of the board there is a serial connector so can communicate to other PC using serial communication. I assumed it that the bus driver must be developed and installed (on top of the usbhub) and then the FDO driver of the device will recognize the device when plugged and create the virtual com port (on top of the PDO created by the bus driver when the device plugged) So (sorry for my ignorance) the bus driver should enumerate the device as an virtual com port as well as the FDO of the device? and in this case as Doron points out, the static enumeration is the initial point.

Well, then you don’t have a “bus” at all. You just have a simple USB
serial driver. It speaks USB on the bottom end, and serial port on the
top end.

Note that your driver will not “recognize the device when plugged in”.
That’s all done by the USB subsystem. When your device is detected, the
system will automatically find and load your driver. Your driver just
has to create the serial port.

There is already a driver that does this, with varying degrees of
success, called “usbser”.


Tim Roberts, xxxxx@probo.com
Providenza & Boekelheide, Inc.

Does it have to be a serial port interface ? That is one of the more complex and hard to get right interfaces in windows and for a new driver dev, an esp hard task. If this is a custom app and driver vertical solution consider a custom ioctl interface instead.

d

dent from a phine with no keynoard

-----Original Message-----
From: xxxxx@pounceconsulting.com
Sent: Tuesday, March 15, 2011 4:44 PM
To: Windows System Software Devs Interest List
Subject: RE:[ntdev] Install usb kmdf bus driver

Sorry guys probably I did not explain myself well. This device connects to the PC with an usb cable and in the other side of the board there is a serial connector so can communicate to other PC using serial communication. I assumed it that the bus driver must be developed and installed (on top of the usbhub) and then the FDO driver of the device will recognize the device when plugged and create the virtual com port (on top of the PDO created by the bus driver when the device plugged) So (sorry for my ignorance) the bus driver should enumerate the device as an virtual com port as well as the FDO of the device? and in this case as Doron points out, the static enumeration is the initial point.


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 wrote:

Does it have to be a serial port interface ? That is one of
the more complex and hard to get right interfaces in windows
and for a new driver dev, an esp hard task. If this is a custom
app and driver vertical solution consider a custom ioctl interface
instead.

Or if the device does not speak CDC ACM, develop a lower filter that translates to it. I think this would still be easier than making yet another USB serial driver.