2 # $FreeBSD: src/release/picobsd/mfs_tree/etc/rc.serial,v 1.1.2.1 2001/02/14 23:47:02 luigi Exp $
3 # $DragonFly: src/release/picobsd/mfs_tree/etc/Attic/rc.serial,v 1.2 2003/06/17 04:27:20 dillon Exp $
5 # Change some defaults for serial devices.
6 # Standard defaults are:
7 # dtrwait 300 drainwait 0
8 # initial cflag from <sys/ttydefaults.h> = cread cs8 hupcl
9 # initial iflag, lflag and oflag all 0
11 # special chars from <sys/ttydefaults.h>
13 # except for serial consoles the initial iflag, lflag and oflag are from
14 # <sys/ttydefaults.h> and clocal is locked on.
17 # Reset everything changed by the other functions to initial defaults.
19 ci=$1; shift # call in device identifier
20 co=$1; shift # call out device identifier
24 comcontrol /dev/tty$ci$i dtrwait 300 drainwait 0
25 stty </dev/ttyi$ci$i -clocal crtscts hupcl 9600 reprint ^R
26 stty </dev/ttyl$ci$i -clocal -crtscts -hupcl 0
27 stty </dev/cuai$co$i -clocal crtscts hupcl 9600 reprint ^R
28 stty </dev/cual$co$i -clocal -crtscts -hupcl 0
40 # Don't use ^R; it breaks bash's ^R when typed ahead.
41 stty </dev/ttyi$ci$i reprint undef
42 stty </dev/cuai$co$i reprint undef
43 # Lock clocal off on dialin device for security.
44 stty </dev/ttyl$ci$i clocal
45 # Lock the speeds to use old binaries that don't support them.
46 # Any legal speed works to lock the initial speed.
47 stty </dev/ttyl$ci$i 300
48 stty </dev/cual$co$i 300
53 # Modem that supports CTS and perhaps RTS handshaking.
61 comcontrol /dev/tty$ci$i dtrwait 100 drainwait 180
63 # Speed reasonable for V42bis.
64 stty </dev/ttyi$ci$i crtscts 57600
65 stty </dev/ttyl$ci$i crtscts
66 stty </dev/cuai$co$i crtscts 57600
67 stty </dev/cual$co$i crtscts
72 # Mouse on either callin or callout port.
79 # Lock clocal on, hupcl off.
80 # Standard speed for Microsoft mouse.
81 stty </dev/ttyi$ci$i clocal -hupcl 1200
82 stty </dev/ttyl$ci$i clocal hupcl
83 stty </dev/cuai$co$i clocal -hupcl 1200
84 stty </dev/cual$co$i clocal hupcl
89 # Terminal that supports CTS and perhaps RTS handshaking
90 # with the cable or terminal arranged so that DCD is on
91 # at least while the terminal is on.
92 # Also works for bidirectional communications to another pc
93 # provided at most one side runs getty.
94 # Same as modem() except we want a faster speed and no dtrwait.
102 comcontrol /dev/tty$ci$i dtrwait 0
103 stty </dev/ttyi$ci$i 115200
104 stty </dev/cuai$co$i 115200
108 # Don't use anything from this file unless you have some buggy programs
111 # Edit the functions and the examples to suit your system.
112 # $1 is the call in device identifier, $2 is the call out device identifier
113 # and the remainder of the line lists the device numbers.
115 # Initialize assorted 8250-16550 (sio) ports.
116 # 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
121 # Initialize all ports on a Cyclades-8yo.
122 # modem c c 00 01 02 03 04 05 06 07
124 # Initialize all ports on a Cyclades-16ye.
125 # modem c c 00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f
127 # Initialize all ports on a Digiboard 8.
128 # modem D D 00 01 02 03 04 05 06 07