home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #31 / NN_1992_31.iso / spool / comp / protocol / tcpip / ibmpc / 7110 < prev    next >
Encoding:
Internet Message Format  |  1992-12-22  |  2.1 KB

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