The index of the string descriptor will be retrieved from the device descriptor. To make things more practical, we will write a small PC program in C++ to scan USB devices, print the VID:PID and show a string descriptor for a connected mouse. An overview of the involved layers are shown in the following diagram: However, USB is not a one layer protocol, like many other protocols. Pipes represent the ability to move data between the software on the host via a memory buffer and an endpoint on a device.” The last term mentioned in this introduction paragraph is Pipe and it is by definition “an association between an endpoint on a device and software on the host. Each descriptor begins with a byte-wide field that contains the total number of bytes in the descriptor followed by a byte-wide field that identifies the descriptor type”. A descriptor is a data structure with a defined format. As the name may imply and as the USB Specification defines it, “USB devices report their attributes using descriptors. One of the key terms you will find in any practical USB device firmware is the descriptor. The Default Control Pipe to Endpoint Zero provides access to the device’s configuration information and allows generic USB status and control access. Each Endpoint has address and direction (IN or OUT). An Endpoint by definition is “A uniquely addressable portion of a USB device that is the source or sink of information in a communication flow between the host and device”. Such Describes are transferred through an Endpoint called Endpoint zero. This is done through what is called Descriptors. Once the USB device is connected to a Host, one of the first things to do is to describe itself to the host.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |