Path: utzoo!attcan!uunet!zephyr.ens.tek.com!uw-beaver!sumax!halcyon!ralphs From: ralphs%halcyon.uucp@seattleu.edu Newsgroups: comp.dcom.modems Subject: Disable Call Waiting Keywords: call waiting disable program basic Message-ID: Date: 12 Nov 90 03:56:23 GMT Organization: The 23:00 News Lines: 47 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.