home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!gatech!rpi!ghost.dsi.unimi.it!univ-lyon1.fr!frmop11!psuvm!hdk
- Organization: Penn State University
- Date: Mon, 21 Dec 1992 17:09:12 EST
- From: H. D. Knoble <HDK@psuvm.psu.edu>
- Message-ID: <92356.170912HDK@psuvm.psu.edu>
- Newsgroups: comp.protocols.tcp-ip.ibmpc
- Subject: Re: Switch on your modem !
- Distribution: world
- References: <724838212snx@manor.demon.co.uk>
- Lines: 36
-
- The HANGUP command of MS-Kermit 3.12 (latest release with MSKERMIT.PCH patch
- file) does not properly hang up some modems; I've never used a 9600 bps modem
- it would hang up. Thus what is needed is some code to issue an ATH command to
- the modem. This is possible via a DOS .BAT and companion MS-Kermit "init"
- file; e.g., like one that follows this prose. See DROPIT.INI for three
- possible values of the DOS argument. Note that issuing DROP * will attempt to
- use the current serial settings as MS-Kermit doesn't change these if not asked
- to. Also note that DROPIT.INI may need a SET COMx statement activated if the
- port isn't COM1.
- -------------------------Code follows ----------------------------------
- @Echo off
- REM DROP.BAT
- REM H. D. Knoble, Penn State University Center for Academic Computing
- REM Hang up a 9600 bps modem by issuing the ATH command.
- REM Port defaults to COM1, Speed defaults to 9600.
- kermit -f dropit.ini, do drop %1
-
- ; DROPIT.INI
- ; Companion to DROP.BAT
- ; Attempts to drop the phone line using modem command ATH.
- ; called by issuing DOS commands;
- ; kermit -f dropit.ini, DO DROP [speed] where "speed":
- ; * means do not set speed; use current serial port settings.
- ; nnnnn means issue SET SPEED nnnnn
- ; null means issue SET SPEED 9600.
- ;
- ; Port must be set with SET PORT COMn.
- ; SET COM3 \x3e8 4; May be necessary to define port address and IRQ #.
- ; following checks DOS environment variable PORT (via SET PORT=) for a value.
- if equal {"\$(PORT)"} "" SET PORT COM1; Default port to COM1.
- if not equal {"\$(PORT)"} "" SET PORT \$(PORT)
- :Next
- set take-echo on
- DEF DROP if equal "\%1" "" SET SPEED 9600, -
- if not equal "\%1" "" if not equal "\%1" "*" SET SPEED \%1, -
- clear, output +++, input 3 OK, if success output ath\13, run cls, stop
-