Universal Serial Bus (USB) is the de facto interface for computer peripherals to communicate with the personal computers. The interface that saw the light of day around the mid-1990s was a joint effort of seven companies - Compaq, DEC, IBM, Intel, Microsoft, Nortel, and NEC. These companies were aiming to replace the then parallel ports and the external power chargers with a universal communication standard that could simplify data exchange and could double duty to supply power as well.
Nowadays, USB is the standard and must-have interface on almost all motherboards, single board computers and the embedded microcontroller boards and almost every digital peripheral from regular computer peripherals like keyboard, mouse and joysticks to smart digital devices.
In the previous article of this series, USB Descriptors were discussed. When a USB peripheral is connected to a host device, the host sends queries in the form of requests. The peripheral responds by sending Descriptors. The Descriptors contain the information required for identifying and configuring the peripheral device, implementing the interfaces and setting endpoints.
The device descriptor is the first descriptor sent to the host and it helps in configuring the peripheral with respect to the host. The subsequent descriptors implement the functioning, the peripheral is meant for. The Control Transfer is the only transfer type which is supported even when the device is yet not configured. That is the reason, it is used for sending requests and obtaining the descriptors. The default endpoint is endpoint 0 which is bidirectional and used for control transfers.