Date: Thu, 23 Mar 2000 16:05:10 -0600 From: "Dr. Andrew Wallace" <Andy.Wallace@angelo.edu> To: freebsd-questions@freebsd.org Subject: dial-in service Message-ID: <3.0.6.32.20000323160510.0079ebb0@cronus.angelo.edu>
next in thread | raw e-mail | index | archive | help
Hello All, I have been through Chapter 14 Section 3 on Dial-in Service. When I tested the dial-in connection, I see random characters echoed to the terminal window. Do I have a problem with terminal type or is there a problem with my setup? I am using a cirrus-logic 3450 chipset modem and FreeBSD 3.2. Here are the important files. /etc/ttys # # $Id: ttys,v 1.2.2.1 1999/02/12 04:03:39 wes Exp $ # @(#)ttys 5.1 (Berkeley) 4/17/89 # # name getty type status comments # # This file specifies various information about terminals on the system. # It is used by several different programs. Common entries for the # various columns includes: # # name The name of the terminal device. # # getty The program to start running on the terminal. Typically a # getty program, as the name implies. Other common entries # include none, when no getty is needed, and xdm to start the # X Window System. # # type The initial terminal type for this port. For hardwired # terminal lines, this will contain the type of terminal used. # For virtual consoles, the correct type is cons25. Other # common values include network for network connections on # pseudo-terminals, dialup for incoming modem ports, and unknown # when the terminal type cannot be predetermined. # # status Must be on or off. If on, init will run the getty program on # the specified port. If the word "secure" appears, this tty # allows root login. # # 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 console none unknown off secure # ttyv0 "/usr/libexec/getty Pc" cons25 on secure # Virtual terminals ttyv1 "/usr/libexec/getty Pc" cons25 on secure ttyv2 "/usr/libexec/getty Pc" cons25 on secure ttyv3 "/usr/X11R6/bin/xdm -nodaemon" xterm on secure # Serial terminals # The 'dialup' keyword identifies dialin lines to login, fingerd etc. ttyd0 "/usr/libexec/getty std.9600" dialup off secure ttyd1 "/usr/libexec/getty V57600" dialup on insecure ttyd2 "/usr/libexec/getty std.9600" dialup off secure ttyd3 "/usr/libexec/getty std.9600" dialup off secure # rest of file omitted /etc/gettytab # $Id: gettytab,v 1.16 1998/09/02 01:34:55 brian Exp $ # from: @(#)gettytab 5.14 (Berkeley) 3/27/91 # # Most of the table entries here are just copies of the old getty table, # it is by no means certain, or even likely, that any of them are optimal # for any purpose whatever. Nor is it likely that more than a couple are # even correct. # # The default gettytab entry, used to set defaults for all other # entries, and in cases where getty is called with no table name. # # cb, ce and ck are desirable on most crt's. The non-crt entries need to # be changed to turn them off (:cb@:ce@:ck@:). # # lc should always be on; it's a remainder of some stone age when there # have been terminals around not being able of handling lower-case # characters. Those terminals aren't supported any longer, but getty is # `smart' about them by default. # # Parity defaults to even, but the Pc entry and all the `std' entries # specify no parity. The different parities are: # (none): same as even except -inpck instead of inpck for login. # ep: getty will use raw mode (cs8 -parenb) (unless rw is set) and # fake parity. login will use even parity (cs7 parenb -parodd). # op: same as ep except odd parity (cs7 parenb parodd) for login. # op overrides ep. # ap: same as ep except -inpck instead of inpck for login. # ap overrides op and ep. # np: 1. don't fake parity in getty. The fake parity garbles # characters on non-terminals (like pccons) that don't # support parity. It would probably better for getty not to # try to fake parity. It could just use cbreak mode so as # not to force cs8 and let the hardware handle the parity. # login has to be rely on the hardware anyway. # 2. set PASS8, giving cs8 -parenb -istrip -inpck. # np:ep: same as np except inpck. # np:op: same as np:ep except for parodd (but parodd is overridden). # np:ap: same as np except istrip. # default:\ :cb:ce:ck:lc:fd#1000:im=\r\n%s/%m (%h) (%t)\r\n\r\n:sp#1200: # Entry for V.42bis Modem (33.6 kbps with maximum of 57600 bps) # Starts at 57600 and cycles down to 9600 bps, then starts over um|V9600|High Speed Modem at 9600,8-bit:\ :nx=V57600:tc=std.9600: un|V19200|High Speed Modem at 19200,8-bit:\ :nx=V9600:tc=std.19200: uo|V38400|High Speed Modem at 38400,8-bit:\ :nx=V19200:tc=std.38400: up|V57600|High Speed Modem at 57600,8-bit:\ :nx=V38400:tc=std.57600: # # Fixed speed entries # # The "std.NNN" names are known to the special case # portselector code in getty, however they can # be assigned to any table desired. # The "NNN-baud" names are known to the special case # autobaud code in getty, and likewise can # be assigned to any table desired (hopefully the same speed). # a|std.110|110-baud:\ :np:nd#1:cd#1:uc:sp#110: b|std.134|134.5-baud:\ :np:nd#1:cd#2:ff#1:td#1:sp#134:ht:nl: 1|std.150|150-baud:\ :np:nd#1:cd#2:td#1:fd#1:sp#150:ht:nl:lm=\E\72\6\6\17login\72 : c|std.300|300-baud:\ :np:nd#1:cd#1:sp#300: d|std.600|600-baud:\ :np:nd#1:cd#1:sp#600: f|std.1200|1200-baud:\ :np:fd#1:sp#1200: 6|std.2400|2400-baud:\ :np:sp#2400: 7|std.4800|4800-baud:\ :np:sp#4800: 2|std.9600|9600-baud:\ :np:sp#9600: g|std.19200|19200-baud:\ :np:sp#19200: std.38400|38400-baud:\ :np:sp#38400: std.57600|57600-baud:\ :np:sp#57600: std.115200|115200-baud:\ :np:sp#115200: std.230400|230400-baud:\ :np:sp#230400: # # Entry specifying explicit device settings. See termios(4) and # /usr/include/termios.h, too. The entry forces the tty into # CLOCAL mode (so no DCD is required), and uses Xon/Xoff flow control. # # cflags: CLOCAL | HUPCL | CREAD | CS8 # oflags: OPOST | ONLCR | OXTABS # iflags: IXOFF | IXON | ICRNL | IGNPAR # lflags: IEXTEN | ICANON | ISIG | ECHOCTL | ECHO | ECHOK | ECHOE | ECHOKE # # The `0' flags don't have input enabled. The `1' flags don't echo. # (Echoing is done inside getty itself.) # local.9600|CLOCAL tty @ 9600 Bd:\ :c0#0x0000c300:c1#0x0000cb00:c2#0x0000cb00:\ :o0#0x00000007:o1#0x00000002:o2#0x00000007:\ :i0#0x00000704:i1#0x00000000:i2#0x00000704:\ :l0#0x000005cf:l1#0x00000000:l2#0x000005cf:\ :sp#9600: # # Dial in rotary tables, speed selection via 'break' # 0|d300|Dial-300:\ :nx=d1200:cd#2:sp#300: d1200|Dial-1200:\ :nx=d150:fd#1:sp#1200: d150|Dial-150:\ :nx=d110:lm@:tc=150-baud: d110|Dial-110:\ :nx=d300:tc=300-baud: # # Fast dialup terminals, 2400/1200/300 rotary (can start either way) # D2400|d2400|Fast-Dial-2400:\ :nx=D1200:tc=2400-baud: 3|D1200|Fast-Dial-1200:\ :nx=D300:tc=1200-baud: 5|D300|Fast-Dial-300:\ :nx=D2400:tc=300-baud: # #telebit (19200) # t19200:\ :nx=t2400:tc=19200-baud: t2400:\ :nx=t1200:tc=2400-baud: t1200:\ :nx=t19200:tc=1200-baud: # #telebit (9600) # t9600:\ :nx=t2400a:tc=9600-baud: t2400a:\ :nx=t1200a:tc=2400-baud: t1200a:\ :nx=t9600:tc=1200-baud: # # Odd special case terminals # -|tty33|asr33|Pity the poor user of this beast:\ :tc=110-baud: 4|Console|Console Decwriter II:\ :nd@:cd@:rw:tc=300-baud: e|Console-1200|Console Decwriter III:\ :fd@:nd@:cd@:rw:tc=1200-baud: i|Interdata console:\ :uc:sp#0: l|lsi chess terminal:\ :sp#300: X|Xwindow|X window system:\ :fd@:nd@:cd@:rw:sp#9600: P|Pc|Pc console:\ :ht:np:sp#115200: # # Wierdo special case for fast crt's with hardcopy devices # 8|T9600|CRT with hardcopy:\ :nx=T300:tc=9600-baud: 9|T300|CRT with hardcopy (300):\ :nx=T9600:tc=300-baud: # # Plugboard, and misc other terminals # plug-9600|Plugboard-9600:\ :pf#1:tc=9600-baud: p|P9600|Plugboard-9600-rotary:\ :pf#1:nx=P300:tc=9600-baud: q|P300|Plugboard-300:\ :pf#1:nx=P1200:tc=300-baud: r|P1200|Plugboard-1200:\ :pf#1:nx=P9600:tc=1200-baud: # # XXXX Port selector # s|DSW|Port Selector:\ :ps:sp#2400: # # Auto-baud speed detect entry for Micom 600. # Special code in getty will switch this out # to one of the NNN-baud entries. # A|Auto-baud:\ :ab:sp#2400:f0#040: /etc/rc.serial #!/bin/sh # $Id: rc.serial,v 1.11 1998/03/13 22:03:03 danny Exp $ # Change some defaults for serial devices. # Standard defaults are: # dtrwait 300 drainwait 0 # 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. ci=$1; shift # call in device identifier co=$1; shift # call out device identifier for i in $* do comcontrol /dev/tty$ci$i dtrwait 300 drainwait 0 stty </dev/ttyi$ci$i -clocal crtscts hupcl 9600 reprint ^R stty </dev/ttyl$ci$i -clocal -crtscts -hupcl 0 stty </dev/cuai$co$i -clocal crtscts hupcl 9600 reprint ^R stty </dev/cual$co$i -clocal -crtscts -hupcl 0 done } maybe() { # Special settings. ci=$1; shift co=$1; shift for i in $* do # Don't use ^R; it breaks bash's ^R when typed ahead. stty </dev/ttyi$ci$i reprint undef stty </dev/cuai$co$i reprint undef # Lock clocal off on dialin device for security. stty </dev/ttyl$ci$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/ttyl$ci$i 300 stty </dev/cual$co$i 300 done } modem() { # Modem that supports CTS and perhaps RTS handshaking. ci=$1; shift co=$1; shift for i in $* do # may depend on modem comcontrol /dev/tty$ci$i dtrwait 100 drainwait 180 # Lock crtscts on. # Speed reasonable for V42bis. stty </dev/ttyi$ci$i crtscts 57600 stty </dev/ttyl$ci$i crtscts stty </dev/cuai$co$i crtscts 57600 stty </dev/cual$co$i crtscts done } mouse() { # Mouse on either callin or callout port. ci=$1; shift co=$1; shift for i in $* do # Lock clocal on, hupcl off. # Standard speed for Microsoft mouse. stty </dev/ttyi$ci$i clocal -hupcl 1200 stty </dev/ttyl$ci$i clocal hupcl stty </dev/cuai$co$i clocal -hupcl 1200 stty </dev/cual$co$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. ci=$1; shift co=$1; shift modem $ci $co $* for i in $* do comcontrol /dev/tty$ci$i dtrwait 0 stty </dev/ttyi$ci$i 115200 stty </dev/cuai$co$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. # $1 is the call in device identifier, $2 is the call out device identifier # and the remainder of the line lists the device numbers. # Initialize assorted 8250-16550 (sio) ports. # maybe d a 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 d a 2 modem d a 1 # terminal d a 0 # Initialize all ports on a Cyclades-8yo. # modem c c 00 01 02 03 04 05 06 07 # Initialize all ports on a Cyclades-16ye. # modem c c 00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f # Initialize all ports on a Digiboard 8. # modem D D 00 01 02 03 04 05 06 07 Thanks, Andy Dr. Andrew B. Wallace Head, Department of Physics Angelo State University 915/942-2242 Voice 915/942-2188 Fax To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3.0.6.32.20000323160510.0079ebb0>