home *** CD-ROM | disk | FTP | other *** search
/ BUG 12 / BUGCD1998_03.ISO / internet / arachne / arachne.exe / COMTOOL.TXT < prev    next >
Text File  |  1997-05-01  |  5KB  |  126 lines

  1.   Copyright (c) 1994 by K.H. Weiss  All rights reserved. Revision 3/9/94
  2.  
  3.   Written by:
  4.       K.H. Weiss           Internet: <khweis1@mvmhp.ciw.uni-karlsruhe.de>
  5.       Eulenweg 2           Phone   : (49)-721-608-2418
  6.       76536 Weingarten               (49)-7244-1792  
  7.       Germany
  8.  
  9.                            comtool
  10.                            -------
  11. This is a new version of my comtool program. This version has 
  12. hardwarehandshake built in. The local buffer is increased
  13. to 1kB now. This fixed the problems with lost characters
  14. when using 57600bps or 115.200bps under windows. I added a
  15. new command wich allows you to enable/disable the fifo if
  16. you have a serial port with a 16550 uart (^Fn)
  17.  
  18. I wrote 'comtool' because I needed a small program for testing and
  19. commanding my serial ports and my modem. I use it for example to clear
  20. the uart, set the baudrate and the control-lines of my modem or send some
  21. 'AT'- command sequences with it. You can even use it as a simple terminal
  22. programm. (hint: install an ANSI-driver, nnansi is a good one).
  23.  
  24. You may invoke comtool either by defining portadress and hardware interrupt
  25. or by writing only the number of comport (using a 'standard'-port)
  26.  
  27. comtool <Port-address> <irq> <Commands> or
  28. comtool <number_of_ComPort> <Commands>
  29.  
  30. Each command begins with a 'caret' like this one ^. If there is no caret,
  31. the following text will be send 'as is'.
  32.  
  33. Some Commands:
  34. ^fn    Enable/disable Fifo (if you have a 16550 uart). The hexadecimal
  35.        value n is written to the FCR (baseaddress + 2). 
  36.        n=0   disable fifo
  37.        n=1   enable fifo, triggerlevel is 1
  38.        n=41               triggerlevel is 4
  39.        n=81               triggerlevel is 8
  40.        n=c1               triggerlevel is 14
  41. ^tn    wait n/10 seconds
  42. ^cr    send cr-character
  43. ^lf    send lf-character
  44. ^sp    send space-character
  45. ^^     send 'caret'
  46. ^d1    set dtr on
  47. ^d0    set dtr off
  48. ^h     hangup
  49. ^bn    set baudrate, n=0 115200
  50.                      n=1 57600
  51.                      n=2 38400
  52.                      n=3 19200
  53.                      n=4 9600
  54.                      n=5 4800
  55.                      n=6 2400 
  56.                      n=7 1200
  57. ^kn    send break-character, duration is n/10 seconds
  58. ^CDn   wait n/10 seconds for carrier-detect-signal. Set errorlevel 8 if
  59.        time over or user breaked, otherwise set errorlevel to 4
  60. ^wn string1 string2 string3
  61.        wait n/10 seconds for string1 (or 2 or 3), set the errorlevel
  62.        to 1, 2 or 3 if found or 8 if user breaked or time was over
  63. ^0n    send character with asci-value n. n is a hexadecimal expression < 256
  64.        
  65. Special keys:
  66. Alt-H  Hangup the modem (may not work on all modems)
  67. Alt-E  Exit comtool (may not work with all keyboards)
  68. Ctrl-Break (or Ctrl-C) Breaks comtool (if Alt-E does'nt work)
  69.  
  70. new in comtool:
  71. Alt-S Stops/Resumes transfer of data. The RTS handshakesignal is toggled.
  72.        (The modem must be programmed for hardwarehandshake of course)
  73.  
  74. Don't use the '<' - characters on commandline, because this is
  75. used for redirection. That means: you can create a comandfile with
  76. one or more comandlines in it and redirect this to comlog with '< cmdfile'
  77. on the commandline.
  78.  
  79. If the last charcter on the commandline is NOT a caret, then you are in the
  80. terminal-mode. You can type AT-sequences, connect to a site with 'atdt ...'
  81. or do whatever you want. You leave this mode with Alt-E and if this doesn't
  82. work (a keyboard-problem, one day I'll fix it ;-), then try Ctrl-C or
  83. Ctrl-Break. If the last Character was a caret, then the programm returns to
  84. DOS automatically. You can recall this programm whenever you want:
  85. All Interrupts and the uart-state are restored carefully. You may shellout
  86. from an other communication-application, start comlog, do something with it
  87. and return to your application without any effect on your application.
  88. It work's even with windows ...
  89.  
  90. Errorlevel
  91. ----------
  92. The bit relevant errorlevel delivered by 'COMTOOL', means:
  93.  
  94. 8          comtool breaked (ctrl-c, alt-e...)
  95. 4          carrier detected by the ^CD- command
  96. 1,2 or 3   one of three strings in datastream detected (^W -command)
  97.  
  98. example for an autodial batch (comport 1 used):
  99.  
  100. @echo off
  101. :rep
  102. COMTOOL 1 ^B2 +++ ^T6 atZ ^CR atdp072441792 ^CR ^W600 CONNECT BUSY NO^
  103. if errorlevel 8 goto ende
  104. if errorlevel 3 goto ende
  105. if errorlevel 2 goto rep
  106. if errorlevel 1 goto termi
  107. goto rep
  108. :termi
  109. COMTOOL 1
  110. :ende
  111. COMTOOL ^H ^
  112.  
  113. ------------------------------------------------------------------------
  114.  
  115.   **********************************************************************
  116.   *  This program executable, help file, and related text files may be *
  117.   *  distributed freely and used without fee by any individual for     *
  118.   *  non-commercial use. This version of COMTOOL may  NOT be           *
  119.   *       distributed as part of any commercial package.               *
  120.   *                                                                    *
  121.   *           USE THIS SOFTWARE AT YOUR OWN RISK                       *
  122.   **********************************************************************
  123.  
  124. Report bugs and comments to             khweis1@mvmhp.ciw.uni-karlsruhe.de
  125. --------------------------------------------------------------------------
  126.