util-linux/term-utils
Sami Kerola 98e2d4deb3 wall: remove global variables and support TMPDIR
The TMPDIR environment is preferred over _PATH_TMP in which a
file is created that is ultimately sent to terminals. This patch
will also fix compiler warnings and removes magical numbers,
which has not explanation.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
Signed-off-by: Karel Zak <kzak@redhat.com>
2011-04-12 11:09:42 +02:00
..
.gitignore build-sys: add term-utils/.gitignore 2011-03-02 14:29:34 +01:00
Makefile.am build-sys: fix distcheck for term-utils 2011-04-04 10:53:07 +02:00
README.modems-with-agetty build-sys: move agetty to term-utils 2011-03-02 13:57:00 +01:00
agetty.8 build-sys: move agetty to term-utils 2011-03-02 13:57:00 +01:00
agetty.c build-sys: move agetty to term-utils 2011-03-02 13:57:00 +01:00
mesg.1 build-sys: move mesg to term-utils/ 2011-03-02 14:18:31 +01:00
mesg.c build-sys: move mesg to term-utils/ 2011-03-02 14:18:31 +01:00
reset build-sys: move reset to term-utils/ 2011-03-02 14:08:30 +01:00
reset.1 build-sys: move reset to term-utils/ 2011-03-02 14:08:30 +01:00
reset.033c build-sys: move reset to term-utils/ 2011-03-02 14:08:30 +01:00
script.1 build-sys: move script and scriptreplay to term-utils/ 2011-03-02 14:06:23 +01:00
script.c move struct option to .rodata 2011-03-03 15:00:30 +01:00
scriptreplay.1 build-sys: move script and scriptreplay to term-utils/ 2011-03-02 14:06:23 +01:00
scriptreplay.c build-sys: move script and scriptreplay to term-utils/ 2011-03-02 14:06:23 +01:00
setterm.1 setterm: add note about long dump file paths to man page 2011-04-06 11:20:48 +02:00
setterm.c setterm: use xmalloc() 2011-04-06 11:24:23 +02:00
ttymsg.c build-sys: move wall to term-utils/ 2011-03-02 14:20:33 +01:00
ttymsg.h build-sys: move wall to term-utils/ 2011-03-02 14:20:33 +01:00
wall.1 build-sys: move wall to term-utils/ 2011-03-02 14:20:33 +01:00
wall.c wall: remove global variables and support TMPDIR 2011-04-12 11:09:42 +02:00

README.modems-with-agetty

25/10/95 Peter Orbaek <poe@daimi.aau.dk>

Some notes for using agetty with modems

Using a comms program to initialize the modem
---------------------------------------------

* Use kermit or minicom to initialize the modem to

	- be entirely quiet.
	- don't do local echo in command mode.
	- turn on DCD (carrier detect) only when there is a connection going.
	- enable auto-answer.
	- keep a constant computer/modem bitrate at all times.
	- optionally save this setup as the modem startup configuration.

* Run agetty on the appropriate ttySn port with the arguments:
	* -w to wait for a CR or LF before writing the /etc/issue message
	* computer/modem bitrate
	* the tty name.

Example from my modem setup, an old 2400 bps SupraModem using Hayes standard
AT commands.

Initialize modem using kermit with the commands

	AT E0 Q1 &D2 &C1 S0=1 &W0

to
	- turn off local echo from modem when in command mode (E0).
	- disable all result codes from modem (Q1).
	- make an on/off transition on the DTR line make the modem
	  disconnect and go into command mode (&D2).
	- make the computer/modem DCD line track the modem/modem
	  carrier detect signal, i.e. no connection means no
	  carrier detect signal to the computer (&C1).
	- enable auto-answer after the first ring (S0=1).
	- store the configuration as the start configuration (&W0).

The commands on your modem to achieve the same setup may vary, especially
the &D2 and &C1 commands may not be entirely standard.

Exit kermit/minicom.

Put the command 

	/sbin/agetty -w 2400 ttyS1

in the command field of the appropriate line in /etc/inittab to start
agetty on /dev/ttyS1 with a 2400 bps speed between modem and computer.

Initializing the modem with agetty
----------------------------------

Use the agetty -I command line option to specify a modem init string, like
for the same setup as above, use the following agetty command in your
/etc/inittab.

	/sbin/agetty -w -I 'ATE0Q1&D2&C1S0=1\015' 2400 ttyS1

The final \015 is an octal coding of the carriage return character
ending the command string.

If you're using simpleinit (part of this package) instead of the SYSV 
compatible init (you're most likely using the SYSV one!) then you must
remove the single quotes from the command line above.

Note that the &W0 command was not used here since the modem will be 
initialized each time agetty starts.

With a V.34 (28.8 kbps) modem try starting with a command like:

	/sbin/agetty -w -I 'ATE0Q1&D2&C1S0=1\015' 115200 ttyS1

Note that agetty supports the higher (>9600 bps) serial speeds
directly, there's no need to use setserial to use the higher speeds.