; CNET.SCR ; ; Christine M. Gianone, CUCCA/AcIS, October 1991. ; Modified March 1994 for new access procedures, fdc. ; Unmercifully hacked down to ColumbiaNet only by Walter 3/94 ; ; An MS-DOS Kermit script for easy access to Columbia University's ; ColumbiaNet system. It navigates through ROLMphone and terminal server ; and gets the ColumbiaNet main menu. ; if not < version 311 goto OK echo Sorry, version 3.11 or later of MS-DOS Kermit is required. stop :OK ; Define ERRSTOP macro to issue an error message and stop. ; define errstop echo \%1, hangup, stop ; Communication and script settings ; ; Note: we don't override any settings from the user's MSKERMIT.INI file ; that are not necessary for this script. User's speed, key settings, ; screen colors, etc, remain in effect. ; set input echo off ; Cnet sends something that does 40char mode set parity none ; Don't use parity. set display 7 ; But don't display it either. set flow xon/xoff ; Use Xon/Xoff flow control. set handsh none ; No handshake. set duplex full ; Full duplex, remote echo. set input timeout proceed ; This enables IF SUCCESS and IF FAILURE. set input case ignore ; Don't care about alphabetic case. hangup ; Hang up any current data connection. pause ; Try 3 times to get Rolmphone's attention. ; :LOOP output \13 ; Output a carriage return. :CBX ; Assume DCM with CALL, DISPLAY OR MODIFY? input 6 MODIFY? ; Look for CBX prompt. if failure goto RP244PC ; If not found, go try 244PC. echo \13CBX dialing...\13\10 ; It's the CBX, tell the user. echo Please wait until full ColumbiaNet menu is displayed.\13\10 output CALL CNET\13 ; Dial Cnet input 30 COMPLETE ; Get CALL COMPLETE message if failure errstop - {Sorry, ColumbiaNet does not answer. Please try again later.} goto good ; Got connected, go login :RP244PC ; Let's see if it's a 244PC output \13AT\13 ; Give the Hayes modem AT command input 5 OK ; Look for Hayes OK response. if failure goto RETRY ; Not found, try again. echo 244PC dialing...\13\10 ; It's 244PC, tell the user. echo Please wait until full ColumbiaNet menu is displayed.\13\10 output ATDT[CNET]\13 ; Make a data call to "[CUNIX]". input 30 CONNECT ; Look for modem's confirmation. if success goto GOOD :RETRY if count goto LOOP ; Get here when there is no communication after 3 tries. ; echo echo { Sorry, I can't seem to communicate with your ROLMphone.} echo { Your port is \v(port), your speed is \v(speed).} echo { If these parameters are not correct, use Kermit's SET PORT} echo { and SET SPEED commands to correct them and try again.} echo { Otherwise, please check the data cable between your PC} echo { and the ROLMphone and try again.} echo hangup stop :GOOD ; We got through, one way or the other. ; Send carriage returns for speed recognition. ; Try up to 5 times to get Info terminal server prompt, "CU-Info>". ; set count 5 ; Loop counter. :AGAIN output \13 input 5 vt100) ; Look for prompt. if success goto INFO ; If found, proceed with login process, if count goto again ; otherwise continue the loop. errstop {Failure to get ColumbiaNet terminal prompt, please try again later.} :INFO ; ; Got Cnet terminal type prompt ; output \13 ; Send CR to wake it up input 20 I=Info ; Look for Cnet prompt line output \13 ; A CR to get menu re-displayed. if fail errstop {Failure to get ColumbiaNet menu, please try again later.} connect ; ; If they escaped back, check the carrier detect signal to see if they ; logged out, issue appropriate messages in each case. ; wait 1 CD if succ goto WARN echo ec \201\%9\187 ec \186 \186 ec \186 Your connection to ColumbiaNet is closed. \186 ec \186 Type EXIT (then Enter) to leave Kermit and go back to DOS. \186 ec \186 \186 ec \200\%9\188 echo stop :WARN echo ec \201\%9\187 ec \186 \186 ec \186 Back at PC but your ColumbiaNet connection might still be active. \186 ec \186 Type CONNECT (then press the Enter key) to go back to it. \186 ec \186 Type HANGUP (then Enter) to close your ColumbiaNet session. \186 ec \186 Type EXIT (then Enter) to leave Kermit and go back to DOS. \186 ec \186 \186 ec \200\%9\188 echo stop stop