Dear All,

I want to control USB hub. I found the command "UsbBuildVendorRequest"
may be work ,but I can't find some example which can teach me . Could
anybody tell me how to use that or where to find some example?

Thanks for your help
Randy

Re: How to use "UsbBuildVendorRequest"? by Tim

Tim
Tue Jul 01 00:19:58 CDT 2003

"Randy" <randy@email.geniusnet.comt.tw> wrote:
>
> I want to control USB hub. I found the command "UsbBuildVendorRequest"
>may be work ,but I can't find some example which can teach me . Could
>anybody tell me how to use that or where to find some example?

UsbBuildVendorRequest is used to send a vendor commands to a USB device,
not a USB hub.

What is it you hope to do to your USB hub? 99.99% of everything a USB hub
needs to do is handled automatically by the standard USB hub drivers,
USBHUB.SYS or USBCCGP.SYS.
--
- Tim Roberts, timr@probo.com
Providenza & Boekelheide, Inc.

Re: How to use "UsbBuildVendorRequest"? by Randy

Randy
Tue Jul 01 22:43:49 CDT 2003

Thanks for your reply,
I write a filter driver on the usbhub.sys and I want to use it to close or
open the port of the Hub. I guess I should use URB to control the Hub , but
I can't find some useful sample code.

Thanks for your help
Randy

"Tim Roberts" <timr@probo.com> ?????
news:0a62gvg1c5sbobk18merac0cah9p3ai4dg@4ax.com...
> "Randy" <randy@email.geniusnet.comt.tw> wrote:
> >
> > I want to control USB hub. I found the command
"UsbBuildVendorRequest"
> >may be work ,but I can't find some example which can teach me . Could
> >anybody tell me how to use that or where to find some example?
>
> UsbBuildVendorRequest is used to send a vendor commands to a USB device,
> not a USB hub.
>
> What is it you hope to do to your USB hub? 99.99% of everything a USB hub
> needs to do is handled automatically by the standard USB hub drivers,
> USBHUB.SYS or USBCCGP.SYS.
> --
> - Tim Roberts, timr@probo.com
> Providenza & Boekelheide, Inc.



Re: How to use "UsbBuildVendorRequest"? by Tim

Tim
Wed Jul 02 22:23:25 CDT 2003

"Randy" <randy@email.geniusnet.comt.tw> wrote:
>
>Thanks for your reply,
>I write a filter driver on the usbhub.sys and I want to use it to close or
>open the port of the Hub. I guess I should use URB to control the Hub , but
>I can't find some useful sample code.

"Close or open the port of the Hub"? I don't know what that means. Are
you trying to disable and re-enable the whole hub? That seems unlikely,
since the filter would be unloaded along with the hub driver.

Are you trying to disable and re-enable specific ports on the hub? You
should be able to do that with IOCTL_USB_HCD_DISABLE_PORT and
IOCTL_USB_HCD_ENABLE_PORT, or perhaps even IOCTL_INTERNAL_USB_CYCLE_PORT.

I have no clue what parameters those ioctls take. A web search might be
fruitful.
--
- Tim Roberts, timr@probo.com
Providenza & Boekelheide, Inc.