From: Arjan de Vet (devet@adv.win.tue.nl)
Date: 02/11/93


From: devet@adv.win.tue.nl (Arjan de Vet)
Subject: SUCCESS! dialin/dialout OK with new serial drivers 99p5
Date: 11 Feb 1993 22:58:34 GMT


Some days ago I had some troubles with 99p4 + ALPHA-difss which included the
new serial drivers with separate dial-in and dial-out ports.

Now I have linux 99p5 and both dial-in and dial-out work OK. I had to do one
thing: replacing /bin/login by a newer version which doesn't hangup the
modem. I took the login from poeigl version 1.9a.

I now have two devices for the modem (on COM2):

===> /dev/ttyS1 (was /dev/ttys1, Linus changed the in the Linux bootup
                 sequence).

This was previously both dial-in and dial-out device which gave some
problems when you wanted to have both. uugetty was one way to solve this
problem.

Now it is the dial-in device. I have the following line in /etc/inittab (I
also use the (simple)init from poeigl):

ttyS1:vt100:/etc/getty 19200 ttyS1

My modem settings are ATQ1S0=4. That means no messages (these often confuse
the login process and hangup the phone) and answering after four rings.

The getty i'm using is also from poeigl. One important requirement for getty
is that it does NOT use O_NONBLOCK when opening the modem dial-in device.
poeigl's getty satisfies this requirement.

When getty opens the line it blocks on the open() call. After answering a
call the DCD line (Data Carrier Detect) goes high and then the open()
succeeds. The open() call remains blocked when the dial-out device /dev/cua1
is in use.

*** /dev/cua1

This the new dial-out device. You can use it for Kermit, minicom, Seyon or
UUCP. Programs using this port should also NOT use O_NONBLOCK. They then
report `Port in use' or some similar message when someone is dialling in. I
have this /dev/cua1 world-writable (`chmod 666 /dev/cua1' in /etc/rc) so any
user can use kermit to dial-out.

The open() call on /dev/cua1 blocks when someone is dialling in on
/dev/ttyS1.

My UUCP dialing script has an explicit ATQ0 because UUCP needs the modem
messages. My modem (ZyXEL) does an automatic reset to a stored profile when
UUCP-ing is done (a close gives a temporary drop in the DTR line, which
resets the modem). ATQ1S0=4 is stored in this profile. On ZyXEL modems this
automatic reset can be accomplished by AT&D3.

PLEASE NOTE: many people will have a symlink /dev/modem to one of the
/dev/ttyS?? ports for dialing out. When upgrading to 99p5 you should change
this link to the corresponding /dev/cua?? device. To avoid any confusion
with the exact meaning of /dev/modem (is it the dial-in or dial-out device?)
I would recommend using the names ttyS? and cua?.

You can make these new devices by using mknod

mknod /dev/cua0 c 5 64
mknod /dev/cua1 c 5 65
mknod /dev/cua2 c 5 66
mknod /dev/cua3 c 5 67

If you have questions about 99pl5 and dialing in or out with these new
devices, I'll be happy to answer your questions. I do ***NOT*** have the
time or knowledge to answer dial-in or dial-out problems with earlier Linux
versions or uugetty: I use 99p5 and init, getty and login from poeigl 1.9a,
so please upgrade to these versions before asking questions.

Arjan