1 # Change some defauls for serial devices.
2 # Standard defaults are:
4 # initial cflag from <sys/ttydefaults.h> = cread cs8 hupcl
5 # initial iflag, lflag and oflag all 0
7 # special chars from <sys/ttydefaults.h>
9 # except for serial consoles the initial iflag, lflag and oflag are from
10 # <sys/ttydefaults.h> and clocal is locked on.
13 # Reset everything changed by the other functions to initial defaults.
16 comcontrol /dev/ttyd$i dtrwait 300
17 stty </dev/ttyid$i -clocal crtscts hupcl 9600 reprint ^R
18 stty </dev/ttyld$i -clocal -crtscts -hupcl 0
19 stty </dev/cuai0$i -clocal crtscts hupcl 9600 reprint ^R
20 stty </dev/cual0$i -clocal -crtscts -hupcl 0
28 # Don't use ^R; it breaks bash's ^R when typed ahead.
29 stty </dev/ttyid$i reprint undef
30 stty </dev/cuai0$i reprint undef
31 # Lock clocal off on dialin device for security.
32 stty </dev/ttyld$i clocal
33 # Lock the speeds to use old binaries that don't support them.
34 # Any legal speed works to lock the initial speed.
35 stty </dev/ttyld$i 300
36 stty </dev/cual0$i 300
41 # Modem that supports CTS and perhaps RTS handshaking.
44 comcontrol /dev/ttyd$i dtrwait 100 # may depend on modem
46 # Speed reasonable for V42bis.
47 stty </dev/ttyid$i crtscts 57600
48 stty </dev/ttyld$i crtscts
49 stty </dev/cuai0$i crtscts 57600
50 stty </dev/cual0$i crtscts
55 # Mouse on either callin or callout port.
58 # Lock clocal on, hupcl off.
59 # Standard speed for Microsoft mouse.
60 stty </dev/ttyid$i clocal -hupcl 1200
61 stty </dev/ttyld$i clocal hupcl
62 stty </dev/cuai0$i clocal -hupcl 1200
63 stty </dev/cual0$i clocal hupcl
68 # Terminal that supports CTS and perhaps RTS handshaking
69 # with the cable or terminal arranged so that DCD is on
70 # at least while the terminal is on.
71 # Also works for bidirectional communications to another pc
72 # provided at most one side runs getty.
73 # Same as modem() except we want a faster speed and no dtrwait.
77 comcontrol /dev/ttyd$i dtrwait 0
78 stty </dev/ttyid$i 115200
79 stty </dev/cuai0$i 115200
83 # Don't use anything from this file unless you have some buggy programs
86 # Edit the functions and the examples to suit your system.
88 # 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