[comp.dcom.modems] Disable Call Waiting

ralphs%halcyon.uucp@seattleu.edu (11/12/90)

If you get tired of dialing *70 or 1170 or whatever it takes to
disable your call-waiting (if it CAN get disabled in the first
place), feel free to hack on this (*nix users are on your own):

1 '
2 'CW.BAS
5 'This short program solves the problem of call waiting interrupting
6 'a communications session. Just run this before your communcations
7 'program. It remains in effect until you reset your Hayes Smartmodem.
8 '
10 'NOTE: I think I found this on CompuServe quite a while ago.
11 'Submitted by ralphs@halcyon.uucp with absolutely no gurantees.
12 'Keep flames at home.  Check your smoke detector.
13 '
30 COLOR 15,9
31 CLS:LOCATE 12,18
32 PRINT CHR$(7);"Setting Hayes Smartmodem 1200 for Call Waiting"
35 OUT 1020,4:GOSUB 110:OUT 1020,3:GOSUB 110
40 OPEN "COM1:1200,N,8,1,DS" AS #1:GOSUB 110
50 MSG$="ATS10=100"+CHR$(13):GOSUB 100:GOSUB 110
70 CLOSE
71 LOCATE 12,1:PRINT SPACE$(80)
72 LOCATE 12,22:PRINT CHR$(7);"Now execute comm program"
80 SYSTEM
100 FOR X=1 TO LEN(MSG$):PRINT #1,MID$(MSG$,X,1);:NEXT
110 FOR X=1 TO 1500:NEXT
120 RETURN
125 '
130 ' Line 35: Port 1020 (3FC) is the MCR (Modem Control Register). The
131 '          bits are described on page 6-9 of the Hayes Smartmodem
132 '          1200 manual. First CALLWAIT sends a 4, which enables the
133 '          interrupt line drivers, and allows the UART to interrupt
134 '          the controller. If there are any problems with the serial
135 '          port, this command should generate some kind of error.
136 '          OUT 1020,3 will reset the modem and is equivalent to
137 '          power off/power on. This must be held for at least 50 ms.
138 '          This is done using the timing loop at line 110.
139 '
140 ' Line 40: Open the COM1 port for 1200 baud, no parity and 8 bit words
141 '          using buffer #1.
142 '
143 ' Line 50: Sends a command to the modem. The AT is the ATtention code,
144 '          which must precede all modem commands. The S10=100 is
145 '          described on page 6-7 of the manual. It allows the carrier
146 '          signal to momentarily disappear. The S10=100 sets the time
147 '          interval for which the carrier may be lost. This interval
148 '          is adjustable in tenths of a second.

tnixon@hayes.uucp (Toby Nixon) (11/12/90)

In article <os9Hs2w163w@halcyon.uucp>,
ralphs%halcyon.uucp@seattleu.edu writes: 

> If you get tired of dialing *70 or 1170 or whatever it takes to
> disable your call-waiting (if it CAN get disabled in the first
> place), feel free to hack on this (*nix users are on your own):
> 
> [basic program omitted]

The program posted simply sets S10 to 100 (ten seconds).  Most 
modern comm programs allow you to include S-register setting 
commands directly in initialization strings.  Also, most modems now 
allow you to store these values permanently in non-volatile memory 
(&W), so there's no need to set S10 before each call (or even after 
a modem reset).

I must point out that in many telephone systems, the "call waiting 
beep" actually interrupts the signal in both directions on the line. 
Therefore, it is NOT sufficient to set S10 in only one of the 
modems; it must be set in BOTH of the modems.  Not easy to do!!  

Also, the value "100" is extremely too high.  The duration of the 
call waiting interruption is only about 800 milliseconds.  To "ride 
it out", therefore, all you really need to do is be sure that the 
difference between the values in S9 and S10 is at least 8.  Well, 
the default S9 value in Hayes modems is 6, and the default S10 is 
14, which is exactly 8!  So, sometimes the default settings ride out 
a call waiting beep (if the other end doesn't hang up), and 
sometimes they don't.  But you don't need to set S10=100 (10 
seconds); simply setting S10=16 should be sufficient to avoid 
disconnection on a call-waiting beep (if the other end doesn't 
disconnect first).

	-- Toby

-- 
Toby Nixon, Principal Engineer    | Voice   +1-404-449-8791  Telex 151243420
Hayes Microcomputer Products Inc. | Fax     +1-404-447-0178  CIS   70271,404
P.O. Box 105203                   | UUCP uunet!hayes!tnixon  AT&T    !tnixon
Atlanta, Georgia  30348  USA      | Internet       hayes!tnixon@uunet.uu.net