Plug-and-Play, Demystified: How Your PC Knows What You Just Connected
You plug in a device, and within a second your computer knows what it is. Here is the quiet choreography behind that moment.
Step One โ Power and Detection
The instant you plug a USB device into a port, the host controller detects a voltage change on the data lines. This electrical event triggers the USB host controller driver โ a low-level piece of software running continuously โ to begin the enumeration process. Enumeration is the formal handshake by which the host and device agree on how they will communicate.
Step Two โ Requesting Identity
The host controller sends a reset signal, then asks the device to identify itself. The device responds with a descriptor โ a structured block of data that declares the manufacturer ID, product ID, device class, and supported speed. This descriptor is the device's business card: everything the operating system needs to know what it is looking at and what kind of driver to load.
Step Three โ Matching to a Driver
The operating system takes the manufacturer and product IDs from the descriptor and searches its driver store for a match. On Windows, this store lives in the DriverStore folder and is populated by both built-in class drivers and any manufacturer packages you have installed. If a specific match is found, that driver loads. If not, Windows falls back to a generic class driver โ which is why most keyboards and mice work without any installation at all.
Step Four โ Configuration and Notification
Once a driver is loaded, the operating system assigns the device an address on the USB bus, allocates bandwidth, and configures any endpoints the device requested. Only then does the familiar notification appear in your taskbar. The whole process takes less than a second on modern hardware. The driver remains resident for as long as the device is connected, monitoring for data, errors, or disconnection events.
When Plug-and-Play Fails
If enumeration fails, Windows typically shows a "device not recognised" notification. The most common causes are a damaged cable, a port delivering insufficient power, a missing class driver, or a device with a corrupted descriptor. Try a different cable and port first. If that does not help, uninstalling the device in Device Manager and reconnecting forces a fresh enumeration. For devices with specialised functions, installing the manufacturer's driver package before connecting often resolves recognition failures immediately.