USB device PNP

I want to buffle system as some USB device is attached to the system. will it be possible in working in following steps.

  1. Capturing device object in Adddevice and dispatch PNP which starts device by calling minor functions and writing in a file.
  2. Then capturing URB’s which give interface descriptions and vendor id etc and logging in a file.
  3. Now i disconnect the device.
  4. Now i want to buffle system as USB device is still attached to it. As all the information coming from USB devices is with us stored in a file. Can we use this stored values and buffle system. If yes then how?

now device is not attached to computer then how can be adddevice, dispatchedPNP functions can be called. How these plug and play event can be provided to OS so that it can start loading drivers for it? Can anyone provide me this information.

Thanks in Advance
Chandrakant Tripathi

> 3) Now i disconnect the device.

The bus driver detects this and signals the PnP Manager to tear down the PnP
tree for this device.

Now i want to buffle system as USB device is still attached to it.

It seems you should write your own bus driver for virtual USB controller.

How these plug and play event can be provided to OS so that it can start
loading drivers for it?

This event is provided through response to IRP_MN_QUERY_DEVICE_RELATIONS ::
BusRealtions request.


Slava Imameyev, xxxxx@hotmail.com

wrote in message news:xxxxx@ntdev…
>I want to buffle system as some USB device is attached to the system. will
>it be possible in working in following steps.
> 1) Capturing device object in Adddevice and dispatch PNP which starts
> device by calling minor functions and writing in a file.
> 2) Then capturing URB’s which give interface descriptions and vendor id
> etc and logging in a file.
> 3) Now i disconnect the device.
> 4) Now i want to buffle system as USB device is still attached to it. As
> all the information coming from USB devices is with us stored in a file.
> Can we use this stored values and buffle system. If yes then how?
>
> now device is not attached to computer then how can be adddevice,
> dispatchedPNP functions can be called. How these plug and play event can
> be provided to OS so that it can start loading drivers for it? Can anyone
> provide me this information.
>
> Thanks in Advance
> Chandrakant Tripathi
>

To put it more bluntly, you cannot script the usb bus driver. If you
want a virtual usb device, you have to build the entire infrastructure
on your own. You would have to write a bus driver that handles all the
URBs, query interfaces and all the other IOCTLs that usbhub supports.
This is not an easy task. Once you get this working, you will have to
simulate the device. I guess your saved log file can be used for this,
but what is the point then? I would think if you were going to write a
simulation that you would want to simulate new behavior to test other
aspects of the driver.

There is a new device simulation framework in the WDK, I don’t know if
usb support is in there yet, but it is worth invstigating.

If you decide to go down this route, KMDF will make your life much
easier for writing the bus driver.

d

– I can spell, I just can’t type.

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Slava Imameyev
Sent: Thursday, August 24, 2006 4:19 AM
To: Windows System Software Devs Interest List
Subject: Re:[ntdev] USB device PNP

  1. Now i disconnect the device.

The bus driver detects this and signals the PnP Manager to tear down the
PnP tree for this device.

Now i want to buffle system as USB device is still attached to it.

It seems you should write your own bus driver for virtual USB
controller.

How these plug and play event can be provided to OS so that it can
start loading drivers for it?

This event is provided through response to IRP_MN_QUERY_DEVICE_RELATIONS
::
BusRealtions request.


Slava Imameyev, xxxxx@hotmail.com

wrote in message news:xxxxx@ntdev…
>I want to buffle system as some USB device is attached to the system.
will
>it be possible in working in following steps.
> 1) Capturing device object in Adddevice and dispatch PNP which starts
> device by calling minor functions and writing in a file.
> 2) Then capturing URB’s which give interface descriptions and vendor
id
> etc and logging in a file.
> 3) Now i disconnect the device.
> 4) Now i want to buffle system as USB device is still attached to it.
As
> all the information coming from USB devices is with us stored in a
file.
> Can we use this stored values and buffle system. If yes then how?
>
> now device is not attached to computer then how can be adddevice,
> dispatchedPNP functions can be called. How these plug and play event
can
> be provided to OS so that it can start loading drivers for it? Can
anyone
> provide me this information.
>
> Thanks in Advance
> Chandrakant Tripathi
>


Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

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