Hylafax Mailing List Archives
|
[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
Re: Need help on Linux
> By the way: Don't use one of the /dev/cuax devices. Use /dev/ttySx
> instead...
>
> Could you please explain in detail the difference between
> the two devices (as far I can see they have at least different
> major number and perhaps different kernel drivers):
>
> $ ls -l /dev/ttyS1 /dev/cua1
> crw-rw-rw- 1 root uucp 5, 65 Jul 18 1994 /dev/cua1
> crw-rw-rw- 1 root tty 4, 65 Jul 18 1994 /dev/ttyS1
>
> Why /dev/cuax exists _and_ should not be used?
Ancient history: Back in the bad old days before smartmodems, there
really was a separate device used to place outgoing calls. Then
even after smartmodems were developed that could take 'in band'
dialing commands on the same serial port, uucp and cu (the stock
unix dialup suite) had no mechanism to open a port that did not
have carrier detect active. If you configured the modem to hold
CD up all the time, you couldn't tell when the other end hung up.
Also, there were locking issues between getty and the dial-out
programs if you wanted bidirectional lines. One of the early
solutions to this was to revive the concept of the cuaxx devices
but instead of a separate dialer device they became a different
interface to the same serial port as a ttyxx line. The cuaxx
allowed opening without CD so you could chat with a modem and the
kernel provided locking between the two interfaces so a getty
waiting for CD to complete the open on the ttyxx device would not
wake up if another process had opened the matching cuaxx device for
an outbound call. This was a workable scheme, but it screws up
the lockfile concepts used by most software and it is no longer
necessary. More recent versions of unix provide ways to open the
ttyxx devices without CD up and the uucp/cu setup now has a way
to describe it. Programs expecting to block waiting for CD on
inbound calls have to use the ttyxx devices, and if you are going
to mix these with programs that use lockfiles to contend for
outbound access you have to use the same device there as well.
Les Mikesell
les@mcs.com