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