Serial Port Complete - Latest Microcontroller projects

(lily) #1

Chapter 3


RS-232 status signals, writing to RS-232 control signals, and reading error
information and other line-state data.
On a PC, COM-port redirector software can cause a serial server’s serial ports to
appear as local COM ports. Application software can then access the remote
ports as if they were local ports.

 


Low-level drivers on the PC handle hardware-specific details such as detecting
ports, assigning names, and managing communications with applications.

$ 8 


Several drivers provided with Windows each manage different aspects of
COM-port communications. The serial.sys driver controls communications
with COM-port devices. The serenum.sys driver is an upper-level filter driver
that enumerates and retrieves identifying information from Plug-and-Play
COM-port devices
A USB device accessed as a COM-port device requires an additional driver. The
usbser.sys driver is a bus driver that manages communications between the oper-
ating system’s COM-port driver and USB drivers. The usbser.sys driver requests
to send and receive COM-port data in USB bulk transfers and implements pro-
tocols for sending and receiving status and control information in USB trans-
fers. Some USB virtual COM-port devices use vendor-specific drivers in place
of the Windows-provided drivers. Chapter 15 and Chapter 16 have more about
USB virtual COM ports.
Many devices can use the Windows-provided drivers or a driver provided by a
USB-controller manufacturer or another third party. For low-level program-
ming, Microsoft’s Windows Driver Kit (WDK) provides a variety of example
code, including source code for the serial and serenum drivers. The pnpports
example demonstrates a class installer and property page provider for the Ports
class. The devcon example shows how to obtain information about installed
devices and how to perform functions such as enabling, disabling, restarting,
updating drivers for, and removing devices.
Free download pdf