| Red Hat Documentation |
8. Serial Port Devices /dev/ttyS2, etc.For creating devices in the device directory see the Serial-HOWTO: "Creating Devices In the /dev directory".
8.1 Serial Port Device Names & NumbersDevices in Linux have major and minor numbers. Each serial port may have 2 possible names in the /dev directory: ttyS and cua. Their drivers behave slightly differently. The cua device is deprecated and will not be used in the future. See The cua Device.
Dos/Windows use the COM name while the
Note that all distributions should come with ttyS devices (and many
distributions have the obsolete cua device). You can verify this by
typing (don't feel bad if you don't find any obsolete cua devices):
8.2 Link ttySN to /dev/modem ? On some installations, two extra devices will be created,
There has been some discussion on the merits of
8.3 The cua DeviceEach ttyS device has a corresponding cua device. But the cua device is deprecated so it's best to use ttyS (unless cua is required). There is a difference between cua and ttyS but a savvy programmer can make a ttyS port behave just like a cua port so there is no real need for the cua anymore. Except that some older programs may need to use the cua. What's the difference? The main difference between cua and ttyS has to do with what happens in a C-program when an ordinary "open" command tries to open the port. If a cua port has been set to check modem control signals, the port can be opened even if the DCD modem control signal says not to. Astute programming (by adding additional lines to the program) can force a ttyS port to behave this way also. But a cua port can be more easily programmed to open for dialing out on a modem even when the modem fails to assert DCD (since no one has called into it and there's no carrier). That's why cua was once used for dial-out and ttyS used for dial-in. Starting with Linux kernel 2.2, a warning message is put in the kernel log when one uses cua. This is an omen that cua is defunct and should be avoided if possible.
Next Previous Contents |
|
© 2001 Red Hat, Inc. All rights reserved. About Red Hat : Legal statement : Privacy statement : Y2K statement : Contact Red Hat |