Diagram of one of the USB protocols enumeration process "Go"

Source: Internet
Author: User

Turn from: http://blog.csdn.net/myarrow/article/details/82700600. Enumeration process

• The HUB connected to the device returns the corresponding bitmap when the host queries its state to change the endpoint, informing the host that a port state has changed.
• The host queries the HUB for the port status, learns that the device is connected, and knows the basic features of the device.
• The host waits (at least 100mS) to stabilize the device and then sends a request to the HUB to reset and enable the port.
The • Hub performs a port reset operation and the port is enabled after the reset is complete. Now that the device is in the Defalut state, you can obtain a current of no more than 100mA from the Vbus. The host can communicate with its 0 address.
• The host sends a GET_DEVICE_DESCRIPTOR standard request to the device via a 0 address to obtain a descriptor for the device.
• The host sends a request to the HUB again to reset the port.
• The host assigns an address to the device via standard request set_address.
• The host sends a GET_DEVICE_DESCRIPTOR standard request to the device via a new address to obtain a descriptor for the device.
• The host sends additional get_configuration requests to the device via the new address to obtain the device's configuration descriptor.
• Depending on the configuration information, the host chooses the appropriate configuration and configures the device with the set_configuration request. Then the device can be used normally.

1. Get_descriptor

The bus resets and sends the Get_descriptor instruction packet to the default address 0, requesting the device description. As shown in (Figure I):

(Figure I)

1) index[4-5]: Indicates USB plug-in bus reset
2) Index[7-8]: Indicates that the host sends the get_descriptor instruction package to the default address, and the details are also captured, as shown in (Figure II):

(Figure II)

3) INDEX[15-17]: Indicates that the device sends device description data to the host index[16]
4) index[18-19]: Indicates that the host completes the get_descriptor instruction and sends an empty response to the device;


2. set_address

Reset the bus again and send the set_address instruction pack to the device to set the device address. As shown in (Figure III):

(Figure III)

1) index[22-23]: Indicates the bus reset again, the reset is done automatically, not manually plug and unplug the USB complete
2) index[25-27]: Indicates that the host sends the set_address instruction package to the default address, as shown in the details (Figure IV):

(Figure IV)

3) index[29-31]: Indicates that the device completes the set_address instruction, sends an empty response to the host;

3. get_descriptor< Request Device Description >

Send the get_descriptor instruction package to the device address set in the second step and request the device description. As shown in (Figure V):

(Figure V)

1) index[33-35]: Indicates that the host sends the get_descriptor instruction package to address 01, see details (Figure VI)

(Figure VI)

2) index[41-43]: Indicates that the device sends device description data to the host index[42]
3) index[45-47]: Indicates that the device sends device description data to the host index[46]
4) index[48-50]: Indicates that the host completes the get_descriptor instruction and sends an empty response to the device;

4. get_descriptor< Request Configuration Description >

Send the get_descriptor instruction package to the device address set in the second step and request the configuration description. As shown in (Figure Seven):

(Fig. Seven)
1) index[52-54]: Indicates that the host sends the get_descriptor instruction package to address 01, see details (Figure Eight)

(Fig. Eight)
2) index[57-59]: Indicates that the device sends configuration description data to the host index[58]
3) index[60-62]: Indicates that the host completes the get_descriptor instruction and sends an empty response to the device;

5. Read the complete device description and configuration description

Repeat to the device address set in the second step to send the get_descriptor instruction package, complete all equipment description and configuration description;

6. Set_configuration

Send the set_configuration instruction package to the device address set in the second step and set the configuration description. As shown in (Figure Nine):

(Fig. Nine)
1) index[139-141]: Indicates that the host sends the set_configuration instruction package to address 01, see details (Figure 10)

(Fig. 10)

2) index[143-145]: Indicates that after the device completes the set_configuration instruction, sends an empty reply to the host
At this point, the enumeration process is complete and the device communicates with the host through the driver.


The above USB enumeration process is based on the existing specific device capture, does not fully involve the USB protocol of all the instruction package, such as get_status instruction package, clear_feature instruction package, set_feature instruction package, set_descriptor instruction package, Get_configuration instruction package, get_interface instruction package, set_interface instruction package, synch_frame instruction package, etc.

Transferred from: http://forum.eet-cn.com/BLOG_ARTICLE_2806.HTM?jumpto=view_welcomead_forum_1354841784500

Diagram of one of the USB protocols enumeration process "Go"

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.