[net.unix-wizards] Need help with modems under Ultrix

mark@ncsu.UUCP (Mark Lanzo) (08/05/86)

Well, I did so well with my last question to this group (thanks folks!)
that I'm gonna try again with a new one!

The situation:  
    I am trying to hook up a modem to a MicroVax II running
Ultrix-32m V1.2.  The modem needs to be usable for both incoming and
outgoing use.

The problem:
    Nothing I or anyone at our site has been able to do has worked to
convince the system to handle the line properly.  We had no problems 
before when we were running under V1.1 of the OS, but apparently V1.2
handles terminals in a significantly different fashion.
The problems we have are (a) baud-rate switching does not seem to work
very well for dial-in users, (b) system tends not to know if the phone line
has been disconnected, and hence doesn't log you off if you hang up or get
cut off.


Specifics for the problem:

   MicroVax II running Ultrix32m Version 1.2
   Modem is a Hayes Smart-modem 2400 baud variety.
   Everything worked fine under V1.1.  Hence, I don't think it's the
   modem cable or anything like that.
   The modem should rotor around from 2400 to 1200 to 300 baud.
   Normal dial-out use is with the C-Kermit program, but we also want UUCP
   to understand how to use the line.

   I have tried all the tricks I could think of in the /etc/termcap file,
   /etc/gettytab, etc.
   The only way I have been able to get the system to use the modem control
   lines (ie, sense the carrier) is by writing a program which performed 
   ioctl calls on the modem line (/dev/tty01 if it matters).  Specifying
   the "modem" field in the gettytab entry didn't seem to affect this.
   (So what action DOES this flag control?).

   Dial-in use:
       Usually you can get connected (get a carrier), but once you get it
   you have a very hard time getting logged in.  Hitting the BREAK key
   at your remote terminal is supposed to cause the baud rate to switch
   around, but it rarely does.  Usually the system prints garbage on your
   screen (apparently the login prompt being spewed at you at the wrong
   baud rate), and hitting BREAK key more than once either (a) gets you
   no response at all, in which case the only way to ever get the system
   to pay attention again is to hang up and call again, or (b) just 
   re-prints the aforementioned string of garbage.  If you are a stubborn
   sort, and keep calling in, you may eventually get on.
   As already mentioned, if you DO get on, and get disconnected, the system
   won't log you off.  Definitely a security problem!

   Dial-out use:
       Actually, dial out use has been fairly well behaved.  I've written 
   programs which stop/start the getty on the line, then connect you to
   the modem (via C-Kermit).  Here I would just like to know if anyone has
   a GOOD system for doing this, or a better approach.  My routines are
   just simple programs which win no awards for robustness.  For instance,
   if the user aborts the communications program, the system won't restart
   the getty on the line.

So...

    Is there anyone out there who has experience with this and who could
lend a hand?  Are they any common packages out there which make the 
line conveniently useful for both ingoing and outgoing operation?

Thanks in advance...


Mark Lanzo
Communication Unlimited, Inc.   (NOT NC State Univ!)


PS:  please send replies via email (path = ...decvax!mcnc!mark ?) as I
have not subscribed to this newsgroup (and I'm a couple of hundred articles
backlogged in those groups I *am* subscribed to!)

avolio@decuac.DEC.COM (Frederick M. Avolio) (08/07/86)

[ I have written to him about this, but thought that others might have
the same questions... ]

In article <3097@ncsu.UUCP>, mark@ncsu.UUCP (Mark Lanzo) writes:
> The problem:
>     Nothing I or anyone at our site has been able to do has worked to
> convince the system to handle the line properly.  We had no problems 
> before when we were running under V1.1 of the OS, but apparently V1.2
> handles terminals in a significantly different fashion.

Yes indeed.  Assuming the /etc/ttys file is set up correctly (and you
should check this) you still need to tell the operating system to use
modem control on the individual line(s) through the flag field in the
config file for the system.

> The problems we have are (a) baud-rate switching does not seem to work
> very well for dial-in users, (b) system tends not to know if the phone line
> has been disconnected, and hence doesn't log you off if you hang up or get
> cut off.

 a) sounds like a modem problem (the system shouldn't have any control
over this, although make sure the entry in /etc/ttys properly rotors
on the speeds you want (You probably want d1200 on the line such as...

ttyd1   "/etc/getty d1200" dialup       on modem shared


>    Dial-in use:
>    ...
>    As already mentioned, if you DO get on, and get disconnected, the system
>    won't log you off.  Definitely a security problem!

The latter would be caused by not telling the system of modem control
in the config file.

>    Dial-out use:
>        Actually, dial out use has been fairly well behaved.  I've written 
>    programs which stop/start the getty on the line, then connect you to
>    the modem (via C-Kermit).  Here I would just like to know if anyone has
>    a GOOD system for doing this, or a better approach.  

Yes, Ultrix does :-).  Tell it you want to set up the line as shared
(see ttys line example above).  This'll turn it on and off correctly.
See the release notes regading this for a caveat or two.

Finally, perhaps the switches (software registers?) on the hayes are
incorrectly set.  I received the following, which may be of help.
Note, that is is for hoking up to a dmf-32.

->   The following is what we found to be a viable solution as far as using 
-> Hayes 2400 baud smartmodems with a DMF-32. ...
-> Use appendix of the Smartmodem 2400 User's Guide, and the switch settings 
-> recommended for use with the Hayes 1200 baud modem. These commands will
-> set up the modem to talk to the DMF-32 and do auto answer.
-> 
-> Switch setting Hayes 1200	function	smartmodem 2400 command
-> switch 1 up			Dtr status	AT&D2&W
-> switch 2 up			Result code mode ATV1&W
-> switch 3 down                   Result code disp ATQ&W
-> switch 4 down                   Command echo    ATE&W
-> switch 5 up* not in etc/remote	auto answer     ATS0=1&W
-> switch 6 up			detect carrier	AT&C1&S1&W
-> switch 7 up			telephone jack  AT&J&W
-> switch 8 down                   command recog   see dumb mode strap
-> switch 9 up                     bell/CCITT      ATB1&W
-> switch 10 up                    modem reset     AT&D1&W

-- 
Fred @ DEC Ultrix Applications Center
INET: avolio@decuac.DEC.COM				* Fight the Fight *
UUCP: {decvax,seismo,cbosgd}!decuac!avolio	       * Rescue the Unborn *

das@cirl.UUCP (Dave Steffens) (08/10/86)

In article <1034@decuac.DEC.COM>, Fred Avolio writes:
> [ I have written to him about this, but thought that others might have
> the same questions... ]
> 
> In article <3097@ncsu.UUCP>, mark@ncsu.UUCP (Mark Lanzo) writes:
>> The problem:
>>     Nothing I or anyone at our site has been able to do has worked to
>> convince the system to handle the line properly.  We had no problems 
>> before when we were running under V1.1 of the OS, but apparently V1.2
>> handles terminals in a significantly different fashion.
> 
> Yes indeed.  Assuming the /etc/ttys file is set up correctly (and you
> should check this) you still need to tell the operating system to use
> modem control on the individual line(s) through the flag field in the
> config file for the system.
> -- 
> Fred @ DEC Ultrix Applications Center
> INET: avolio@decuac.DEC.COM				* Fight the Fight *
> UUCP: {decvax,seismo,cbosgd}!decuac!avolio	       * Rescue the Unborn *

Uh, yeah.  I wrote to Mike, too, because I stumbled over this same problem
in Ultrix 1.1 -- how Mike managed to avoid it in 1.1 and tripped over it in 1.2
is a mystery to me.  The only reason I figured it out was because I happened to
have access to 4.2bsd sysgen literature which is **not** supplied with Ultrix.
To my knowledge, the only other place this is mentioned in Ultrix documentation
is an obscure reference in DHU(4).  Perhaps the information on how to setup
Ultrix for modem control should be a little more available to non-wizards?

And even given this information, you must know **how** to do a sysgen.
Why not just provide a shell script which uses adb to mung the flagword
in the bootable system image /vmunix?  Then the administrator wouldn't need
to know anything about sysgens and flagwords.  This would certainly be in
keeping with the other Ultrix "make it simple" installation scripts.
For an even more general method, why not do away with the flagword altogether
and specify modem control in /etc/ttys, al la 2.9bsd?
-- 
{harvard,mit-eddie,think}!eplunix!earvax!das	David Allan Steffens
243 Charles St., Boston, MA 02114		Eaton-Peabody Laboratory
(617) 523-7900 x2748				Mass. Eye & Ear Infirmary

brett@wjvax.UUCP (Brett Galloway) (08/11/86)

In article <3097@ncsu.UUCP> mark@ncsu.UUCP (Mark Lanzo) writes:
>Well, I did so well with my last question to this group (thanks folks!)
>that I'm gonna try again with a new one!
>
>The situation:  
>    I am trying to hook up a modem to a MicroVax II running
>Ultrix-32m V1.2.  The modem needs to be usable for both incoming and
>outgoing use.
>[more about ultrix]
>       Actually, dial out use has been fairly well behaved.  I've written 
>   programs which stop/start the getty on the line, then connect you to
>   the modem (via C-Kermit).  Here I would just like to know if anyone has
>   a GOOD system for doing this, or a better approach.

I am on a bsd4.2 system.  I have been told that ultrix provides better
facilities for bi-directional use of a modem than does bsd4.2, but I, too,
am interested in allowing dial-in/dial-out on the same modem.  It appears to
me that bsd4.2 requires that getty be enabled on the line to allow
dial-in.  Given that, the only way I know of to allow dial-ins is to
twiddle on the /etc/ttys file to turn off getty and ping init with
kill -HUP 1.  That is very crude, however.  Does anyone know of a better way
to get getty to sleep while you use the modem for dial-out?  Please respond
to the net or by E-mail.

-------------
Brett Galloway
{pesnta,twg,ios,qubix,turtlevax,tymix,vecpyr,certes,isi}!wjvax!brett
-- 
-------------
Brett Galloway
{pesnta,twg,ios,qubix,turtlevax,tymix,vecpyr,certes,isi}!wjvax!brett

simon@einode.UUCP (Simon Kenyon) (08/12/86)

> 
> [ I have written to him about this, but thought that others might have
> the same questions... ]
> 
> In article <3097@ncsu.UUCP>, mark@ncsu.UUCP (Mark Lanzo) writes:
>> The problem:
>>     Nothing I or anyone at our site has been able to do has worked to
>> convince the system to handle the line properly.  We had no problems 
>> before when we were running under V1.1 of the OS, but apparently V1.2
>> handles terminals in a significantly different fashion.
> 
> Yes indeed.  Assuming the /etc/ttys file is set up correctly (and you
> should check this) you still need to tell the operating system to use
> modem control on the individual line(s) through the flag field in the
> config file for the system.
but how does one tell ultrix to start looking at modem signals?
i ended up writing a prog to do it :-|
-- 
Simon Kenyon			The National Software Centre, Dublin, IRELAND
simon@einode.UUCP						+353-1-716255
EEEK /dev/mouse escaped (Glad to see my competition went down well at USENIX)

iglesias@ICS.UCI.EDU (Mike Iglesias) (08/12/86)

I've had the same problems with dialin lines on my uvax II/Ultrix 1.2
system.  I've noticed that the longer you hold the break key down,
the more garbage comes out.  I've also had it switch to the proper
speed and then to the next speed.  

I saw one entry in unix-wizards from someone at DEC.  Do you know what
system configuration file he is talking about?


Thanks,

Mike Iglesias
University of California, Irvine
iglesias@ics.uci.edu    (arpa)
...ucbvax!ucivax!iglesias  (uucp)