Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How long is the string of manufacturer of a USB device?

Does exist an official documentation detailing the maximum length of the string descriptor that represents Manufacturer (or Product Name, Model Name, Device Name, Label, or Serial Number) of a USB device?

like image 864
Gianfranco Avatar asked Aug 25 '11 16:08

Gianfranco


People also ask

What are USB device descriptors?

Every USB device exposes a device descriptor that indicates the device's class information, vendor and product identifiers, and number of configurations. Each configuration exposes it's configuration descriptor that indicates number of interfaces and power characteristics.

How many interfaces can a USB device have?

Unlike the configuration descriptor, there is no limitation as to having only one interface enabled at a time. A device could have 1 or many interface descriptors enabled at once.

What is endpoint Descriptor?

The Endpoint Descriptor (USB_ENDPOINT_DESCRIPTOR) specifies the transfer type, direction, polling interval, and maximum packet size for each endpoint. Endpoint 0 (zero), the default endpoint, is always assumed to be a control endpoint and never has a descriptor.


1 Answers

Any USB descriptor is limited to 255 bytes since the leading bLength field is one byte wide. The second byte is taken by the bDescriptorType. Because everybody* uses UTF-16-LE string encoding, that leaves a maximum of 126 characters.

*) Mandated by the USB 2.0 Unicode ECN in 2005 http://en.wikipedia.org/wiki/USB

like image 160
Tormod Volden Avatar answered Oct 18 '22 22:10

Tormod Volden