*BSD News Article 36258


Return to BSD News archive

Path: sserve!newshost.anu.edu.au!harbinger.cc.monash.edu.au!msuinfo!gmi!zombie.ncsc.mil!news.duke.edu!news-feed-1.peachnet.edu!gatech!howland.reston.ans.net!swrinde!news.uh.edu!uuneo.neosoft.com!Starbase.NeoSoft.COM!georgel
From: georgel@starbase.neosoft.com (George Livsey)
Newsgroups: comp.os.386bsd.questions
Subject: Can't get FreeBSD to spawn getty on modem line
Date: 28 Sep 1994 16:24:47 GMT
Organization: NeoSoft Internet Services   +1 713 684 5969
Lines: 241
Message-ID: <36c5cf$8md@uuneo.neosoft.com>
NNTP-Posting-Host: starbase.neosoft.com
X-Newsreader: TIN [version 1.2 PL2]

I would like to start out by thanking all of the people 
who responded to my last post.  I finally got the USR
14.4 to answer, the problem now is that I can't get
FreeBSD 1.1.5.1 to spawn a getty on the modem line.
I checked using "ps -a" while a friend attempted a login.
Here are all of the settings that I can think of which
might be causing the problem.  The device files for the
serial lines were created using "/usr/MAKEDEV tty00". I
cahnged the permissions to rw for all on everything except
for lines owned by UUCP.  If anyone has any ideas, I would 
greatly appreciate hearing them.


George Livsey
georgel@starbase.neosoft.com


#       @(#)ttys        5.1 (Berkeley) 4/17/89
#
# name  getty                           type    status          comments
#
# This entry needed for asking password when init goes to single-user mode
# If you want to be asked for password, change "secure" to "insecure" here
# Virtual terminals
ttyv1   "/usr/libexec/getty Pc"         cons25  on secure
ttyv2   "/usr/libexec/getty Pc"         cons25  on secure
ttyv3   "/usr/libexec/getty Pc"         cons25  off secure
# Hardwired terminals
#tty00  "/usr/libexec/getty std.9600"   unknown off secure
#tty01  "/usr/libexec/getty std.9600"   unknown off secure
# Dialin terminals
ttyd0   "/usr/libexec/getty std.57600"  dialup  off insecure
#ttyd1  "/usr/libexec/getty std.57600"  unknown off insecure
# Pseudo terminals
ttyp0   none                    network

=============================================================================

#this is rc.serial

# Change some defauls for serial devices.
# Standard defaults are:
#       dtrwait 300
#       initial cflag from <sys/ttydefaults.h> = cread cs8 hupcl
#       initial iflag, lflag and oflag all 0
#       speed 9600
#       special chars from <sys/ttydefaults.h>
#       nothing locked
# except for serial consoles the initial iflag, lflag and oflag are from
# <sys/ttydefaults.h> and clocal is locked on.
default() {
	# Reset everything changed by the other functions to initial defaults.
		echo "default() executed "  
	for i in $*
	do
		comcontrol /dev/ttyd$i dtrwait 300
		stty </dev/ttyid$i -clocal  crtscts  hupcl 9600 reprint ^R
		stty </dev/ttyld$i -clocal -crtscts -hupcl 0
		stty </dev/cuai0$i -clocal  crtscts  hupcl 9600 reprint ^R
		stty </dev/cual0$i -clocal -crtscts -hupcl 0
	done
}

maybe() {
	# Special settings.
		echo "maybe() executed " 
	for i in $*
	do
		# Don't use ^R; it breaks bash's ^R when typed ahead.
		stty </dev/ttyid$i reprint undef
		stty </dev/cuai0$i reprint undef
		# Lock clocal off on dialin device for security.
		stty </dev/ttyld$i clocal
		# Lock the speeds to use old binaries that don't support them.
		# Any legal speed works to lock the initial speed.
		stty </dev/ttyld$i 300
		stty </dev/cual0$i 300
	done
}

modem() {
	# Modem that supports CTS and perhaps RTS handshaking.
		echo "modem() executed"     
	for i in $*
	do
		comcontrol /dev/ttyd$i dtrwait 100      # may depend on modem
		# Lock crtscts on.
		# Speed reasonable for V42bis.
		stty </dev/ttyid$i crtscts brkint ignpar clocal 57600
		stty </dev/ttyld$i crtscts 57600
		stty </dev/cuai0$i crtscts brkint ignpar clocal 57600
		stty </dev/cual0$i crtscts 57600
		stty </dev/ttyd$i crtscts brkint ignpar clocal 57600    
		stty </dev/cua0$i crtscts brkint ignpar clocal 57600

	done
}

mouse() {
	# Mouse on either callin or callout port.
	for i in $*
	do
		# Lock clocal on, hupcl off.
		# Standard speed for Microsoft mouse.
		stty </dev/ttyid$i clocal -hupcl 1200
		stty </dev/ttyld$i clocal  hupcl
		stty </dev/cuai0$i clocal -hupcl 1200
		stty </dev/cual0$i clocal  hupcl
	done
}

terminal() {
	# Terminal that supports CTS and perhaps RTS handshaking
	# with the cable or terminal arranged so that DCD is on
	# at least while the terminal is on.
	# Also works for bidirectional communications to another pc
	# provided at most one side runs getty.
	# Same as modem() except we want a faster speed and no dtrwait.
	modem $*
	for i in $*
	do
		comcontrol /dev/ttyd$i dtrwait 0
		stty </dev/ttyid$i 115200
		stty </dev/cuai0$i 115200
	done
}
# Don't use anything from this file unless you have some buggy programs
# that require it.
#
# Edit the functions and the examples to suit your system.
#
# maybe         0 1 2 3 4 5 6 7 8 9 a b c d e f g h i j k l m n o p q r s t u v
mouse           1
modem           0
# terminal      0

============================================================================

#This is stty -a -f /dev/cua00 

speed 57600 baud; 0 rows; 0 columns;
lflags: -icanon -isig -iexten -echo -echoe -echok -echoke -echonl
	-echoctl -echoprt -altwerase -noflsh -tostop -mdmbuf -flusho
	-pendin -nokerninfo -extproc
iflags: -istrip -icrnl -inlcr -igncr -ixon -ixoff -ixany -imaxbel -ignbrk
	brkint -inpck ignpar -parmrk
oflags: -opost -onlcr -oxtabs
cflags: cread cs8 -parenb -parodd hupcl clocal -cstopb crtscts -dsrflow
	-dtrflow
cchars: discard = ^O; dsusp = ^Y; eof = ^D; eol = <undef>;
	eol2 = <undef>; erase = ^?; intr = ^C; kill = ^U; lnext = ^V;
	min = 1; quit = ^\; reprint = ^R; start = ^Q; status = <undef>;
	stop = ^S; susp = ^Z; time = 0; werase = ^W;
=============================================================================
#This is stty -a -f /dev/ttyd0


speed 57600 baud; 0 rows; 0 columns;
lflags: -icanon -isig -iexten -echo -echoe -echok -echoke -echonl
	-echoctl -echoprt -altwerase -noflsh -tostop -mdmbuf -flusho
	-pendin -nokerninfo -extproc
iflags: -istrip -icrnl -inlcr -igncr -ixon -ixoff -ixany -imaxbel -ignbrk
	brkint -inpck ignpar -parmrk
oflags: -opost -onlcr -oxtabs
cflags: cread cs8 -parenb -parodd hupcl clocal -cstopb crtscts -dsrflow
	-dtrflow
cchars: discard = ^O; dsusp = ^Y; eof = ^D; eol = <undef>;
	eol2 = <undef>; erase = ^?; intr = ^C; kill = ^U; lnext = ^V;
	min = 1; quit = ^\; reprint = ^R; start = ^Q; status = <undef>;
	stop = ^S; susp = ^Z; time = 0; werase = ^W;

============================================================================
USRobotics Sportster 14400 Fax Settings...

   B0  E1  F1  L1  M1  Q0  V1  X4  Y0
   BAUD=57600   PARITY=N  WORDLEN=8
   DIAL=HUNT   ON HOOK

   &A3  &B1  &C1  &D0  &G0  &H1  &I0  &K1
   &M4  &N0  &P0  &R2  &S0  &T5  &Y1

   S00=001  S01=000  S02=043  S03=013  S04=010  S05=008  S06=002
   S07=045  S08=002  S09=006  S10=007  S11=070  S12=050  S13=000
   S14=000  S15=000  S16=000  S17=000  S18=000  S19=000  S20=000
   S21=010  S22=017  S23=019  S24=000  S25=005  S26=000  S27=000
   S28=008  S29=020  S30=000  S31=000  S32=000  S33=000  S34=006
   S35=000  S36=014  S37=000  S38=000  S39=000  S40=000  S41=000
   S42=000  S43=000  S44=015  S45=000  S46=000  S47=000  S48=000
   S49=000  S50=000  S51=000
============================================================================
Modem DIP Switch Settings are as follows:

 DIP   DEFAULT CURRENT  FUNCTION
----   ---     ---      --------------------------------------------------
  1    OFF     ON       Data Terminal Ready (DTR) Override
			
			OFF - Normal DTR operations:  computer must provide 
			      DTR signal for modem to accept commands; 
			      dropping DTR terminates a call
			ON  - Modem ignores DTR (Override)
	    
   2   OFF     OFF      Verbal/Numeric Result Codes
			
			OFF Verbal (word) results
			ON  Numeric results
	    
   3   ON      ON       Result Code Display
			
			OFF Results suppressed
			ON  Results enabled
   
   4   OFF     OFF      Command Mode Local Echo Suppression
   
			OFF Keyboard commands displayed
			ON  Echo suppressed
	    
   5   ON      OFF      Auto Answer Suppression
			
			OFF Modem answers on first ring, or higher if 
			    specified in NVRAM
			ON  Auto answer disabled

   6   OFF     OFF      Carrier Detect (CD) Override
   
			OFF Modem sends CD signal when it connects with 
			    another modem, drops CD on disconnect
			ON  CD always ON (Override) 
	    
   7   OFF     OFF      Power-on and ATZ Reset Software Defaults
			
			OFF Load Y or Y1 configuration from user-defined 
			    nonvolatile memory (NVRAM) 
			ON  Load &F0--Generic template from read only 
			    memory (ROM) 

   8   ON      ON       AT Command Set Recognition
   
			OFF Command recognition disabled (Dumb Mode) 
			ON  Recognition enabled (Smart mode)