Subject: 1.2 modem devices

From: "Peter Tobias" <[email-masked]>
Date: Sun, 16 Jun 1996 00:48:29 +0200 (MET DST)

IMHO we should change our comm packages for Debian 1.2 to use
/dev/ttyS* instead of /dev/cua*:

Theodore Y. Ts'o wrote:
> From [email-masked] Tue May 14 02:34:03 1996
> Date: 	Mon, 13 May 1996 13:51:04 -0400
> Message-Id: <[email-masked]>
> From: "Theodore Y. Ts'o" <[email-masked]>
> To: Tony Nugent <[email-masked]>
> Cc: [email-masked], [email-masked]
> In-Reply-To: Tony Nugent's message of Mon, 13 May 1996 07:57:09 +1000,
> 	<[email-masked]>
> Subject: Re: /dev/cua? Vs /dev/ttyS? (was: Re: co-existance of pppd and mgetty ?)
> Address: 1 Amherst St., Cambridge, MA 02139
> Phone: (617) 253-8091
> Sender: [email-masked]
> Precedence: bulk
> 
>    Date: 	Mon, 13 May 1996 07:57:09 +1000
>    From: Tony Nugent <[email-masked]>
> 
>    Can someone kindly explain the difference between the /dev/cua? and
>    /dev/ttyS? devices?
> 
> /dev/ttySxx devices are fully POSIX-compliant TTY devices.  If you are
> only going to be using one set of tty devices, you should be using
> /dev/ttySxx. 
> 
> /dev/cuaXX devices are different from /dev/ttySXX in two ways --- first
> of all, they will allow you to open the device even if CLOCAL is not set
> and the O_NONBLOCK flag was not given to the open device.  This allows
> programs that don't use the POSIX-mondated interface for opening
> /dev/ttySxx devices to be able to use /dev/cuaXX to make outgoing phone
> calls on their modem (cu stands for "callout", and is taken from SunOS).
> 
> The second way in which /dev/cuaXX differs from /dev/ttySXX is that if
> they are used, they will trigger a simplistic kernel-based locking
> scheme:  If /dev/ttySXX is opened by one or more processes, then an
> attempt to open /dev/cuaXX will return EAGAIN.  If /dev/cuaXX is opened
> by one or more processes, then an attempt to open /dev/ttySXX will
> result the open blocking until /dev/cuaXX is closed, and the carrier
> detect line goes high.
> 
> While this will allow for simple lockouts between a user using a modem
> for callout and a getty listening on the line for logins, it doesn't
> work if you need to arbitrate between multiple programs wanting to do
> dialout --- for example, users wanting to do dialout and UUCP.
> 
> I originally implemented the cuaXX/ttySXX lockout mechanism back before
> FSSTND established a standard convention for the use of tty lock files.
> Now that it's there, people should use the tty lock files and not try
> using /dev/cuaXX.  The only reason why /dev/cuaXX hasn't disappeared yet
> is for backwards compatibility reasons.
> 
> 						- Ted
> 
> 

Thanks,

Peter

-- 
 Peter Tobias                                EMail:
 Fachhochschule Ostfriesland                 [email-masked]
 Fachbereich Elektrotechnik und Informatik   [email-masked]
 Constantiaplatz 4, 26723 Emden, Germany     [email-masked]

---

From: Bill Mitchell <[email-masked]>
Date: Sun, 16 Jun 1996 09:51:02 -0700 (PDT)

>/dev/ttyS* instead of /dev/cua*:

I'm hardly expert in standard practices in this area, but I'm
under the impression that the cua* devices are for dial-out.

This may not be definitive, but I note the following in
/usr/source/linux/Documentation/devices.txt:

  3 char        Pseudo-TTY slaves
                [...]
                 64 = /dev/ttyS0        First serial port
                      ...
                127 = /dev/ttyS63       64th serial port
                [...]
  5 char        Alternate TTY devices
                  0 = /dev/tty          Current TTY device
                 64 = /dev/cua0         Callout device corresponding to ttyS0
                      ...
                127 = /dev/cua63        Callout device corresponding to ttyS63

---

From: "Peter Tobias" <[email-masked]>
Date: Tue, 18 Jun 1996 20:06:00 +0200 (MET DST)

> /usr/source/linux/Documentation/devices.txt:

The reasons why this should be changed were part of the mail
from Theodore Ts'o. The cua devices use a kernel based locking
mechanism which can't be used in all situations. For example I
have to use the ttyS* devices for mgetty/dip/minicom (dip and
minicom won't work with the cua* devices). But that is much
better explained in the mail from Theodore Ts'o.

Thanks,

Peter

---

From: CD Rasmussen <[email-masked]>
Date: Wed, 19 Jun 1996 08:46:56 -0400

This is an old issue for which we have not made a decision and written
down as policy.  I motion that all serial port modem traffic to be
used on /dev/ttyS*.  We need the consistency in the serial post lock
names. 

Thanks,
  Costa

   Subject: Re: 1.2 modem devices
   To: [email-masked] (Bill Mitchell)
   Date: Tue, 18 Jun 1996 20:06:00 +0200 (MET DST)
   From: "Peter Tobias" <[email-masked]>
   Cc: [email-masked]

   Thanks,
   
   Peter

---

From: "Peter Tobias" <[email-masked]>
Date: Wed, 19 Jun 1996 23:59:49 +0200 (MET DST)

CD Rasmussen wrote:
> down as policy.

The decision was to use cua* for minicom/dip etc.. (the decision
was made about 2 years ago).

> I motion that all serial port modem traffic to be

There should be no problem if all programs use the ttyS* devices and
the /var/lock directory.

Thanks,

Peter