Hayes modem for 3B2
Ron Heiby
heiby at mcdchg.UUCP
Sat Feb 27 10:27:30 AEST 1988
Here's what works for me, as well as an old message on how another
intrepid soul conquered the problem. Ron.
-----
Here's the part of the output from the &V command on my Hayes 2400
external modem. You don't need the phone numbers portion, and this
method doesn't make use of stored profile 1.
I use this modem for bi-directional communication on my Motorola VME
Delta computer system, running System V/68 Release 3. Here's what I
changed from factory defaults.
L1 - low volume on speaker (not important to operation)
M0 - speaker turned off (not important to operation)
Q1 - don't send result codes (important)
&D3 - reset on on-to-off transition of DTR (important)
S0=1 - auto answer on first ring (important)
After making these settings, save them in stored profile 0, using the
&W0 command. Now, when you want to dial out, one of the first things
you do in your dialer script is to send the Q0 command to tell the
modem to give you result indications (like OK and CONNECT). You can
then place your call and converse normally. When your uucp or cu is
finished, it will close the port, causing DTR to drop for a brief time.
When this happens, the modem will reset. Since &Y0 is set, stored
profile 0 will be restored, resetting Q1 so the modem will keep quiet
when an incoming call happens.
The only really unfortunate part of this whole thing is that Hayes
managed to decide that if you were doing this nifty resetting on the
DTR transition, you shouldn't be able to disable the modem by keeping
DTR turned off. So, if you take your system down to single user or
even turn it off, the modem will still answer the phone.
at&v
ACTIVE PROFILE:
B1 E1 L1 M0 Q1 V1 X4 Y0 &C0 &D3 &G0 &J0 &L0 &P0 &Q0 &R0 &S0 &X0 &Y0
S00:001 S01:000 S02:043 S03:013 S04:010 S05:008 S06:002 S07:030
S08:002 S09:006 S10:014 S12:050 S14:2EH S16:00H S18:000 S21:18H
S22:71H S23:17H S25:005 S26:001 S27:40H
STORED PROFILE 0:
B1 E1 L1 M0 Q1 V1 X4 Y0 &C0 &D3 &G0 &J0 &L0 &P0 &Q0 &R0 &S0 &X0
S00:001 S14:2EH S18:000 S21:18H S22:71H S23:17H S25:005 S26:001
S27:40H
Following is an article posted on Usenet concerning the use of the
Hayes 2400 on an AT&T UNIX PC. This may provide further insight
into the proper configuration of UUCP with this modem, although
some of what is needed on the AT&T machine is not required on the
VME Delta system.
----------
From: gary at ethos.UUCP (Gary J. Smith)
Newsgroups: unix-pc.uucp
Subject: External Modems on the Unix-pc
Message-ID: <1280 at ethos.UUCP>
Date: 3 May 87 14:35:44 GMT
Organization: Humanities Forum at ethos, Durham, NC
Lines: 95
If you are interested in adding an external modem to your
unix-pc, then you might be interested in my experiences with the
Hayes 2400 Smartmodem and the U.S. Robotics Courier 2400.
As you are probably aware, it is difficult to have an external
modem function for both incoming and outgoing calls. At the very
least, you must be running the HoneyDanber uucp package (with
uugetty) or some other similar getty. In order to use a
smartmodem, you have to have some means to keep the result codes
of the modem from initiating a login sequence. The HDB uugetty
can be invoked with a -r flag which means that a carriage return
is required before the login process begins.
Even so, the smartmodem still seems to wreak havoc with the
system if result codes are enabled. While using the USR Courier
2400 modem, I found it necessary to use 2 modems connected to the
same phone line, but connected to 2 different tty ports. This
allowed me to set up one modem as an outgoing one (result codes
enabled for auto-dialing via a chat script in
/usr/lib/uucp/Dialers) and the other as incoming (result
codes disabled). Although this worked, it was a little
inefficient.
The Hayes 2400 Smartmodem works much better and can be used as
one modem for both incoming and outgoing calls. The theory
behind this is very nice: the Hayes has a nonvolatile memory
where one can store default settings. You can change these
settings from the command state (various AT commands), but you
can arrange for the modem to revert back to its default state
when DTR drops after the call is complete. The trick is to have
the modem set in quiet mode (no result codes) in its default,
auto-answer state. In the Dialers chat script, turn the result
codes back on. When the outgoing call is complete, DTR drops and
the default state (no result codes) is resumed.
Here are the specifics. Your nonvolatile memory should be set
as follows:
AT E Q1 L1 &C &D3 S0=1 # E: inhibit command echo.
# Q1: no result codes.
# L1: low speaker volume :-)
# &C1: DCD forced on (this is NECESSARY!)
# &D3: modem assumes initialization.
state with ON to OFF state
of DTR.
# S0=1: Auto-answer on first ring.
Be sure that your tty port is mentioned in your Devices file:
ACU tty000 - 1200 hayes24 \T
ACU tty000 - 2400 hayes24 \T
Then add this entry to your /usr/lib/uucp/Dialers file:
hayes24 =W-, "" \dATQ0V1X4S0=0\r\c "" \eATDT\T\r\c CONNECT
This chat script enables result codes (long form) and disables
the aut-answer mode. Once the call is complete and DTR dropped,
the modem reverts to the initialization state.
In order to make the modem cycle to the correct speed for
incoming calls, I added new entries to the /etc/gettydefs file
(let the old gettydefs entries remain, just add these at the end
of the file):
-------------
U300# B300 CLOCAL BRKINT HUPCL IGNPAR ISTRIP IXON IXOFF ECHO OPOST ONLCR # BRKINT ISTRIP ICRNL IXON HUPCL OPOST ONLCR B300 CS8 CREAD ISIG ICANON ECHO ECHOE ECHOK TAB3 #\nlogin: #U2400
U1200# B1200 CLOCAL BRKINT HUPCL IGNPAR ISTRIP IXON IXOFF ECHO OPOST ONLCR # BRKINT ISTRIP ICRNL IXON HUPCL OPOST ONLCR B1200 CS8 CREAD ISIG ICANON ECHO ECHOE ECHOK TAB3 #\nlogin: #U300
U2400# B2400 CLOCAL BRKINT HUPCL IGNPAR ISTRIP IXON IXOFF ECHO OPOST ONLCR # BRKINT ISTRIP ICRNL IXON HUPCL OPOST ONLCR B2400 CS8 CREAD ISIG ICANON ECHO ECHOE ECHOK TAB3 #\nlogin: #U1200
--------------
My added line in /etc/inittab looks like this:
000:2:respawn:/usr/lib/uucp/uugetty -r -t60 tty000 U2400
So, what happens is that the modem answers at 2400 baud (U2400),
and if that speed is incorrect, it cycles down to 1200 baud
(U1200), and so on.
The moral to this story is that if you are looking to buy an
external 2400 baud modem, spend the extra money for the Hayes [or
operate a bulletin board system and get the modem directly from
Hayes for $325!].
--
Gary J. Smith {ihnp4,mcnc,duke}!ethos!gary 919/493-9575
5802 Garrett, Durham, North Carolina 27707
--
Ron Heiby, heiby at mcdchg.UUCP Moderator: comp.newprod & comp.unix
"Intel architectures build character."
More information about the Comp.unix.questions
mailing list