Home Overview USB Packets

USB packets

1.0/5 (1 vote)
Hits smaller text tool iconmedium text tool iconlarger text tool icon
USB communication takes the form of packets. Initially, all packets are sent from the host, via the root hub and possibly more hubs, to devices. Some of those packets direct a device to send some packets in reply.
After the sync field described above, all packets are made of 8-bit bytes, transmitted least-significant bit first. The first byte is a packet identifier (PID) byte. The PID is actually 4 bits; the byte consists of the 4-bit PID followed by its bitwise complement. This redundancy helps detect errors. (Note also that a PID byte contains at most four consecutive 1 bits, and thus will never need bit-stuffing, even when combined with the final 1 bit in the sync byte. However, the OUT PID byte ends with three consecutive 1 bits, so if the following USB device address begins with three 1 bits, bit-stuffing will be required.)
Packets come in three basic types, each with a different format and CRC (cyclic redundancy check):