Skipping Serial Port Enumeration

Plug and play has been a great benefit to the desktop computing world. However, some of its shortcomings have made it less beneficial in the embedded computing market place. Specifically, I’m thinking about longer boot times and, in some cases, misidentification of devices. An example of this latter failing was recently presented to me though a customer support request. The customer was having trouble opening a COM port that had a GPS receiver connected. It turns out that after the serial COM port driver loaded, the PNP enumerator misidentified the serial data stream from the GPS receiver as a mouse and loaded, what it thought was, an appropriate driver.

Researching the subject on MSDN turns up an article that says that you can stop the PNP software from attempting to enumerate a COM port. Turning off enumeration is accomplished by adding a SkipEnumerations DWORD value of –1 (0xFFFFFFFF) to the appropriate registry key. But, alas, the article doesn’t explain how to find the right key. Digging deeper, one finds this KB article that explains that the registry key is of the form:

HKEY_LOCAL_MACHINE\System\CurrentControlSet\Enum\Enumerator\DeviceID\InstanceID\Device Parameters

The article also describes how to determine the values for Enumerator, DeviceID and InstanceID. On my test machine, these values are ACPI, PNP0501 and 1. Creating a component with this registry key and adding it to a build, I was able to make a build where the mouse driver did not load on COM port 1.

Now if I could only remember that key combination for starting the control panel <grin>

-Jim