Data Carrier Detect - As Used With Other Hardware

As Used With Other Hardware

Not very much hardware, beyond modems and direct serial communication links, uses the DCD signal. Serial mice do not use it, neither do serial printers.

Sometimes a computer is connected to a device that doesn't provide a DCD signal at all. If the computer software requires a DCD signal to properly recognize a connection, then this is mitigated simply by connecting a wire between the computer's own DTR and DCD pins, so the computer sees the high DCD signal it needs. Since DTR and DCD are typically used as a pair, any computer program requiring DCD high is likely to also provide a high DTR as output.

In Linux, each serial port is referenced by two device names - one being (for the first serial port) /dev/ttyS0 versus /dev/cua0. Although these both refer to the same physical port, one important distinction between the way Linux treats these two device names has to do with the DCD line. When ttyS0 is waited on in a system call, Linux assumes that since this device is for receiving telephone calls, it will put a process to sleep— figuring that so long as DCD is low, there is nothing to do. When cua0 is used - as it is when placing telephone calls - Linux assumes that the software needs to access the port while DCD is low for the purpose of dialing the number, so this blocking behavior doesn't exist. Nevertheless, there is a control mode flag called CLOCAL that is what actually activates or deactivates this behavior, and by default the flag is set for cua0 but not for ttyS0. An application that insists on using a "tty" port versus a "cua" port is an example of one that might require a jumper wire to force DCD high in order to work properly.

Read more about this topic:  Data Carrier Detect

Famous quotes containing the word hardware:

    A friend of mine spoke of books that are dedicated like this: “To my wife, by whose helpful criticism ...” and so on. He said the dedication should really read: “To my wife. If it had not been for her continual criticism and persistent nagging doubt as to my ability, this book would have appeared in Harper’s instead of The Hardware Age.”
    Brenda Ueland (1891–1985)