none
IOCTL_USB_USER_REQUEST and USBUSER_PASS_THRU example code.

    질문

  • I am find no information on the above IOCTL and option. Are there any chunks of example code that are publicly available. I've looked at the WinUSB, and it does not have the capabilites from the minimal examples I've found to set the USB request packet with specific values, or receive the USB packet with all that the USB responds.

    2012년 3월 6일 화요일 오전 1:12

답변

  • the two IOCTLs are you are asking about are deprecated and i think they have been unsupported since vista. what problem are you trying to solve? does another driver control the device you want to send these packets to?

    d -- This posting is provided "AS IS" with no warranties, and confers no rights.

    2012년 3월 6일 화요일 오전 4:43
    소유자

모든 응답

  • For IOCTL_USB_USER_REQUEST, look at the "usbview" sample in WDK, probably path will be src\usb\usbview.
    2012년 3월 6일 화요일 오전 4:35
  • the two IOCTLs are you are asking about are deprecated and i think they have been unsupported since vista. what problem are you trying to solve? does another driver control the device you want to send these packets to?

    d -- This posting is provided "AS IS" with no warranties, and confers no rights.

    2012년 3월 6일 화요일 오전 4:43
    소유자
  • John Clark 2006 wrote:
    >
    >I am find no information on the above IOCTL and option. Are there any
    >chunks of example code that are publicly available.
     
    It is not particularly useful, unless you are writing host controller
    diagnostics.  It is used to get information from the host controller driver
    about the host controller.  It is not used to access devices.
     
    >I've looked at the WinUSB, and it does not have the capabilites from
    >the minimal examples I've found to set the USB request packet with
    >specific values, or receive the USB packet with all that the USB responds.
     
    You are completely incorrect.  WinUSB can do anything that a kernel USB
    driver can do, with the exception of isochronous transfers.
    --
    Tim Roberts, timr@probo.com
    Providenza & Boekelheide, Inc.
     

    Tim Roberts, VC++ MVP Providenza & Boekelheide, Inc.
    2012년 3월 6일 화요일 오전 5:22
  • John Clark 2006 wrote:
    >
    >I am find no information on the above IOCTL and option. Are there any
    >chunks of example code that are publicly available.
     
    It is not particularly useful, unless you are writing host controller
    diagnostics.  It is used to get information from the host controller driver
    about the host controller.  It is not used to access devices.

    That was not particularly clear from any of the documentation that I did find on the control.

    It is also not clear how much 'messing around' the WinUSB driver would accept on the setup packet for a control transfer, for reasons that relate to the USB device I'm using, which is a custom device, and doesn't really match up with some set of current 'standards'.

    Since it's my understanding that WinUSB is not a 'standard' driver found in a 'typical' Windows system, I'd have to provide an 'install' package, rather than just use the existing lowest/minimal driver, and a few IOCTL calls to implement communication with the device.


    2012년 3월 6일 화요일 오후 5:35
  • winusb is a standard driver found in a typical windows install. like any other driver, it requires an INF to get it installed on a particular device instance.  now, there are no in box INFs that install winusb on a device, but that is because there is no generic "I am a winusb device" hardware or compatible ID that we could match against in the INF to make that work.  So, what I think you are saying is that you want to use the underlying bus driver, the hub or generic parent, to talk to the device. doesn't work that way.  instead, create an INF and install winusb on the device and party away.

    d -- This posting is provided "AS IS" with no warranties, and confers no rights.

    2012년 3월 6일 화요일 오후 7:13
    소유자
  • winusb is a standard driver found in a typical windows install. like any other driver, it requires an INF to get it installed on a particular device instance.  now, there are no in box INFs that install winusb on a device, but that is because there is no generic "I am a winusb device" hardware or compatible ID that we could match against in the INF to make that work.  So, what I think you are saying is that you want to use the underlying bus driver, the hub or generic parent, to talk to the device. doesn't work that way.  instead, create an INF and install winusb on the device and party away.

    d -- This posting is provided "AS IS" with no warranties, and confers no rights.

    In essence that's what I would have liked... equivalent to 'raw' packet on Ethernet.

    2012년 3월 6일 화요일 오후 7:57
  • no such utility exists. usb is not a com port, it is a protocol bus. the underlying bus relies on the device stacks it enumerates to provide the proper abstraction, otherwise you have the bus and the device stack sending io to the devce in an uncoordinated fashion...chaos ensues.

    d -- This posting is provided "AS IS" with no warranties, and confers no rights.

    2012년 3월 6일 화요일 오후 8:55
    소유자
  • John Clark 2006 wrote:
    >
    >It is also not clear how much 'messing around' the WinUSB driver would
    >accept on the setup packet for a control transfer, for reasons that
    >relate to the USB device I'm using, which is a custom device, and
    >doesn't really match up with some set of current 'standards'.
     
    I'm not sure you really understand how USB works.  WinUSB is almost
    EXCLUSIVELY used on devices that are not in one of the standard USB
    classes.  Standard class devices are handled by one of the standard Windows
    drivers handles things automatically.
     
    Please look at this API:
     
     
    Note that it accepts a WINUSB_SETUP_PACKET structure, which is the entire
    8-byte control packet.  You fill in what you need and send it off.
     
    >Since it's my understanding that WinUSB is not a 'standard' driver found
    >in a 'typical' Windows system, I'd have to provide an 'install' package,
    >rather than just use the existing lowest/minimal driver, and a few IOCTL
    >calls to implement communication with the device.
     
    WinUSB ***IS*** the generic/minimal USB driver on a Windows system.  There
    is no other.  When you plug in a device that's not in a standard class, it
    does not get assigned a driver at all, and cannot be accessed.
    --
    Tim Roberts, timr@probo.com
    Providenza & Boekelheide, Inc.
     

    Tim Roberts, VC++ MVP Providenza & Boekelheide, Inc.
    2012년 3월 8일 목요일 오전 5:11