[comp.sys.ultrix] How to dial out from DS3100

connie@psych.Stanford.EDU (Constance Stillinger) (03/29/90)

Since a zillion people have asked me for this info, I am posting it.
Comments and corrections are most welcome!

Here's what I finally did in order to dial out from my ds3100 with a
2400 bps hayes-compatible modem.  The section of the manual that tells
you what to do is (obviously...??) "Guide to the UUCP Utility" (in
System Management vol. 3).

    >>>> I just don't have the faintest idea how to configure things
    to enable dial-INS, however.  Anyone who has been able to do this,
    pleeeeze email me! <<<<


1. Bought cable and adaptor from DEC (cable BC16E-10 -- the "10"
signifies the length in feet -- and adaptor H8571-C).  The adaptor has
a pair of superfluous attachment posts that I snapped off easily with
a pair of pliers (otherwise it wouldn't plug in to the modem).


2. With the "Guide to UUCP" in my lap, I then ran "uucpsetup," which
evidently moved /dev/tty00 to /dev/ttyd1 and created a line in
/etc/ttys, which I had to edit further to read:

ttyd1 "/etc/getty S2400"  dialup  off  modem  shared # oldname=tty00,hayes

    This supposedly (a) tells init to do a getty on ttyd1 searching for
    the S2400 entry [2400-baud rotary] in /etc/gettytab, (b) says the
    terminal attached to it is a vt100 [maybe unnecessary], (c) disables
    logins [when I set the line to "on" instead, I got an "all ports busy"
    message when I tried to dial out], (d) enables modem control [maybe
    unnecessary], and (d) says the line can be used for both incoming and
    outgoing calls (?).

    (after you make these changes, you have to do kill -1 1 in order to
    rescan the ttys file)


3. chmod 666 /etc/ttyd1   (uucpsetup probably already did this for me)

4. Checked /var/uucp/L-devices to verify that it contained the
following line:

ACU     ttyd1 ttyd1 2400 hayes


5. In /etc/remote, I created an entry that looks like this:

con2400|my 2400 baud:\
	:dv=/dev/ttyd1:br#2400:at=hayes

    This entry is used by tip (which you will use to actually dial out),
    telling it that (a) the modem device is at /dev/ttyd1, (b) the baud
    rate is 2400, and (c) to look in /etc/acucap for capabilities of the
    hayes modem.  I did not change the hayes entry in /etc/acucap.


6. Then back at csh prompt, "tip con2400", which should respond with
"connected (/dev/ttyd1)", whereupon you can type AT commands to
the modem.


Connie

Constance Stillinger
connie@psych.stanford.edu  (Now of Northwestern Univ., Evanston, IL)
-------

jtkohl@MIT.EDU (John T Kohl) (03/29/90)

In article <1079@psych.stanford.edu> connie@psych.Stanford.EDU (Constance Stillinger) writes:

>     >>>> I just don't have the faintest idea how to configure things
>     to enable dial-INS, however.  Anyone who has been able to do this,
>     pleeeeze email me! <<<<

I have a modem (Telebit Trailblazer +) set up for dial in/out on my
machine.  For dial-out, I use kermit, with some mods I added to do the
line sharing properly (attached are patches to ckutio.c, from C-Kermit,
4D(061) 8 Sep 86).  Just do 

	set line /dev/ttyd0
	set baud xxxx
	connect
and dial away.

For dial-in, I modified /etc/gettytab to make an appropriate baud-rate loop
for autobauding incoming connections, but it sometimes doesn't work
quite right.  I usually dial in at 9600bps, so it's usually not a
problem.
>>> WARNING:  make sure your modem is silent (non-echoing, no ring
indication, etc), otherwise the getty process and the modem will have a
nice long chat, eating up CPU time.

My /etc/ttys line for the dialin/out is this:
ttyd0   "/etc/getty D9600" network      on shared secure # modem line

(D9600 is my new entry in /etc/gettytab)

and the kermit patches (again, relative to C-Kermit 4D(061) 8 Sep 86)
*** /tmp/,RCSt1000726	Thu Mar 29 09:36:50 1990
--- ckutio.c	Wed Sep 20 15:42:53 1989
***************
*** 377,389 ****
  #ifdef NEWUUCP
      acucntrl("disable",ttname);		/* Open getty on line (4.3BSD) */
  #endif
! #ifdef UXIII
      /* if modem connection, don't wait for carrier */
      ttyfd = open(ttname,O_RDWR | (modem ? O_NDELAY : 0) );
  #else
      ttyfd = open(ttname,2);		/* Try to open for read/write */
  #endif
! 
      if (ttyfd < 0) {			/* If couldn't open, fail. */
  	perror(ttname);
  	return(-1);
--- 377,393 ----
  #ifdef NEWUUCP
      acucntrl("disable",ttname);		/* Open getty on line (4.3BSD) */
  #endif
! #ifdef ultrix
      /* if modem connection, don't wait for carrier */
+     ttyfd = open(ttname,O_RDWR | O_BLKINUSE, 0 );
+ #else
+ #ifdef O_NDELAY
+     /* if modem connection, don't wait for carrier */
      ttyfd = open(ttname,O_RDWR | (modem ? O_NDELAY : 0) );
  #else
      ttyfd = open(ttname,2);		/* Try to open for read/write */
  #endif
! #endif /* ultrix */
      if (ttyfd < 0) {			/* If couldn't open, fail. */
  	perror(ttname);
  	return(-1);
***************
*** 452,457 ****
--- 456,465 ----
  
  /* Request exclusive access on systems that allow it. */
  
+ #ifdef ultrix
+     if (ioctl(ttyfd, TIOCSINUSE, 0) < 0)
+ 	fprintf(stderr,"Warning, problem getting inuse access\n");
+ #endif
  #ifndef XENIX
  /* Xenix exclusive access prevents open(close(...)) from working... */
  #ifdef TIOCEXCL
***************
*** 489,494 ****
--- 497,506 ----
      }
      ttres();				/* Reset modes. */
  /* Relinquish exclusive access if we might have had it... */
+ #ifdef ultrix
+     if (ioctl(ttyfd, TIOCCINUSE, 0) < 0)
+     	fprintf(stderr,"Warning, problem relinquishing inuse access\n");
+ #endif
  #ifndef XENIX
  #ifdef TIOCEXCL
  #ifdef TIOCNXCL
--
John Kohl <jtkohl@ATHENA.MIT.EDU> or <jtkohl@Kolvir.Brookline.MA.US>
Digital Equipment Corporation/Project Athena
(The above opinions are MINE.  Don't put my words in somebody else's mouth!)