MCU User Forum
  USB
  Difference on HID enumeration on Win, Linux and Mac

Post New Topic  Post A Reply
profile | register | preferences | faq | search

UBBFriend: Email This Page to Someone! next newest topic | next oldest topic
Author Topic:   Difference on HID enumeration on Win, Linux and Mac
Tsuneo
Member
posted June 22, 2007 11:52 AM     Click Here to See the Profile for Tsuneo   Click Here to Email Tsuneo     Edit/Delete Message
Difference on HID enumeration on Win, Linux and Mac

Sometimes we come across the enumeration compatibility problem among OS;
A device works on Win, but it doesn't on Linux, or Mac, or vice versa.
And such a question is always answered by the rule:
  don't expect specific enumeration sequence.

Then how much are these OS different on the enumeration sequence?
Next list shows the enumeration sequence of SiLabs HID/Blinky example (vendor specific HID device),
just after device connection (host application does not run yet).
The differences are emphasized except for Get_Descriptor( string )

a) Bus reset:
  WinXP and Linux reset bus twice

b) Get_Descriptor( Device ) and Get_Descriptor( Config )
  WinXP issues these Get_Descriptor twice

c) SET_IDLE
  WinXP issues SET_IDLE after SET_CONFIGURATION

d) interrupt IN/ GET_REPORT
  WinXP and MacOSX issues IN transfer on the interrupt IN EP,
  and continues it regardless of host application.
  Linux does GET_REPORT( input ),
  and don't issue IN to the interrupt EP until host application runs.


The major difference is "interrupt IN/ GET_REPORT" just after the enumeration,
rather than the enumeration sequence itself.

GET_REPORT(input) implementation is often cut off because WinXP doesn't issue it.
But it is mandatory for USB HID spec.

Also, please note Linux doesn't issue IN request to the interrupt EP until the host app runs.
If the firmware expects that the IN EP is always hit by the host periodically, it will fail.

Tsuneo

WinXP sp2                               | Linux Kernel 2.6.19                       | MacOSX 10.4.9-10.4.10
value index len | value index len | value index len
RESET | RESET | RESET
GET_DESCRIPTOR DEVICE 0100 0000 64 | GET_DESCRIPTOR DEVICE 0100 0000 64 | GET_DESCRIPTOR DEVICE 0100 0000
8
RESET | RESET |
SET_ADDRESS 0002 0000 0 | SET_ADDRESS 0003 0000 0 | SET_ADDRESS 0003 0000 0
GET_DESCRIPTOR DEVICE 0100 0000 18 | GET_DESCRIPTOR DEVICE 0100 0000 18 | GET_DESCRIPTOR DEVICE 0100 0000 18

| | GET_DESCRIPTOR STRING 0302 0409 2
| | GET_DESCRIPTOR STRING 0302 0409 10
| | GET_DESCRIPTOR STRING 0301 0409 2
| | GET_DESCRIPTOR STRING 0301 0409 10
GET_DESCRIPTOR CONFIG 0200 0000 9 | GET_DESCRIPTOR CONFIG 0200 0000 9 | GET_DESCRIPTOR CONFIG 0200 0000 4
GET_DESCRIPTOR CONFIG 0200 0000 255 | GET_DESCRIPTOR CONFIG 0200 0000 34 | GET_DESCRIPTOR CONFIG 0200 0000 34

GET_DESCRIPTOR STRING 0300 0000 255 | GET_DESCRIPTOR STRING 0300 0000 255 |
GET_DESCRIPTOR STRING 0302 0409 255 | GET_DESCRIPTOR STRING 0302 0409 255 |
GET_DESCRIPTOR STRING 0300 0000 255 | GET_DESCRIPTOR STRING 0301 0409 255 |
GET_DESCRIPTOR STRING 0302 0409 255 | |
GET_DESCRIPTOR DEVICE 0100 0000 18 | |
GET_DESCRIPTOR CONFIG 0200 0000 9 | |
GET_DESCRIPTOR CONFIG 0200 0000 34 | |
SET_CONFIGURATION 0001 0000 0 | SET_CONFIGURATION 0001 0000 0 | SET_CONFIGURATION 0001 0000 0
SET_IDLE 0000 0000 0 | |
GET_DESCRIPTOR HID REP 2200 0000 147 | GET_DESCRIPTOR HID REP 2200 0000 83 | GET_DESCRIPTOR HID REP 2200 0000 83
| | GET_DESCRIPTOR STRING 0301 0409 2
| | GET_DESCRIPTOR STRING 0301 0409 10
| | GET_DESCRIPTOR STRING 0302 0409 2
| | GET_DESCRIPTOR STRING 0302 0409 10
IN EP=81 | GET_REPORT 0104 0000 2 | IN EP=81
IN EP=81 | GET_REPORT 0105 0000 3 | IN EP=81
SOF IN/NAK | SOF | SOF IN/NAK

[This message has been edited by Tsuneo (edited June 23, 2007).]

IP: Logged

All times are CT (US)

next newest topic | next oldest topic

Administrative Options: Close Topic | Archive/Move | Delete Topic
Post New Topic  Post A Reply
Hop to:

Contact Us | MCU User Forum

Have you seen our MCU Knowledge Base?


Ultimate Bulletin Board 5.47b

Site Guide Privacy Legal