Determining Full speed or High speed in Win2K

Discussion in 'Windows Vista Drivers' started by michelle, Mar 23, 2007.

  1. michelle

    michelle Guest

    In a system running Win 2000-SP4 ,how can we determine the speed of the USB
    port that a USB device is attached to in a driver i.e in Kernel Mode ?
    That is in my filter driver for a USB device that supports both High speed
    and full speed,I would like to determine if the device has been attached to
    a High Speed port or a full speed port,then do manipulation of the
    descriptors sent to the upper layers (usbhub.sys)
     
    michelle, Mar 23, 2007
    #1
    1. Advertisements

  2. michelle

    michelle Guest

    Clarification :My driver is a lower filter for usbhub.sys in win 2000.
    I thought of using code from USBView but it is entirely in User mode as far
    as I remember.
     
    michelle, Mar 23, 2007
    #2
    1. Advertisements

  3. USB_BUS_INTERFACE_USBDI_V1 will give you a function pointer which will give
    you this information, but if you are below usbhub and the device is being
    added to the hub you are filtering, this will not give you your device's
    speed information (it will give you the hub's)

    d
     
    Doron Holan [MS], Mar 25, 2007
    #3
  4. michelle

    Tim Roberts Guest

    But somewhere, there is a physical device that supports both high-speed and
    full-speed? In that case, you should be able to tell by reading the
    device's actual descriptors. There should be a different set for the two
    speeds.
     
    Tim Roberts, Mar 26, 2007
    #4
  5. michelle

    michelle Guest

    Hi Doron
    Thanks for your help.
    My device is a composite device for which usbhub.sys acts as a generic
    parent device.My filter driver is a lower filter for usbhub.sys because it
    makes some changes in the USB Descriptors sent from the device.For using
    USB_BUS_INTERFACE_USBDI_V1 , I just need to include usbbusif.h right ?
    I got confused because the comments in the header file state that :
    /*
    Bus interfaces are supported for Windows XP and later only
    */
    #if (NTDDI_VERSION >= NTDDI_WINXP)

    I included this file and started compiling but in my (custom) build WDK6000
    environment, the compiler started spewing out errors in usbbusif.h



    @Tim
    Could you please elaborate your answer a bit.
    My device does support USB Device Qualifier Descriptors etc.
    Which Descriptors do you suggest I look into ?
    In my device Qualifier Descriptor ,the field
    bNumConfigurations which denotes the Number of Other-speed Configurations is
    set to 0.

    TIA
     
    michelle, Mar 28, 2007
    #5
  6. michelle

    michelle Guest

    To be more precise,I included usbbusif.h and used
    USB_BUS_INTERFACE_USBDI_GUID but I am getting an error LNK2001: unresolved
    external symbol _USB_BUS_INTERFACE_USBDI_GUID . I have included the relevant
    libraries : usbd.lib ksguid.lib .
     
    michelle, Mar 28, 2007
    #6
  7. michelle

    Tim Roberts Guest

    In that case, your device should come up with no interfaces at all when
    plugged in to a full speed port. Is that not what you see?
     
    Tim Roberts, Mar 28, 2007
    #7
  8. #define INITGUID
    #include <initguid.h>
    #include <usbbusif.h>

    to resolve the symbol problem. usbccgp is a generic parent on a
    multifunction device, not usbhub

    d
     
    Doron Holan [MS], Mar 28, 2007
    #8
  9. michelle

    michelle Guest

    Thank you Doron but I think there is no usbccgp.sys on Windows 2000 even on
    SP4
    usbccgp.sys is present only on Win Me and Win XP .In Win 2000 usbhub.sys
    also acts a generic parent driver .
    Does thin imply that I can't use this on win 2000 ?
     
    michelle, Mar 30, 2007
    #9
  10. michelle

    michelle Guest

    No Tim.
    What I see this is that if I do a GET_DESCRIPTOR Request for the Device
    Qualifier Descriptor on a Full speed port,I get an error in URB status while
    this request is successful in High Speed.
     
    michelle, Mar 30, 2007
    #10
  11. this will work on win2k as well, but win2k doesn't support high speed with
    in box drivers, so the V1 interface will not be supported

    d

    --
    Please do not send e-mail directly to this alias. this alias is for
    newsgroup purposes only.
    This posting is provided "AS IS" with no warranties, and confers no rights.


     
    Doron Holan [MS], Mar 31, 2007
    #11
  12. michelle

    michelle Guest

    Thnak you Doron for the clarification.
    It finaly worked on Win200SP4.
     
    michelle, Apr 2, 2007
    #12
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.