摘要 |
A method for automatically identifying an operating system for a USB device begins at initializing the USB device, and recording USB commands sent from the operating system. The USB device determines the operating system as a first operating system when there are two successive USB commands of Get Product String, there is one USB command of Get Vender String, there is no USB command of Reset ahead of a USB command of Set Address, there is no USB command of Get Language ID, or there is no USB command of Set Feature Report. The USB device determines the operating system as a second operating system when there is no USB command of Get Vender String, there are two USB commands of Get Language ID and two USB commands of Get Product String, there is one USB command of Get Device Descriptor following a USB command of Get Product String, or there is one USB command of Set Interface Report.
|