home *** CD-ROM | disk | FTP | other *** search
/ PC World Komputer 1999 March / PCWK3A99.iso / Modem / Comset / COMSET12.DOC < prev    next >
Encoding:
Text File  |  1993-12-17  |  22.8 KB  |  661 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7.  
  8.                   ___________________________________________
  9.                                   C O M S E T
  10.                             Modem / Uart Setup Program
  11.                         Version 12.0..release date 12/20/93
  12.                      from Hank Volpe Copyright 1987 - 1993
  13.                              BBS Phone: 410-256-3631
  14.                            Voice Phone: 410-256-5767
  15.                   ___________________________________________
  16.  
  17.                                   Introduction
  18.  
  19.     Comset is a utility that is designed to setup a communications port
  20.     and a AT (Hayes) Compatible smartmodem. Many modems, especially
  21.     internals, do not have a method to reset the modem when it is
  22.     activated, nor does an adequate method exist to setup the serial port
  23.     for use.
  24.  
  25.     Comset will setup your serial port to any speed from 300 to 115200 bps
  26.     and then check to see if your modem is on-line. If it isn't, Comset
  27.     will perform a hardware reset to "wake" it up. Next a software reset
  28.     is performed by sending the command ATZ. If the reply OK is received,
  29.     you are informed that the modem is fine. If OK is not received, Comset
  30.     will attempt 3 times to reset the modem before informing you of an
  31.     error. If you have an external modem and it is off, Comset will abort
  32.     after setting up the serial port to the desired baud rate.
  33.  
  34.  
  35.  
  36.  
  37.  
  38.  
  39.  
  40.  
  41.  
  42.  
  43.  
  44.  
  45.  
  46.  
  47.  
  48.  
  49.  
  50.  
  51.  
  52.  
  53.  
  54.  
  55.  
  56.  
  57.  
  58.  
  59.  
  60.  
  61.  
  62.  
  63.  
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70.  
  71.  
  72.  
  73.  
  74.  
  75.  
  76.        Comset Version 12.0 Documentation  copyright (c) 1993 by Hank Volpe
  77.                                      Page 2
  78.  
  79.     What's new in Version 12.0 ?
  80.     ---------------------------
  81.     
  82.     Version 12 increases the DTE rate to 115,200 bps. The ability
  83.     to toggle a 16550AFN FIFO buffer on or off has been added to the 
  84.     command line. Also, a routine has been added to trap modems that
  85.     send NULLS, which confuses the C language string search routines.
  86.     Finally, the default routines do not use transmitter driven interrupts,
  87.     instead a polled routine is used. Some earlier uarts cannot handle
  88.     transmitter driven routines. The receive routines (of course) are 
  89.     interrupt driven.   
  90.  
  91.     You can always download the latest version of Comset, plus get user
  92.     support on the Modem Doctor BBS (410-256-3631) 24 hrs a day. All
  93.     users, registered or shareware, are always welcome. Additionally,
  94.     you can find Comset on most national BBS systems.
  95.  
  96.     Comset attempts to answer your communication utility needs with a 
  97.     product that is more flexible and more powerful than simple 
  98.     Port testers or Port speed adjusting programs. With a top speed of 115.2k,
  99.     redirectable output to a file, and errorcodes returned to batch files.
  100.     Comset 12 also contains a new uart driver that works with all types of
  101.     PC-Compatible uart chips.
  102.  
  103.              Some of the features of Comset include the following ;
  104.                       Level 1 options...Shareware Version
  105.  
  106.            ** User Selected baud rates from 300 to 115200 bps.
  107.            ** User Selected Comm port assignments [1 to 4].
  108.            ** User Selected IRQ lines (2-7)
  109.            ** Toggle 16550AFN Buffers ON or OFF
  110.            ** Set 16550AFN trigger levels to 14
  111.            ** Modem Status register testing.
  112.               - Comset tests the registers for DTR/RTS and Carrier Detect
  113.            ** Redirectable output..can be sent to a file for logging.
  114.               or used over any serial link.
  115.            ** RTS/CTS DTR/DSR Handshake testing.
  116.            ** Ability to setup the UART alone for dumb modems or
  117.               other serial devices up to 115.2K baud
  118.            ** "s" switch allows you to swap any comm pointers in memory
  119.            ** "p" switch allows you to see your comm address assignments
  120.            ** Log in of Comm ports 3 & 4 to DOS for use by other programs
  121.               such as high level languages or applications.
  122.            ** Ability to set a uart up and raise control lines without
  123.               the need for an active serial device or modem.
  124.  
  125.            Registered users have access to this special feature;
  126.            ** Ability to send custom Hayes command strings to the modem
  127.              using a simple ASCII text file
  128.  
  129.  
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136.  
  137.  
  138.  
  139.  
  140.  
  141.  
  142.  
  143.  
  144.        Comset Version 12.0 Documentation  copyright (c) 1993 by Hank Volpe
  145.                                      Page 3
  146.  
  147.                                 I. USING COMSET
  148.                                 ----------------
  149.                     The usage syntax for Comset is simple.
  150.                              COMSET [speed] [port] U        or 
  151.                              COMSET [speed] [port]          or
  152.                              COMSET [speed] [port,irq]      or
  153.                              COMSET [speed] [port] ON      or
  154.                              COMSET [speed] [port,irq] ON  or
  155.                              COMSET [speed] [port] U ON    or
  156.                                     COMSET h
  157.                                        or
  158.                                     COMSET i
  159.                                        or
  160.                                     COMSET p
  161.                                        or
  162.                             COMSET s  [port] [port]
  163.  
  164.                   [speed] and [port] are user options
  165.                   [speed] and [port,irq] are also user options
  166.                    u tells Comset to set the UART only
  167.                   ON tells Comset to activate 16550AFN buffers
  168.                      if using a 16550AFN Uart chip.
  169.                    h invokes runtime help for the user
  170.                    i shows you revision and program information
  171.                    p peeks at your comm port memory address assignments
  172.                    s swaps the memory address assignments between the
  173.                      first port you entered and the second.
  174.  
  175.     Comset is easy to use. Typing COMSET from the dos prompt will
  176.     automatically attempt to set up serial port Com1 to 2400 bps and
  177.     attempt to wake up its modem. Selecting a different speed involves
  178.     only adding the speed after the word Comset...ie COMSET 1200 sets
  179.     serial port COM1 to 1200 bps instead of the default 2400. Trailing
  180.     zeros are not necessary, so you could also type COMSET 12 to set up
  181.     serial port COM1 to 1200 bps. If you wish to use a different serial
  182.     port, add that after the speed...ie COMSET 24 2 will set serial port
  183.     Com2 to 2400 bps. If you accidentally enter an invalid baud rate, the
  184.     default of 2400 bps will be used. If you accidentally enter an invalid
  185.     range of comm ports, the default of COM1 will be used. Defaults are
  186.     always used if the user does not supply speed and port. Typing  a U
  187.     after any option instructs Comset to setup the  serial port only and
  188.     not to look for a modem.  This is handy for setting up  serial
  189.     printers or other dumb devices to speeds  higher than 9600 baud.
  190.     Mode.com from dos will do the same, but not at 115200 baud, and not
  191.     on all machines!.
  192.  
  193.     Typing Comset 2400 3,5 will set port 3 using IRQ 5 to 2400 bps. It
  194.     is important to use the comma (,) between the port and the IRQ line.
  195.     Valid IRQ assignments are between 2-7. If you don't include one, Comset
  196.     automatically defaults to PC industry standard selections.
  197.  
  198.  
  199.  
  200.  
  201.  
  202.  
  203.  
  204.  
  205.  
  206.  
  207.  
  208.  
  209.  
  210.  
  211.  
  212.  
  213.        Comset Version 12.0 Documentation  copyright (c) 1993 by Hank Volpe
  214.                                      Page 4
  215.  
  216.     Typing Comset p will display all of the comm port addresses logged
  217.     into Dos. This can be handy when you are trying to configure a serial
  218.     card for proper addresses.
  219.  
  220.     Typing Comset s will swap the address assignments in memory of com1
  221.     and com2. If you entered comset s 1 4, then the address assignments
  222.     will be swapped between com1 and com4 instead of com1 and com2. Any
  223.     valid port from 1 to 4 can be used.
  224.  
  225.     Typing COMSET h will bring up a runtime summary of features and other
  226.     helpful information. Ideally, Comset should be run out of your
  227.     autoexec.bat file when you  first turn on your computer. Internal
  228.     modem users can appreciate the fact that probably 2 or 3 times out of
  229.     a 100 their internal modem does not "wake-up" properly when the
  230.     computer is first turned on, and this can hang-up some communications
  231.     programs. Also, BBS sysops sometimes experience problems with modems
  232.     when stopping the BBS and trying to use the modem to call out.  This
  233.     is why Comset was written!
  234.  
  235.                          II. SERIAL PORT INFORMATION
  236.                          ---------------------------
  237.  
  238.     Comset supports all the industry standard Serial Port address
  239.     assignments for modems.  Almost all PC-modems allow you to use COM1-4,
  240.     however only specific software  can use COM3 or COM4 on most machines.
  241.     Comset will not only use COM3 and COM4 itself, but it will log those
  242.     ports into DOS for use by other programs such as high-level languages
  243.     and applications (something that under normal conditions can't be done
  244.     with an IBM-PC or most clones without special software). Using the new
  245.     "s" feature, you can also swap COM3 to COM1's address for those
  246.     programs that cannot access a COM3 or COM4. Using the "p" feature, you
  247.     can find out what serial port assignments your computer is using.
  248.  
  249.  
  250.                         III ERROR REPORTING INFORMATION
  251.                         -------------------------------
  252.  
  253.     Comset checks your serial port in three distinct steps;
  254.     1) Set the Serial Port computer UART to the desired baud rate and
  255.     raise the DTR and RTS lines. If a serial port is not detected, Comset 
  256.     aborts and displays the message that there is no serial port with that 
  257.     COMM designation your system.
  258.     
  259.     2) Check that DSR and CTS are returning from the modem, if not report 
  260.     an error and stop testing.
  261.         
  262.     3 a)If steps 1 & 2 are successful, wake up the modem by sending the 
  263.     command string "ATZ". If OK is received, report all is  Normal and 
  264.     leave the RTS and DTR lines active.
  265.  
  266.  
  267.  
  268.  
  269.  
  270.  
  271.  
  272.  
  273.  
  274.  
  275.  
  276.  
  277.  
  278.  
  279.  
  280.        Comset Version 12.0 Documentation  copyright (c) 1993 by Hank Volpe
  281.                                      Page 5
  282.         
  283.       b)If the modem did not wake up, issue a more advanced hardware and
  284.     software command string to reset and wake up the modem. Three attempts 
  285.     are made..if it fails, the RTS and DTR lines are turned off. This 
  286.     could happen
  287.     
  288.     if you tell Comset to test a serial port that does not have a 
  289.     compatible modem attached. In that case, a "failure" of this kind 
  290.     would be "normal" for your system.
  291.             
  292.     You can redirect the output of Comset to a file if you wish to 
  293.     maintain a log of each initialization. To do this, just use the 
  294.     command string;
  295.     
  296.                 COMSET [speed] [port] >> comset.log
  297.     
  298.     Speed and port are optional. The >> symbol tells dos to make a file  
  299.     called comset.log and append it each time Comset is run.
  300.  
  301.                         IV Support for 16550AFN Uarts
  302.                         ------------------------------
  303.  
  304.     The new ON feature allows Comset to enable or disable the 16550AFN 
  305.     uart buffers. Some comm programs fail to disable these buffers on
  306.     exit. As a result, DOS or other applications may crash your system
  307.     or refused to use the buffers. The ON switch (as the last thing on
  308.     any command line) enables these buffers and sets the trigger level
  309.     for receive interrupts at 14 characters. OFF (or nothing) disables
  310.     these buffers. When a user enters the ON command, Comset checks to
  311.     see if a 16550AFN is present, and if so, the user is informed that
  312.     this uart has been detected and the buffer trigger level is being set.
  313.     Comset exits with the buffers enabled. Typing OFF or not entering
  314.     the words ON will turn these buffers off.  
  315.     This command can be very powerful for you, because it does test the
  316.     16550AFN's buffers and ability to generate a trigger level interrupt. 
  317.     If you have any doubt about your 16550AFN, Comset can end your worries.
  318.     Registered users, with the custom command files, can interrogate the
  319.     modem over long sequences, verifying the 16550AFN buffers are working
  320.     properly. The :ON command is active in both shareware and registered
  321.     versions.
  322.    
  323.                             V USING ERRORLEVELS
  324.                             --------------------
  325.      Starting with Version 11, all users of Comset can work with the
  326.     error-code reporting feature. Error code reporting simply stated passes
  327.     "result-codes" from Comset to its calling program. This allows you to write 
  328.     some advanced batch-file procedures or to take specific actions.
  329.     This error-code information can be interpreted by Dos Batch files using 
  330.     the ERRORLEVEL function. Under normal conditions, a result code of 0 is 
  331.  
  332.  
  333.  
  334.  
  335.  
  336.  
  337.  
  338.  
  339.  
  340.  
  341.  
  342.  
  343.  
  344.  
  345.  
  346.  
  347.  
  348.        Comset Version 12.0 Documentation  copyright (c) 1993 by Hank Volpe
  349.                                      Page 6
  350.  
  351.     returned to the calling program. If something wrong is detected, an 
  352.     error code of 99 is returned to the calling program. A simple use of 
  353.     this can be to start a communications program if the modem is ok, but 
  354.     if not, default to some other action...an example batch-file program 
  355.     looks like this;
  356.          
  357.         echo off
  358.         comset 24 1
  359.          IF ERRORLEVEL 99 goto stop
  360.         echo passed
  361.         goto exit
  362.         :stop
  363.         echo failed!
  364.         :exit
  365.         
  366.     Other uses are left up to your imagination...you could flash up help 
  367.     screens to the user like "HEY DUMMY...TURN ON THE MODEM!!!" or 
  368.     something similar. Combined with redirecting the output to a logging 
  369.     file, you could trace a history of failures or other actions.
  370.     The registered version of Comset has the ability to send custom setup 
  371.     strings to your modem from a simple text file. To use this feature, 
  372.     all you need to do is the following;
  373.     
  374.          1) Make a file with valid AT commands using edlin or any ASCII
  375.              text editor and name the file Comset.cmd
  376.     
  377.           2) Place this file in the same directory that you are running
  378.              comset out of. If you are running Comset from a path, then
  379.              you must have a Comset.cmd file in the directory you are
  380.              currently in for this feature to work. The reason for this
  381.              is  so  that  you  could have multiple  comset.cmd files
  382.              in different directories for different uses.
  383.    
  384.     When  Comset starts,  it will look for Comset.cmd in  the  current 
  385.     default directory,  and if it finds it,  it will send that command 
  386.     string to the modem instead of the ATZ command. An example of such a 
  387.     command set is the following;
  388.     
  389.         From dos, type edlin comset.cmd
  390.         when edlin starts, type I for insert.
  391.         Next, type AT M0 H1 then return
  392.         Next, type control-Z
  393.         Next, type e and the file will save.
  394.     
  395.     The next time you run comset, it will find the file comset.cmd and 
  396.     tell the modem to shut off the speaker and go off-hook.
  397.  
  398.  
  399.  
  400.  
  401.  
  402.  
  403.  
  404.  
  405.  
  406.  
  407.  
  408.  
  409.  
  410.  
  411.  
  412.  
  413.  
  414.  
  415.  
  416.        Comset Version 12.0 Documentation  copyright (c) 1993 by Hank Volpe
  417.                                      Page 7
  418.     
  419.     Any valid AT command set for your brand of modem can be sent.  The 
  420.     only restriction is that all these commands fit on one line and  the
  421.     first two letters must be AT. 
  422.     
  423.     You  can  also redirect the output of this function to a  file  as 
  424.     explained above. Users of Modems can use this to capture the settings 
  425.     of their modem and save it in text form for future reference.
  426.  
  427.  
  428.                           VI. REGISTRATION INFORMATION
  429.                            --------------------------
  430.     
  431.     You can freely make copies and distribute the shareware version of 
  432.     Comset over BBS systems or  public domain libraries as long as no fee 
  433.     for Comset is charged  (except duplication costs) and as long as 
  434.     Comset.exe is distributed along with this file Comset.doc. These may 
  435.     be archived together for use on a bbs system. Under no circumstances 
  436.     can the registered version of Comset be distributed. Each version 
  437.     displays "shareware" or "registered" when it is run from the dos 
  438.     prompt.
  439.         
  440.     Comset is copyrighted by Hank Volpe and is not public domain software.
  441.     Shareware version users are granted a limited license for its use. No 
  442.     warranties for Comset are stated, expressed or implied.
  443.         
  444.     Shareware authors continually provide computer users with low priced  
  445.     software compared to the traditional retail approach. If you register  
  446.     Comset, you will be able to use all the custom command file feature
  447.     which I think you'll find very handy.
  448.         
  449.     Registration is simple...and price is low. Comset is only $10, which  
  450.     includes the latest version and free maintenance updates. To register, 
  451.     send $10 along with your name and address to;
  452.         
  453.                                   Hank Volpe
  454.                                  PO Box 43214
  455.                                Baltimore MD 21236
  456.     
  457.  
  458.  
  459.  
  460.  
  461.  
  462.  
  463.  
  464.  
  465.  
  466.  
  467.  
  468.  
  469.  
  470.  
  471.  
  472.  
  473.  
  474.  
  475.  
  476.  
  477.  
  478.  
  479.  
  480.  
  481.  
  482.  
  483.  
  484.        Comset Version 12.0 Documentation  copyright (c) 1992 by Hank Volpe
  485.                                      Page 8
  486.     
  487.     
  488.                               VI. ERROR MESSAGES
  489.     
  490.     THERE IS NO COMx IN YOUR SYSTEM -
  491.           Comset was instructed by the user to test a non-existent comm
  492.           port. This could happen automatically if you don't have a COM1
  493.           in your system. If this is the case, use the line
  494.           COMSET [speed] [port] to select your specific needs.
  495.       
  496.     
  497.     MODEM NOT RESPONDING PROPERLY -
  498.           The modem under test did not set up even after 3 extensive
  499.           hardware and software attempts to do so. Either you have a non-
  500.           compatible or non-intelligent modem, or you are using the wrong
  501.           opening baud rate. Comset's defaults are 2400 bps and COM1. If
  502.           you only  have a 1200 or 300 bps modem, use the line
  503.           COMSET [speed] [port] and use a lower speed. Valid speeds are
  504.           300 bps,  1200 bps , 2400 bps [default], 4800 bps, 9600 bps,
  505.           19200 bps, 38400 bps, 57600 and 115200 bps. Trailing zeros are 
  506.           not necessary..ie 576 is 57600 bps. Any other values default
  507.           automatically to 2400 bps.
  508.    
  509.     MODEM APPEARS TO BE OFF OR DISCONNECTED -
  510.          The hardware handshaking pairs RTS/CTS or DTR/DSR are not 
  511.          communicating properly. This should NEVER happen on internal
  512.          modems unless the CTS signal is not enabled. Internal Modems
  513.          usually keep this signal at a logic 1, so if you see this error,
  514.          check your internal modem for proper strapping of the CTS and DSR
  515.          signals.
  516.         
  517.          If you have an external modem,and the power for the modem is on,
  518.          you will see this error message if you do not have the CTS signal
  519.          at a logic 1 or you have a defective or inadequate Serial Cable.
  520.          Most external modems have Dip-switches on the back for setting
  521.          the CTS signal. Normally the CTS follows the Serial Ports RTS and
  522.          the modem  DSR (sometimes called MR) follows the Serial Ports
  523.          DTR.
  524.         
  525.          In the case of an external modem you will see this error message
  526.          every time the modem has not been turned on. This is telling you
  527.          that your serial port hardware is fine, just that your modem is
  528.          off.
  529.  
  530.  
  531.  
  532.  
  533.  
  534.  
  535.  
  536.  
  537.  
  538.  
  539.  
  540.  
  541.  
  542.  
  543.  
  544.  
  545.  
  546.  
  547.  
  548.  
  549.  
  550.  
  551.  
  552.        Comset Version 12.0 Documentation  copyright (c) 1993 by Hank Volpe
  553.                                      Page 9
  554.  
  555.                             VII COMSET PROGRAM HISTORY
  556.                            --------------------------
  557.  
  558.         Version 1 - Simple Assy program fixed at 300 bps. Two versions
  559.                     COM1 and COM2.
  560.  
  561.         Version 2 - Baud rate raised to 1200 bps.
  562.  
  563.         Version 3 - Baud rate raised to 2400 bps.
  564.  
  565.         Version 4 - COM1 / COM2 support in one program.
  566.  
  567.         Version 5 - Major rewrite, added interrupt support, hardware
  568.                     and software testing, COM 1-4 support, Multiple
  569.                     baud rate support, error checking and reporting,
  570.                     and support for high speed modems to 19200 bps.
  571.  
  572.         Version 6 - This version adds the U parameter to allow for testing
  573.                     and setup of dumb modems and other serial devices.
  574.                     The registered version adds the ability to send a
  575.                     custom command string from a file named comset.cmd
  576.                     to the modem in place of the normal ATZ command
  577.  
  578.         Version 7 - This version adds baud rates to 38.4K,improved Uart
  579.                     communications module.
  580.  
  581.         Version 8 - This version adds speeds to 56K baud, improved
  582.                     Uart communications module, addition of the
  583.                     comm port swap and comm address features
  584.  
  585.         Version 9 - Improves speed of routines, adds the ability for
  586.                     uart only setups not to require an active device,
  587.                     changes the top speed description to 57.6k, and
  588.                     adds a test to verify the baud rate register set
  589.                     to the desired baud rate
  590.  
  591.         Version 10- Suppresses extra line feeds sent by some modems,
  592.                     shortens the sign-on banner, changes timing routines
  593.                     that properly read all data from the modem when running
  594.                     custom commands that take a long time to process..ie
  595.                     a long status report sent at 300 baud could take longer
  596.                     than 15 seconds, now the timer is reset to 0 each time
  597.                     a character is received. Includes the new Uart driver
  598.                     module used in Modem Doctor and Zboot.
  599.  
  600.         Version 11- Adds IRQ selection to the command line and allows
  601.                     the shareware version to return errorlevel codes
  602.  
  603.         Version 12- Increases speed to 115,200bps, adds the ability to
  604.                     turn on and off a 16550AFN Uart buffers, fixes a problem 
  605.                     that some modems have in sending NULLS, confusing
  606.  
  607.  
  608.  
  609.  
  610.  
  611.  
  612.  
  613.  
  614.  
  615.  
  616.  
  617.  
  618.  
  619.  
  620.        Comset Version 12.0 Documentation  copyright (c) 1993 by Hank Volpe
  621.                                      Page 10
  622.  
  623.                     the C strstr() and strcmp() routines. Also, a reset
  624.                     timer trigger for the registered version was added
  625.                     to properly dump slow buffers and a new Uart module
  626.                     using 16550AFN support was added.
  627.  
  628.  
  629.  
  630.         current released software version is 12.0
  631.        
  632.  
  633.  
  634.  
  635.  
  636.  
  637.  
  638.  
  639.  
  640.  
  641.  
  642.  
  643.  
  644.  
  645.  
  646.  
  647.  
  648.  
  649.  
  650.  
  651.  
  652.  
  653.  
  654.  
  655.  
  656.  
  657.  
  658.  
  659.  
  660.  
  661.  
  662.  
  663.  
  664.  
  665.  
  666.  
  667.  
  668.  
  669.  
  670.  
  671.  
  672.  
  673.  
  674.  
  675.  
  676.  
  677.  
  678.  
  679.  
  680.  
  681.