projects:winusb
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
projects:winusb [2013/04/13 22:42] – [Hardware] mkucia | projects:winusb [2013/05/26 14:55] (current) – [Project Abstract] mkucia | ||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ====== USB CDC + Microsoft descriptors ====== | ||
+ | |||
+ | ===== Project Abstract ===== | ||
+ | The aim of this project is to extend [[http:// | ||
+ | [[http:// | ||
+ | By doing so one turn device WCID((Windows Compatible ID)) compliant. | ||
+ | Using this optional, vendor specific extension to USB specification is supposed to have numerous advantages. | ||
+ | The most important is true plug-and-play without use of '' | ||
+ | Moreover MS OS Descriptors can provide other data usually shipped with '' | ||
+ | |||
+ | |||
+ | |||
+ | Windows has numerous drivers for basic USB classes, for example: | ||
+ | * CDC | ||
+ | * HID | ||
+ | * MSC | ||
+ | * Audio | ||
+ | * Bluetooth | ||
+ | * Content Secourity | ||
+ | * Imaging | ||
+ | * Hub Device | ||
+ | * Media Transfer Protocol | ||
+ | * Printer | ||
+ | * Smart Card | ||
+ | * Video | ||
+ | |||
+ | WinUSB also allow for using USB raw transfers: control, bulk, interrupt. | ||
+ | |||
+ | <WRAP center important > | ||
+ | Automated driver installation is natively supported in Windows 8. Previous versions of windows down to Windows XP can benefit from it as long as user has access to the internet and Windows Update service can download drivers. If this service is blocked user must provide '' | ||
+ | </ | ||
+ | |||
+ | ===== Hardware ===== | ||
+ | [[http:// | ||
+ | |||
+ | |||
+ | ===== Software ===== | ||
+ | The project is accessible for download through [[https:// | ||
+ | Project is based on TI StellarisWare USB CDC Device demo code modified by lawrence_jeff for Stellaris Launchpad | ||
+ | support. Please see Stellarisiti | ||
+ | [[http:// | ||
+ | |||
+ | Below steps to follow implementing OS descriptors. | ||
+ | |||
+ | ==== Step 1 - USB version ==== | ||
+ | |||
+ | >If the USB Device Descriptor’s bcdUSB field is equal to 0x0100 or 0x0110, the hub driver will skip the query for the MS OS Descriptor and move to the “Serial Number String Descriptor Query” state. | ||
+ | I changed '' | ||
+ | |||
+ | ==== Step 2 - Microsoft OS String Descriptor ==== | ||
+ | If the device reports USB version 2.0 or higher Windows is sending request for non-standard string descriptor. The descriptor has a index-number of '' | ||
+ | |||
+ | User must return speciall MS-defined string descriptor. The only value that can be changed is vendor code. Vendor code is used during further non-standard requests but in the end it does not have any relevance. | ||
+ | |||
+ | < | ||
+ | { | ||
+ | 0x14, | ||
+ | USB_DTYPE_STRING, | ||
+ | ' | ||
+ | 0xBE, // Vendor code | ||
+ | 0 | ||
+ | };</ | ||
+ | ==== Step 3 - Microsoft Compatible ID Feature Descriptor | ||
+ | Windows asks for OS feature descriptor (0xC0) that falls into non-standard request in Stellaris USB stack. | ||
+ | |||
+ | Those two request fall into CDC '' | ||
+ | First only header is requested to determine size of whole descriptor. | ||
+ | |||
+ | ==== Step 4 - Microsoft Extended Properties Feature Descriptor ==== | ||
+ | Extended properties descriptor provides additional information that is added to Windows registry upon device enumeration. | ||
+ | Unfortunately it seems that both Label and Icon properties have no effect. | ||
+ | |||
+ | Handling is same as in step 3 with the exception for request type is '' | ||
+ | ==== Summary ==== | ||
+ | |||
+ | Below comparison of hot plugged USB device | ||
+ | |||
+ | === Without OS descriptors === | ||
+ | |||
+ | {{ : | ||
+ | |||
+ | |||
+ | === With OS descriptors === | ||
+ | {{ : | ||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | ===== Notes ===== | ||
+ | When you are developing your application it is convenient to have open regedit((Windows registry editor)) and have 2 paths saved in favourites: | ||
+ | * '' | ||
+ | * '' | ||
+ | |||
+ | Removing appropriate sub keys from preceding path allows for re-enumeration of device. | ||
+ | ===== References ===== | ||
+ | * https:// | ||
+ | * MSDN http:// | ||
+ | * MSDN http:// | ||
+ | |||
+ | * MSDN [[http:// | ||
+ | * MSDN [[http:// | ||
+ | * MSDN [[http:// | ||
+ | * MSDN [[http:// | ||
+ | * MSDN [[http:// | ||
+ | * MSDN [[http:// | ||
+ | ===== Project TODOs ===== | ||
+ | * Better comments in code | ||
+ | * Make a more complex example - composite device | ||
+ | * Implementing Container ID descriptors | ||
+ | * MSP430 code? | ||
+ | * Validating if different classes work (currently only CDC confirmed) |