Windows System Software -- Consulting, Training, Development -- Unique Expertise, Guaranteed Results

Before Posting...
Please check out the Community Guidelines in the Announcements and Administration Category.

USB Device

NtDev_GeekNtDev_Geek Member - All Emails Posts: 102
Hi All,

This may be a very basic question forgive me if i wasted your time.
How does USB drive should be enumerated by Windows OS. i want to know the complete
steps involves in this enumeration process.

Thanks a lot in advance.
:)

Comments

  • Prasad_TalekarPrasad_Talekar Member Posts: 20
    Detail USB Enumeration process is explained here

    .

    Before going through this link I would recommend reading "USB in Nutshell
    " at-least once to understand key points regarding USB
    specification.

    \PT

    On Tue, Jul 21, 2015 at 2:41 PM, wrote:

    > Hi All,
    >
    > This may be a very basic question forgive me if i wasted your time.
    > How does USB drive should be enumerated by Windows OS. i want to know the
    > complete
    > steps involves in this enumeration process.
    >
    > Thanks a lot in advance.
    > :)
    >
    > ---
    > NTDEV is sponsored by OSR
    >
    > Visit the list at: http://www.osronline.com/showlists.cfm?list=ntdev
    >
    > OSR is HIRING!! See http://www.osr.com/careers
    >
    > 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
    >
  • Tim_RobertsTim_Roberts Member - All Emails Posts: 13,022
    xxxxx@gmail.com wrote:
    > This may be a very basic question forgive me if i wasted your time.
    > How does USB drive should be enumerated by Windows OS. i want to know the complete
    > steps involves in this enumeration process.

    You don't really mean "complete steps". That would take a book. The
    process happens at several different levels: electrical, hub protocol,
    host controller protocol, driver, PnP, etc.

    The process starts at the hub. The electrical parts are all described
    in the USB Spec, and if you are doing USB drivers, you need to have a
    copy of that close at hand. It is freely available from www.usb.com,
    and it is surprisingly readable.

    The hub detects that a new device has arrived, and notifies the host
    controller, which notifies the host controller driver. They assign a
    device ID and read the descriptors. The host controller driver then
    sends a PnP notification that is has a new child. PnP asks for the
    hardware ID of the new child, which the host controller builds from the
    VID and PID. After that, it's just like any other new device. PnP
    looks for a matching driver, and loads it.

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

    Tim Roberts, [email protected]
    Providenza & Boekelheide, Inc.

  • Tim_RobertsTim_Roberts Member - All Emails Posts: 13,022
    On Jul 24, 2015, at 8:02 PM, DL CU > wrote:

    Tim,

    Can I know which part of usb spec is the "must read" chapter?

    That depends on what you want to know. From the software end, Chapter 9 is the most interesting one. It describes the descriptors and the standard control endpoint commands. I believe it is chapter 7 that discusses the various pipe types. Usually, the electrical sections are not that interesting to a driver guy. The sections after 9 are mostly about hubs.

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

    Tim Roberts, [email protected]
    Providenza & Boekelheide, Inc.

  • Tim_RobertsTim_Roberts Member - All Emails Posts: 13,022
    DL CU wrote:
    >
    > right now I'm reading the usb type-c specification,
    > as we known, the type-c receptacle is no longer limited the device's
    > plug-in orientation,
    > is it able to know which orientation for child-device is inserted to
    > the host or hub?
    > I wonder if the port register has such bit definition for the type-c
    > cable's plug-in orientation.
    > I am trying to write an application to identify the device plug-in
    > orientation for testing the functionality of usb type-c.

    It can't be done. If you go look at the receptacle pinout, you'll see
    that there's no way to tell the difference electrically. The signals
    are completely symmetrical.

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

    Tim Roberts, [email protected]
    Providenza & Boekelheide, Inc.

  • DLDL Member Posts: 85
    Tim,
    I saw there is a communication channel(CC) in UFP and there are 2 CCs in DFP,spec describes CC pin is used to determine the plug-in device's orientation, maybe upside-up or upside-down,and then determine which TX/RX pair to use for DFP.
    //dlcu

    > Subject: Re: [ntdev] USB Device
    > To: xxxxx@lists.osr.com
    > From: xxxxx@probo.com
    > Date: Mon, 27 Jul 2015 10:00:53 -0700
    >
    > DL CU wrote:
    > >
    > > right now I'm reading the usb type-c specification,
    > > as we known, the type-c receptacle is no longer limited the device's
    > > plug-in orientation,
    > > is it able to know which orientation for child-device is inserted to
    > > the host or hub?
    > > I wonder if the port register has such bit definition for the type-c
    > > cable's plug-in orientation.
    > > I am trying to write an application to identify the device plug-in
    > > orientation for testing the functionality of usb type-c.
    >
    > It can't be done. If you go look at the receptacle pinout, you'll see
    > that there's no way to tell the difference electrically. The signals
    > are completely symmetrical.
    >
    > --
    > Tim Roberts, xxxxx@probo.com
    > Providenza & Boekelheide, Inc.
    >
    >
    > ---
    > NTDEV is sponsored by OSR
    >
    > Visit the list at: http://www.osronline.com/showlists.cfm?list=ntdev
    >
    > OSR is HIRING!! See http://www.osr.com/careers
    >
    > 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
  • Tim_RobertsTim_Roberts Member - All Emails Posts: 13,022
    DL CU wrote:
    >
    > I saw there is a communication channel(CC) in UFP and there are 2 CCs
    > in DFP,
    > spec describes CC pin is used to determine the plug-in device's
    > orientation, maybe upside-up or upside-down,
    > and then determine which TX/RX pair to use for DFP.

    You're quite right, the hardware has to know.

    However, there's nothing in any of the Type-C specifications that talks
    about software impact. There are no additional descriptors or status
    requests. In part, they must do that -- they are trying to separate the
    Type-C connector completely from USB 3.1, so you can use a Type-C
    connector with a USB 2.0 hub, and of course the existing hubs won't know
    how to report that status.

    It's not impossible that USB-IF will come out with a spec update to add
    a bit for USB 3 hubs, but that seems unlikely.

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

    Tim Roberts, [email protected]
    Providenza & Boekelheide, Inc.

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Upcoming OSR Seminars
Developing Minifilters 29 July 2019 OSR Seminar Space
Writing WDF Drivers 23 Sept 2019 OSR Seminar Space
Kernel Debugging 21 Oct 2019 OSR Seminar Space
Internals & Software Drivers 18 Nov 2019 Dulles, VA