SlideShare una empresa de Scribd logo
1 de 47
VARUN K
varunkpa@gmail.com
OVERVIEW
• Industrial standard developed in 1990s.
• Cable + connector + communication protocol
• Developed by group of seven companies-
Compaq, DEC, IBM, Intel, Microsoft, NEC and
Nortel.
• Packet based architecture with start
frame,transactions,ACK and NAK controls.
FEATURES OF USB
• Ease of Use
1.
SOME USB KEY TERMS
FEATURES
• 2 CONTROLLERS USB controller+ Root Hub.
• USB controller: Formats the data for the operating
system on read and write.
• Root Hub: connection point to the host.
• Host is always the reference
• IN: Host is going to receive the data; OUT: Host is
going to send the Data.
• 3layers:Lower,Middle,Upper
USB LOWER
LAYER
D+>D- =>Enumeration happen at
full speed, or vice versa
EXAMPLE :SET UP
TRANSACTION
TOKEN PACKET
DATA PACKET
HAND SHAKE
PACKET
PID+ADDRESS+END POINT NO
SUCCESS/FAILURE
HOST WANTS TO
READ/WRITE
USB
MIDDLEWARE
ENUMERATION
• Before the application can communicate with the device host
needs to learn about the device and has to assign the device
diver
• Assigning address to the device-reading descriptors from the
device-assigning and loading drivers-selecting
configuration(Device power requirement, end point).Then
device will be ready for data transfer with any of the
endpoint.
• Duty of HUB: detect attachment and removal using IN end
points. Host polls the root hub to find any device is
connected. After boot up also it continues the poll to find any
newly attached device.
ENUMERATION (cont..)
• Standard USB request: Host sends series request to the
device HUB .They are followed by control transfers. Endpoint
0.
• For a user enumeration process is completely invisible. But
get announcement of detection of new devices.
• When the enumeration is over OS adds new devices to
DEVICE MANAGER list in the control panel. When the user
removes device from the bus windows removes the device
from the device manager.
DESCRIPTORS
Data structures or formatted block of
information which enable the host to learn about
the device.
The device must store information in the
descriptors and should respond for standard USB
requests
Classification of Descriptors:
I. Device
II. Configuration
III. Interface
IV. Endpoint
bLength:The length of the bytes in the descriptor
bDescriptortype: 01H for the device descriptor
bcdUSB:The USB specification version that the device and its descriptor
supports currently.1.00100h;1.10110h
Idvendor:deivce manufacturer uses unique id to identify the device by
paying money.The host may have an INF file which contains this value to
load the drivers.
idProduct:The owner of the vendor ID assigns product id to identify the
device.
bcdDevice:it is the device release No.
iManufacturer:Index which points to a string describing the manufacturer
IdProduct:Index points a string describing the product.
iSerailNo: ’0’ Device with no serial No
To identify if the user has more than one identical device on
the bus
bNumconfigurations:The no of configurations that the device supports.
bMax Packet0:The maximum packet size for end point 0
LS:8 bytes;FS:8/16/32/64;HS:64
Device Class, Device Subclass
: The devices whose function is defined at device level, this field
specifies the device class
02h:Communications.
09h:Hub.
E0h:Wireless controller.
Device Protocol: It specifies protocol defined by selected class or
subclass
E.g.: What kind of transfer is going currently
ENUMERATION STEPS
12 STEP PROCESS
1.USER ATTACH DEVICE TO PORT
• Attachment of USB port to the device or
System power up with a device already
attached
• The port may be on the root hub at a hub
which connects the downstream from the
host
2.HUB DETECTS THE DEVICE
• Hub monitors the voltage on the signal
lines of each of its ports
• If a full speed device is attached D+ is
pulled up to V+
• If a full speed device is attached D- is pulled
up to V+
3.HOST LEARNS ABOUT NEW DEVICE
• Each hub uses its interrupt end point to
report events at the HUB
• Host sends Get_Port_Status request
.The returned information tells new device
is attached.
Get_Port_Status REQ
4.DETECTING … HIGH/LOW SPEED?
• Checks the voltage on D+ and D-
• D+>D- =>full speed device
• Hub sends information in response to
next Get_Port_Status
Get_Port_Status REQ
5.HUB RESETS THE DEVICE
• When the host learns of new device HOST
CONTROLLER send Set_Port_Request
which ask the hub to reset the port
• Port reset within 10 ms
• Reset means D+ and D- ‘0’
• Other USB device may not be affected
Set_Port_Status REQ
6.HOST CHECKS FULL SPEED DEVICE
SUPPORTS HIGH SPEED
• If the device supports High speed after
reset It will send chirp “K”
• A high speed capable hub detects the
chirp and responds with a series of
alternating chirp “J” &” K”.
• Device detects KJKJ..removes full speed
pull up, enumeration starts at high speed.
• If the Hub is not responding continues at
full speed
7.HUB ESTABLISHES A SIGNAL PATH
B/W DEVICE AND BUS
• Verification of reset state by sending
Get_Port_Status request
• Hub removes the reset  Default state
• USB registers are at reset state, Device is
ready for control transfer with endpoint 0.
• Device communicates to host using Default
address 00h.
• Can draw up to 100mA.
Get_Port_Status REQ
8.HOST SEND GET_DISCRIPTOR TO
LEARN PACKET SIZE OF THE DEFAULT
PIPE.
• Host sends request to device address
endpoint 0
• Enumeration of only one device at a time;
one device will respond if multiple devices.
• 8Th byte of the device descriptor contains
maximum packet size supported by
endpoint 0.
• After receiving one packet ,OS requests 64
bytes.
• Host begins status stage transfer
9.HOST ASSIGNS ADDRESS TO THE
DEVICE
• Host assigns a unique address to the
device by sending a set_Address
request.
• The device completes status stage of
request using default address-
Implementation of new address.
• Address is valid until the device is
detached, port is reset, system reboots.
• Next enumeration  new address.
Set_Address
10.HOST LEARNS ABOUT THE DEVCIE
ABILITY
• To read device descriptor Host sends
get_Discriptor request
• Request for the configuration descriptor
11.THE HOST ASSIGNS & LOADS
DEVICE DRIVER
• Tries to match PC,INF files with vendor
ID, Product ID &release No retrieved
from device
• If no match windows look class, subclass
& protocol values from device. If no
match user has to browse it externally.
• If already enumerated windows look
registry file instead of .INF file
• Once the driver is obtained it is installed.
After installation driver may request the
device to resend descriptors or other
class descriptors.
12.THE HOST DEVICE DRIVER SELECTS
A CONFIGURATION
• Device driver request configuration
by sending set configuration request .
• The device reads the request and
enables the requested configuration.
• The device is in the configured states
and interfaces are enabled.
USB Enumeration Process
USB Enumeration Process

Más contenido relacionado

La actualidad más candente (20)

USB 3.0 -Infinite Possibilities
USB 3.0 -Infinite PossibilitiesUSB 3.0 -Infinite Possibilities
USB 3.0 -Infinite Possibilities
 
Usb
UsbUsb
Usb
 
USB protocol
USB protocolUSB protocol
USB protocol
 
Universal Serial Bus (USB)
Universal Serial Bus (USB)Universal Serial Bus (USB)
Universal Serial Bus (USB)
 
Universal serial bus(usb)
Universal serial bus(usb)Universal serial bus(usb)
Universal serial bus(usb)
 
USB 3.0
USB 3.0USB 3.0
USB 3.0
 
USB presentation by Mishuk
USB presentation by MishukUSB presentation by Mishuk
USB presentation by Mishuk
 
Usb universal serial bus
Usb   universal serial busUsb   universal serial bus
Usb universal serial bus
 
USB Universal Serial Bus
USB Universal Serial BusUSB Universal Serial Bus
USB Universal Serial Bus
 
USB 2.0
USB 2.0USB 2.0
USB 2.0
 
Usb
UsbUsb
Usb
 
USB Powerpoint
USB PowerpointUSB Powerpoint
USB Powerpoint
 
Fpga implementation of utmi with usb 2.O
Fpga implementation of  utmi  with usb 2.O Fpga implementation of  utmi  with usb 2.O
Fpga implementation of utmi with usb 2.O
 
Advance Peripheral Bus
Advance Peripheral Bus Advance Peripheral Bus
Advance Peripheral Bus
 
Arrow Devices USB 2.0 Concepts
Arrow Devices USB 2.0 ConceptsArrow Devices USB 2.0 Concepts
Arrow Devices USB 2.0 Concepts
 
USB 2.0 Compliance Testing
USB 2.0 Compliance TestingUSB 2.0 Compliance Testing
USB 2.0 Compliance Testing
 
Usb
UsbUsb
Usb
 
Physical Layer Port
Physical Layer PortPhysical Layer Port
Physical Layer Port
 
Usb 3.0 technology mindshare
Usb 3.0 technology mindshareUsb 3.0 technology mindshare
Usb 3.0 technology mindshare
 
Usb connector
Usb connectorUsb connector
Usb connector
 

Similar a USB Enumeration Process

Similar a USB Enumeration Process (20)

Network Programming Assignment Help
Network Programming Assignment HelpNetwork Programming Assignment Help
Network Programming Assignment Help
 
Microcontroller.pptx
Microcontroller.pptxMicrocontroller.pptx
Microcontroller.pptx
 
SMART WIRELESS TEMPERATURE SENSOR
SMART WIRELESS TEMPERATURE SENSORSMART WIRELESS TEMPERATURE SENSOR
SMART WIRELESS TEMPERATURE SENSOR
 
Anura
AnuraAnura
Anura
 
Anura
AnuraAnura
Anura
 
+ Network Programming.pdf
+ Network Programming.pdf+ Network Programming.pdf
+ Network Programming.pdf
 
Ca 2 note mano
Ca 2 note manoCa 2 note mano
Ca 2 note mano
 
wireless-usb-207-ipx1bSv.pptx
wireless-usb-207-ipx1bSv.pptxwireless-usb-207-ipx1bSv.pptx
wireless-usb-207-ipx1bSv.pptx
 
Ports & sockets
Ports  & sockets Ports  & sockets
Ports & sockets
 
Networking.pptx
Networking.pptxNetworking.pptx
Networking.pptx
 
IzoT platform presentation
IzoT platform presentationIzoT platform presentation
IzoT platform presentation
 
Bb push sapra
Bb push sapraBb push sapra
Bb push sapra
 
SMART WIRELESS SENSOR
SMART WIRELESS SENSORSMART WIRELESS SENSOR
SMART WIRELESS SENSOR
 
Processing IoT Data with Apache Kafka
Processing IoT Data with Apache KafkaProcessing IoT Data with Apache Kafka
Processing IoT Data with Apache Kafka
 
Internet of Things exercise on IBM Bluemix
Internet of Things exercise on IBM BluemixInternet of Things exercise on IBM Bluemix
Internet of Things exercise on IBM Bluemix
 
Multifunctional usb firmware
Multifunctional usb firmwareMultifunctional usb firmware
Multifunctional usb firmware
 
Process control using Ethernet to io
Process control using Ethernet to ioProcess control using Ethernet to io
Process control using Ethernet to io
 
Ch09 system administration
Ch09 system administration Ch09 system administration
Ch09 system administration
 
Introduction_to_Mechatronics_Chapter4.pdf
Introduction_to_Mechatronics_Chapter4.pdfIntroduction_to_Mechatronics_Chapter4.pdf
Introduction_to_Mechatronics_Chapter4.pdf
 
RemoteAdmin.pptx
RemoteAdmin.pptxRemoteAdmin.pptx
RemoteAdmin.pptx
 

Más de Varun Kambrath

INSTRUCTION PIPELING in TMS320C55x
INSTRUCTION PIPELING in TMS320C55xINSTRUCTION PIPELING in TMS320C55x
INSTRUCTION PIPELING in TMS320C55xVarun Kambrath
 
DESIGN ,ANALYSIS &COMPARISON OF VARIOUS CONTROLLERS FOR DC MOTOR SPEED CON...
DESIGN ,ANALYSIS &COMPARISON OF VARIOUS CONTROLLERS FOR DC  MOTOR  SPEED  CON...DESIGN ,ANALYSIS &COMPARISON OF VARIOUS CONTROLLERS FOR DC  MOTOR  SPEED  CON...
DESIGN ,ANALYSIS &COMPARISON OF VARIOUS CONTROLLERS FOR DC MOTOR SPEED CON...Varun Kambrath
 
DLP Projection systems
DLP Projection systemsDLP Projection systems
DLP Projection systemsVarun Kambrath
 
User Interactive Electronic Skin
User Interactive Electronic Skin User Interactive Electronic Skin
User Interactive Electronic Skin Varun Kambrath
 
FPGA IMPLIMENTATION OF UART CONTTROLLER
FPGA IMPLIMENTATION OF UART CONTTROLLERFPGA IMPLIMENTATION OF UART CONTTROLLER
FPGA IMPLIMENTATION OF UART CONTTROLLERVarun Kambrath
 
UAF 811 CARGO DOOR LOSS
UAF 811 CARGO DOOR LOSSUAF 811 CARGO DOOR LOSS
UAF 811 CARGO DOOR LOSSVarun Kambrath
 
REAL TIME MONITORING OF INDUSTRIAL ENVIRONMENT USING LABVIEW.
REAL TIME MONITORING OF INDUSTRIAL ENVIRONMENT USING LABVIEW.REAL TIME MONITORING OF INDUSTRIAL ENVIRONMENT USING LABVIEW.
REAL TIME MONITORING OF INDUSTRIAL ENVIRONMENT USING LABVIEW.Varun Kambrath
 

Más de Varun Kambrath (8)

INSTRUCTION PIPELING in TMS320C55x
INSTRUCTION PIPELING in TMS320C55xINSTRUCTION PIPELING in TMS320C55x
INSTRUCTION PIPELING in TMS320C55x
 
DESIGN ,ANALYSIS &COMPARISON OF VARIOUS CONTROLLERS FOR DC MOTOR SPEED CON...
DESIGN ,ANALYSIS &COMPARISON OF VARIOUS CONTROLLERS FOR DC  MOTOR  SPEED  CON...DESIGN ,ANALYSIS &COMPARISON OF VARIOUS CONTROLLERS FOR DC  MOTOR  SPEED  CON...
DESIGN ,ANALYSIS &COMPARISON OF VARIOUS CONTROLLERS FOR DC MOTOR SPEED CON...
 
DLP Projection systems
DLP Projection systemsDLP Projection systems
DLP Projection systems
 
User Interactive Electronic Skin
User Interactive Electronic Skin User Interactive Electronic Skin
User Interactive Electronic Skin
 
FPGA IMPLIMENTATION OF UART CONTTROLLER
FPGA IMPLIMENTATION OF UART CONTTROLLERFPGA IMPLIMENTATION OF UART CONTTROLLER
FPGA IMPLIMENTATION OF UART CONTTROLLER
 
ARM_Thumb mode
ARM_Thumb modeARM_Thumb mode
ARM_Thumb mode
 
UAF 811 CARGO DOOR LOSS
UAF 811 CARGO DOOR LOSSUAF 811 CARGO DOOR LOSS
UAF 811 CARGO DOOR LOSS
 
REAL TIME MONITORING OF INDUSTRIAL ENVIRONMENT USING LABVIEW.
REAL TIME MONITORING OF INDUSTRIAL ENVIRONMENT USING LABVIEW.REAL TIME MONITORING OF INDUSTRIAL ENVIRONMENT USING LABVIEW.
REAL TIME MONITORING OF INDUSTRIAL ENVIRONMENT USING LABVIEW.
 

Último

Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024Results
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?Igalia
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?Antenna Manufacturer Coco
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CVKhem
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessPixlogix Infotech
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 

Último (20)

Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your Business
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 

USB Enumeration Process

  • 2. OVERVIEW • Industrial standard developed in 1990s. • Cable + connector + communication protocol • Developed by group of seven companies- Compaq, DEC, IBM, Intel, Microsoft, NEC and Nortel. • Packet based architecture with start frame,transactions,ACK and NAK controls.
  • 3. FEATURES OF USB • Ease of Use 1.
  • 4. SOME USB KEY TERMS
  • 5. FEATURES • 2 CONTROLLERS USB controller+ Root Hub. • USB controller: Formats the data for the operating system on read and write. • Root Hub: connection point to the host. • Host is always the reference • IN: Host is going to receive the data; OUT: Host is going to send the Data. • 3layers:Lower,Middle,Upper
  • 7. D+>D- =>Enumeration happen at full speed, or vice versa
  • 8.
  • 9.
  • 10.
  • 11. EXAMPLE :SET UP TRANSACTION TOKEN PACKET DATA PACKET HAND SHAKE PACKET PID+ADDRESS+END POINT NO SUCCESS/FAILURE HOST WANTS TO READ/WRITE
  • 12.
  • 13.
  • 14.
  • 15.
  • 16.
  • 17.
  • 18.
  • 19.
  • 20.
  • 22. ENUMERATION • Before the application can communicate with the device host needs to learn about the device and has to assign the device diver • Assigning address to the device-reading descriptors from the device-assigning and loading drivers-selecting configuration(Device power requirement, end point).Then device will be ready for data transfer with any of the endpoint. • Duty of HUB: detect attachment and removal using IN end points. Host polls the root hub to find any device is connected. After boot up also it continues the poll to find any newly attached device.
  • 23. ENUMERATION (cont..) • Standard USB request: Host sends series request to the device HUB .They are followed by control transfers. Endpoint 0. • For a user enumeration process is completely invisible. But get announcement of detection of new devices. • When the enumeration is over OS adds new devices to DEVICE MANAGER list in the control panel. When the user removes device from the bus windows removes the device from the device manager.
  • 24.
  • 25. DESCRIPTORS Data structures or formatted block of information which enable the host to learn about the device. The device must store information in the descriptors and should respond for standard USB requests Classification of Descriptors: I. Device II. Configuration III. Interface IV. Endpoint
  • 26.
  • 27. bLength:The length of the bytes in the descriptor bDescriptortype: 01H for the device descriptor bcdUSB:The USB specification version that the device and its descriptor supports currently.1.00100h;1.10110h Idvendor:deivce manufacturer uses unique id to identify the device by paying money.The host may have an INF file which contains this value to load the drivers. idProduct:The owner of the vendor ID assigns product id to identify the device. bcdDevice:it is the device release No. iManufacturer:Index which points to a string describing the manufacturer IdProduct:Index points a string describing the product. iSerailNo: ’0’ Device with no serial No To identify if the user has more than one identical device on the bus bNumconfigurations:The no of configurations that the device supports. bMax Packet0:The maximum packet size for end point 0 LS:8 bytes;FS:8/16/32/64;HS:64
  • 28. Device Class, Device Subclass : The devices whose function is defined at device level, this field specifies the device class 02h:Communications. 09h:Hub. E0h:Wireless controller. Device Protocol: It specifies protocol defined by selected class or subclass E.g.: What kind of transfer is going currently
  • 29.
  • 30.
  • 31.
  • 32.
  • 34. 1.USER ATTACH DEVICE TO PORT • Attachment of USB port to the device or System power up with a device already attached • The port may be on the root hub at a hub which connects the downstream from the host
  • 35. 2.HUB DETECTS THE DEVICE • Hub monitors the voltage on the signal lines of each of its ports • If a full speed device is attached D+ is pulled up to V+ • If a full speed device is attached D- is pulled up to V+
  • 36. 3.HOST LEARNS ABOUT NEW DEVICE • Each hub uses its interrupt end point to report events at the HUB • Host sends Get_Port_Status request .The returned information tells new device is attached. Get_Port_Status REQ
  • 37. 4.DETECTING … HIGH/LOW SPEED? • Checks the voltage on D+ and D- • D+>D- =>full speed device • Hub sends information in response to next Get_Port_Status Get_Port_Status REQ
  • 38. 5.HUB RESETS THE DEVICE • When the host learns of new device HOST CONTROLLER send Set_Port_Request which ask the hub to reset the port • Port reset within 10 ms • Reset means D+ and D- ‘0’ • Other USB device may not be affected Set_Port_Status REQ
  • 39. 6.HOST CHECKS FULL SPEED DEVICE SUPPORTS HIGH SPEED • If the device supports High speed after reset It will send chirp “K” • A high speed capable hub detects the chirp and responds with a series of alternating chirp “J” &” K”. • Device detects KJKJ..removes full speed pull up, enumeration starts at high speed. • If the Hub is not responding continues at full speed
  • 40. 7.HUB ESTABLISHES A SIGNAL PATH B/W DEVICE AND BUS • Verification of reset state by sending Get_Port_Status request • Hub removes the reset  Default state • USB registers are at reset state, Device is ready for control transfer with endpoint 0. • Device communicates to host using Default address 00h. • Can draw up to 100mA. Get_Port_Status REQ
  • 41. 8.HOST SEND GET_DISCRIPTOR TO LEARN PACKET SIZE OF THE DEFAULT PIPE. • Host sends request to device address endpoint 0 • Enumeration of only one device at a time; one device will respond if multiple devices. • 8Th byte of the device descriptor contains maximum packet size supported by endpoint 0. • After receiving one packet ,OS requests 64 bytes. • Host begins status stage transfer
  • 42. 9.HOST ASSIGNS ADDRESS TO THE DEVICE • Host assigns a unique address to the device by sending a set_Address request. • The device completes status stage of request using default address- Implementation of new address. • Address is valid until the device is detached, port is reset, system reboots. • Next enumeration  new address. Set_Address
  • 43. 10.HOST LEARNS ABOUT THE DEVCIE ABILITY • To read device descriptor Host sends get_Discriptor request • Request for the configuration descriptor
  • 44. 11.THE HOST ASSIGNS & LOADS DEVICE DRIVER • Tries to match PC,INF files with vendor ID, Product ID &release No retrieved from device • If no match windows look class, subclass & protocol values from device. If no match user has to browse it externally. • If already enumerated windows look registry file instead of .INF file • Once the driver is obtained it is installed. After installation driver may request the device to resend descriptors or other class descriptors.
  • 45. 12.THE HOST DEVICE DRIVER SELECTS A CONFIGURATION • Device driver request configuration by sending set configuration request . • The device reads the request and enables the requested configuration. • The device is in the configured states and interfaces are enabled.