1
25/10/95 Peter Orbaek <poe@daimi.aau.dk>
3
Some notes for using agetty with modems
5
Using a comms program to initialize the modem
6
---------------------------------------------
8
* Use kermit or minicom to initialize the modem to
11
- don't do local echo in command mode.
12
- turn on DCD (carrier detect) only when there is a connection going.
14
- keep a constant computer/modem bitrate at all times.
15
- optionally save this setup as the modem startup configuration.
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
22
Example from my modem setup, an old 2400 bps SupraModem using Hayes standard
25
Initialize modem using kermit with the commands
27
AT E0 Q1 &D2 &C1 S0=1 &W0
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).
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.
47
/sbin/agetty -w 2400 ttyS1
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.
52
Initializing the modem with agetty
53
----------------------------------
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
59
/sbin/agetty -w -I 'ATE0Q1&D2&C1S0=1\015' 2400 ttyS1
61
The final \015 is an octal coding of the carriage return character
62
ending the command string.
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.
68
Note that the &W0 command was not used here since the modem will be
69
initialized each time agetty starts.
71
With a V.34 (28.8 kbps) modem try starting with a command like:
73
/sbin/agetty -w -I 'ATE0Q1&D2&C1S0=1\015' 115200 ttyS1
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.