Serial Port Complete - Latest Microcontroller projects

(lily) #1
COM Ports on PCs

  35 
 


Windows uses several methods to detect COM ports:
For internal Plug-and-Play ports, the serenum.sys driver retrieves a PnP ID from
the port. The PnP ID contains manufacturer and product identifiers and other
optional information. Microsoft’s Plug and Play External COM Device Specifica-
tion defines the protocol for retrieving the PnP ID.
For legacy (non Plug-and-Play) ports, the serial.sys driver reads port settings
from the system registry. The settings are in a COM port subkey under ..\Ser-
vices\Serial\Parameters.
For USB virtual COM-port devices, a USB driver requests a series of data struc-
tures called descriptors from the device. The descriptors contain information
that identifies an INF file. The INF file names the device’s driver, which deter-
mines how application access the device.
For COM ports on serial servers, COM-port redirector software creates and
installs virtual COM ports on the PC.

,.$
3 

 


COM-port software can use two Globally Unique Identifiers (GUIDs) to find
and gain access to devices. A GUID is a 16-byte value that can identify devices
that behave in similar ways.

      !"
A device setup GUID identifies devices that have similar capabilities and are
installed and configured in the same way. Devices that have the same device
setup GUID use the same class installer to assign drivers. COM-port devices are
in the Ports class. The class’s GUID is GUID_DEVCLASS_PORTS defined in
devguid.h in the WDK. The class also includes parallel (LPT) ports.
COM-port devices in the Ports class must support the software interface
defined in ntddser.h in the WDK. The file defines functions compatible with
the 16550 UART chip used in many early serial ports. Devices aren’t required
to implement the 16550’s asynchronous serial interface, however. For example,
a USB virtual COM port in the Ports class might have a parallel or other inter-
face.
Some intelligent multiport serial cards instead use the MultiportSerial device
setup class (GUID_DEVCLASS_MULTIPORTSERIAL).
Free download pdf