|
|
coherent
modem Technical Information modem
The word _m_o_d_e_m is an abbreviation for ``modulation/demodulation
device''. With the COHERENT system, you can attach a modem to
your computer either to dial out for remote communication, to let
others dial into your COHERENT system, or both. With your modem,
too, you can use COHERENT's UUCP commands to exchange mail and
files with remote sites automatically, and to download news and
files from the USENET.
This article gives a summary of how to connect your modem to your
computer and describe it to the COHERENT system. It also
discusses some problems that may crop up when you attempt to use
your modem.
***** Internal vs. External Modems *****
You can use internal and external modems with COHERENT. An
internal modem is, however, more difficult to diagnose problems
because there are typically no status lights to indicate
operation.
***** Hooking up a Modem *****
A modem must be hooked up to a serial port on your computer. To
plug your modem into the computer, simply take a normal serial-
port cable, one with an RS-232 plug of the appropriate gender at
each end, plug one end into your modem and the other into the
serial port you wish to use. The Lexicon article RRSS-223322
describes the wiring of the RS-232 plug in detail; but if you are
not skilled with a soldering iron, you are well advised simply to
purchase a cable from your local electronics store and be done
with it.
***** Serial Ports *****
The COHERENT system supports up to four serial ports; the devices
for these are named /ddeevv/ccoomm11rr through /ddeevv/ccoomm44rr. If you are not
sure which port you have plugged your modem into, perform the
following test: First, turn on the modem. Then, type the
following command:
echo FOO >/dev/com1l
If the ``TX'' light on the modem blinks, then you know the modem
is plugged into CCOOMM11. If it does not, try the command again for
/ddeevv/ccoomm22ll, and so on through ccoomm44ll until you find the
appropriate port. If no command works, check the wiring on your
cable and make sure that the plugs are securely inserted.
Once you have established which port your modem is plugged into,
links the device /ddeevv/mmooddeemm to it, using the following command:
COHERENT Lexicon Page 1
modem Technical Information modem
ln -f /dev/com?l /dev/modem
where ? gives the number of the port, 1 through 4.
***** Edit /etc/ttys *****
The next step is to edit the file /eettcc/ttttyyss to tell COHERENT how
you want the port handled. You must know (1) whether you want
the port enabled or disabled; (2) the baud rate of the port (as
set by your modem); and (3) the name of the port (which you just
determined).
If a port is enabled, remote users can log into the system,
either via a terminal directly plugged into the port or via a
modem. COHERENT sends a login prompt to every enabled port. The
COHERENT system also restricts permissions on all enabled serial
ports, so that only the superuser rroooott can read and write to the
port. This prevents other users who may be using the system from
accessing the serial port. If a port is disabled, you can dial
out or use a direct-connect UUCP connection via that disabled
port.
To dial out on an enabled port, you must first use the command
ddiissaabbllee to disable the port. When you have finished dialing out,
run the command eennaabbllee to re-enable the port. Before you can use
these commands with a port, the port must first be described in
the file /eettcc/ttttyyss.
See the Lexicon article on ttttyyss for details on how to edit this
file. Note that a modem is a remote device, and must be so
described in /eettcc/ttttyyss, or it will not work correctly.
After you have made your changes, type the command
kill quit 1
to make COHERENT re-read /eettcc/ttttyyss and implement your changes.
***** Remote-Access Password *****
If you intend to let people dial into your computer, you are well
advised to set the remote-access password. This will require
that people who dial in know a special password in addition to
whatever password their personal account may have. To set this
password, log in as the superuser rroooott; then enter the command
COHERENT Lexicon Page 2
modem Technical Information modem
passwd remacc
This will walk you through setting a password for user rreemmaacccc,
which is the remote-access account.
***** Edit /etc/modemcap *****
Next, you must check the file /eettcc/mmooddeemmccaapp and see if that file
holds a description that matches your modem. mmooddeemmccaapp is used by
a number of programs to control access to modems, and this file
comes with descriptions for many commonly used modems. You find,
however, that you must edit an existing entry to match your
modem's features exactly; for example, the existing entry may
assume that you have a Touch-Tone telephone whereas you actually
have a pulse telephone. The Lexicon entry on mmooddeemmccaapp will walk
you through this process. When you have completed editing this
entry, note it down, for you will need to insert it elsewhere.
***** Edit /usr/bin/modeminit *****
Next, check the file /uussrr/bbiinn/mmooddeemmiinniitt. This program is read by
programs that manipulate the modem, to re-initialize it after
use. You must decide how you want the modem to be re-
initialized. Basically, if you wish to have people dial into
your system, you turn on the modem's auto-answer feature; and you
must turn off echoing and the printing of result codes. The
commands to use will vary from modem to modem; see the
documentation that comes with your modem for details. See below
for details on modifying this script.
***** Edit L-devices *****
If you intend to use your modem with UUCP, you must insert an
entry for it into your the file /uussrr/lliibb/uuuuccpp/LL-ddeevviicceess. See the
Lexicon entry LL-ddeevviicceess for details.
***** Modem Maladies *****
The rest of this article discusses problems that have arisen with
remote login via modem, as diagnosed by the technical support
staff of Mark Williams Company.
Difficulty in logging in from a remote site via modem can be the
result of problems in one or more of the following: cabling;
enabling/disabling the port; flaws in the contents of file
/eettcc/ttttyyss; incorrect configuration of the modem; and setting the
port to an incorrect state. See Lexicon articles tteerrmmiinnaall and
UUUUCCPP for additional information. The following paragraphs
discuss the above-named items in detail.
***** RS-232 Cabling *****
When attaching an external modem to your computer, it is
important to use a modem cable that supports ``full modem
COHERENT Lexicon Page 3
modem Technical Information modem
control''. COHERENT relies on modem-control signals when
operating a modem for remote access purposes. When attaching a
terminal directly to a serial port, a ``null modem'' cable must
be used. When attaching a modem, a ``straight through'' cable
must be used. See Lexicon articles RRSS-223322 and tteerrmmiinnaall for
further details on cabling.
***** Enabled vs. Disabled Ports *****
A serial port can be either enabled or disabled for remote
access. Enabling a port allows a user on a remote terminal or
modem to log into your COHERENT system. Disabling a port permits
a user to dial out or use a direct connect UUCP connection via
that disabled port.
If a port is enabled for remote logins and you will use it to
call out, you must use the command ddiissaabbllee to disable the port
before you access the port. The commands uuuuccpp and mmaaiill
automatically disable and re-enable a port.
The port name supplied to an eennaabbllee or ddiissaabbllee command must
_e_x_a_c_t_l_y match the last part of a line in the /eettcc/ttttyyss file (see
below). For example, for the command eennaabbllee ccoomm22pprr to work,
there must be an entry in the file /eettcc/ttttyyss which ends with
ccoomm22pprr.
When a port is enabled, (1) the first character for the port in
file /eettcc/ttttyyss is set to a `1' (one), (2) the permissions for the
port are changed so that only the superuser rroooott can read and
write to the port, preventing other users on the system from
accessing the port while a remote session is in progress, and (c)
a login prompt is sent to the port.
***** /etc/ttys *****
This file should have permissions of 644 (-rw-r--r--) and belong
to owner and group rroooott. Review the Lexicon entry for ttttyyss to
ensure that the format of your version of /eettcc/ttttyyss is correct.
Leaving blanks at the end of a line in /eettcc/ttttyyss usually results
in error messages stating that a device could not be found.
You do not need to edit the initial `0' or `1' in entries in
/eettcc/ttttyyss; this digit is updated by the commands eennaabbllee and
ddiissaabbllee. See the Lexicon entries for eennaabbllee and ddiissaabbllee for more
information.
Another problem can arise when using a variable-speed modem and
specifying the baud rate as `3' in file /eettcc/ttttyyss. The `3'
setting represents a 2400-1200-300 baud variable-speed port. The
problem appears to be that while a modem defaults to 2400 baud,
COHERENT may actually be set at one of the other speeds. The
answer to this probem is to run the command mmooddeemmiinniitt.
COHERENT Lexicon Page 4
modem Technical Information modem
***** Constant Flickering *****
Another problem is a constant flickering of send/receive LEDs and
an unexplained continual access of the hard drive. This occurs
when the port is enabled and the modem is set in echo mode:
COHERENT sends the login prompt to the modem, the modem echoes it
back to COHERENT, COHERENT then thinks the modem is trying to
talk to it and sends the password prompt, and so on _a_d _i_n_f_i_n_i_t_u_m.
To fix this problem, place the modem into no-echo mode, and turn
off the display of result codes. The following section discusses
this in more detail.
***** Modem Configuration *****
A modem that fails to answer an incoming call, hangs up before
locking onto the remote carrier, becomes stuck in a loop echoing
characters sent to it from the computer, or fails to operate at
the expected baud rate probably is configured improperly. To
remedy this situation, send the appropriate control string to the
modem.
We offer some guidelines here for modem settings. Be warned,
however, that modems from different manufacturers usually behave
differently, regardless of claims of Hayes compatibility, and
that you will need to check the manual for your particular modem.
-> Echo should be OFF (usually by setting ``E0'').
-> Result codes should be OFF (usually by setting ``Q1'').
-> Modem status ``DCD'' should follow true carrier detect status,
rather than being always on (usually by setting ``&C1'').
-> Auto answer should be ON (usually obtained by setting register
S0 to a nonzero value equal to the number of rings before
answer).
-> The delay value for ``Wait for Carrier/Dial Tone'' (usually
register S7) should not be too short.
The scripts below show typical initialization for ``Hayes-
compatible'' and Trailblazer modems. They are only examples;
your modem may need something different. Please note that the
commands sslleeeepp and ssttttyy are necessary in the first example so
that the command string will be sent to the modem at 2400 baud;
otherwise, the string is sent at the default port speed, which is
9600 baud.
# initialize 2400-baud Hayes-compatible modem
disable com3r
sleep 3 > /dev/com3l &
stty 2400 > /dev/com3l
echo 'AT E0 Q1 V0 S0=1 &C1 M3' > /dev/com3l
sleep 3
COHERENT Lexicon Page 5
modem Technical Information modem
enable com3r
# initialize 9600 baud internal Trailblazer on com2
/etc/disable com2r
cat > /dev/com2l << EOF
at
at e0 t v0 x3 h0
at s0=1 s7=60 s48=1 s51=252 s52=0 s54=3 s58=2
at
EOF
/etc/enable com2r
You can edit the file /uussrr/bbiinn/mmooddeemmiinniitt to suit your modem. To
ensure that your modem is initialized every time you start
COHERENT, you should add a line saying
/usr/bin/modeminit
to your copy of the file /eettcc/rrcc.
***** See Also *****
mmooddeemmccaapp, RRSS-223322, tteecchhnniiccaall iinnffoorrmmaattiioonn, tteerrmmiinnaall
***** Notes *****
One final bit of hard-won wisdom: once you have something
working, write down what you did, and store it in a place where
you won't lose it. It makes life easier just knowing that you're
looking for a female-to-female cable instead of male-to-female or
male-to-male.
COHERENT Lexicon Page 6
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.