Upload Tizen:Base source
[framework/base/util-linux-ng.git] / login-utils / README.modems-with-agetty
1 25/10/95 Peter Orbaek <poe@daimi.aau.dk>
2
3 Some notes for using agetty with modems
4
5 Using a comms program to initialize the modem
6 ---------------------------------------------
7
8 * Use kermit or minicom to initialize the modem to
9
10         - be entirely quiet.
11         - don't do local echo in command mode.
12         - turn on DCD (carrier detect) only when there is a connection going.
13         - enable auto-answer.
14         - keep a constant computer/modem bitrate at all times.
15         - optionally save this setup as the modem startup configuration.
16
17 * Run agetty on the appropriate ttySn port with the arguments:
18         * -w to wait for a CR or LF before writing the /etc/issue message
19         * computer/modem bitrate
20         * the tty name.
21
22 Example from my modem setup, an old 2400 bps SupraModem using Hayes standard
23 AT commands.
24
25 Initialize modem using kermit with the commands
26
27         AT E0 Q1 &D2 &C1 S0=1 &W0
28
29 to
30         - turn off local echo from modem when in command mode (E0).
31         - disable all result codes from modem (Q1).
32         - make an on/off transition on the DTR line make the modem
33           disconnect and go into command mode (&D2).
34         - make the computer/modem DCD line track the modem/modem
35           carrier detect signal, i.e. no connection means no
36           carrier detect signal to the computer (&C1).
37         - enable auto-answer after the first ring (S0=1).
38         - store the configuration as the start configuration (&W0).
39
40 The commands on your modem to achieve the same setup may vary, especially
41 the &D2 and &C1 commands may not be entirely standard.
42
43 Exit kermit/minicom.
44
45 Put the command 
46
47         /sbin/agetty -w 2400 ttyS1
48
49 in the command field of the appropriate line in /etc/inittab to start
50 agetty on /dev/ttyS1 with a 2400 bps speed between modem and computer.
51
52 Initializing the modem with agetty
53 ----------------------------------
54
55 Use the agetty -I command line option to specify a modem init string, like
56 for the same setup as above, use the following agetty command in your
57 /etc/inittab.
58
59         /sbin/agetty -w -I 'ATE0Q1&D2&C1S0=1\015' 2400 ttyS1
60
61 The final \015 is an octal coding of the carriage return character
62 ending the command string.
63
64 If you're using simpleinit (part of this package) instead of the SYSV 
65 compatible init (you're most likely using the SYSV one!) then you must
66 remove the single quotes from the command line above.
67
68 Note that the &W0 command was not used here since the modem will be 
69 initialized each time agetty starts.
70
71 With a V.34 (28.8 kbps) modem try starting with a command like:
72
73         /sbin/agetty -w -I 'ATE0Q1&D2&C1S0=1\015' 115200 ttyS1
74
75 Note that agetty supports the higher (>9600 bps) serial speeds
76 directly, there's no need to use setserial to use the higher speeds.