home *** CD-ROM | disk | FTP | other *** search
- ___________________________________________
- C O M S E T
- Modem / Uart Setup Program
- Version 9.0..release date 4/5/92
- from Hank Volpe Copyright 1987,1988,1989,1990,1991,1992
- BBS Phone: 410-256-3631
- Voice Phone: 410-256-5767
- ___________________________________________
-
- Introduction
-
- Comset is a utility that is designed to setup a communications port
- and a AT (Hayes) Compatible smartmodem. Many modems, especially
- internals, do not have a method to reset the modem when it is
- activated, nor does an adequate method exist to setup the serial port
- for use.
-
- Comset will setup your serial port to any speed from 300 to 56000 bps
- and then check to see if your modem is on-line. If it isn't, Comset
- will perform a hardware reset to "wake" it up. Next a software reset
- is performed by sending the command ATZ. If the reply OK is received,
- you are informed that the modem is fine. If OK is not received, Comset
- will attempt 3 times to reset the modem before informing you of an
- error. If you have an external modem and it is off, Comset will abort
- after setting up the serial port to the desired baud rate.
-
-
-
- Comset Version 9.0 Documentation copyright (c) 1992 by Hank Volpe
- Page 2
-
- What's new in Version 9.0 ?
- ---------------------------
-
- You can always download the latest version of Comset, plus get user
- support on the Modem Doctor BBS (410-256-3631) 24 hrs a day. All
- users, registered or shareware, are always welcome. Additionally,
- you can find Comset on most national BBS systems.
-
- As with most shareware products, comset continues to evolve due to good
- feedback from users like yourself. The major improvements in Version 9
- are in speed and code size. Modem setups are faster, and Uart only
- setups happen without a visible delay. Also the Uart only setup mode
- allows you to raise control lines DTR and RTS without the need for
- an active modem or serial device. This could be a help to those
- looking for serial cable problems, or setting up devices like serial
- printers. Also, A new test was added to confirm that the baud rate
- register actually set to the desired baud rate. It's one thing to tell
- a chip to set, another that it does!
-
- Finally, the top speed is now 57.6k. Acutally it always was,
- but National Semiconductor, the makers of the 16450,16550,and 16550AFN
- chips refer to this speed as 56000. Well, so did I. Technically, the
- baud clock on your serial port could have a 2.86% error at 56000, which
- means if it was a positive error, your port speed would be 57600 baud.
- Remember though, it could also be a minus error. This is why I and
- National Semiconductor followed the conservative name approach and
- picked 56000...but since no one else did, and to avoid confusion,
- Comset 9 adopts the new nomenclature.
-
-
- Some of the features of Comset include the following ;
- Level 1 options...Shareware Version
-
- ** User Selected baud rates from 300 to 57600 bps.
- ** User Selected Comm port assignments [1 to 4].
- ** Modem Status register testing.
- - Comset tests the registers for DTR/RTS and Carrier Detect
- ** Redirectable output..can be sent to a file for logging.
- or used over any serial link.
- ** RTS/CTS DTR/DSR Handshake testing.
- ** Ability to setup the UART alone for dumb modems or
- other serial devices up to 57.6K baud
- ** New "s" switch allows you to swap any comm pointers in memory
- ** New "p" switch allows you to see your comm address assignments
- ** Log in of Comm ports 3 & 4 to DOS for use by other programs
- such as high level languages or applications.
- ** Ability to set a uart up and raise control lines without
- the need for an active serial device or modem.
-
- Registered users have access to these special features;
- ** Batch file parameter passing and error reporting.
- ** Ability to send custom Hayes command strings to the modem
- using a simple ASCII text file
-
- Comset Version 9.0 Documentation copyright (c) 1992 by Hank Volpe
- Page 3
-
- I. USING COMSET
- ----------------
-
- The usage syntax for Comset is simple.
-
- COMSET [speed] [port] U
- or
- COMSET [speed] [port]
- or
- COMSET h
- or
- COMSET i
- or
- COMSET p
- or
- COMSET s [port] [port]
-
- [speed] and [port] are user options
- u tells Comset to set the UART only
- h invokes runtime help for the user
- i shows you revision and program information
- p peeks at your comm port memory address assignments
- s swaps the memory address assignments between the
- first port you entered and the second.
-
- Comset is easy to use. Typing COMSET from the dos prompt will
- automatically attempt to set up serial port Com1 to 2400 bps and
- attempt to wake up its modem. Selecting a different speed involves
- only adding the speed after the word Comset...ie COMSET 1200 sets
- serial port COM1 to 1200 bps instead of the default 2400. Trailing
- zeros are not necessary, so you could also type COMSET 12 to set up
- serial port COM1 to 1200 bps. If you wish to use a different serial
- port, add that after the speed...ie COMSET 24 2 will set serial port
- Com2 to 2400 bps. If you accidentally enter an invalid baud rate, the
- default of 2400 bps will be used. If you accidentally enter an invalid
- range of comm ports, the default of COM1 will be used. Defaults are
- always used if the user does not supply speed and port. Typing a U
- after any option instructs Comset to setup the serial port only and
- not to look for a modem. This is handy for setting up serial
- printers or other dumb devices to speeds higher than 9600 baud.
- Mode.com from dos will do the same, but not at 57600 baud, and not
- on all machines!.
-
- Typing Comset p will display all of the comm port addresses logged
- into Dos. This can be handy when you are trying to configure a serial
- card for proper addresses.
-
- Typing Comset s will swap the address assignments in memory of com1
- and com2. If you entered comset s 1 4, then the address assignments
- will be swapped between com1 and com4 instead of com1 and com2. Any
- valid port from 1 to 4 can be used.
-
-
- Comset Version 9.0 Documentation copyright (c) 1992 by Hank Volpe
- Page 4
-
-
- Typing COMSET h will bring up a runtime summary of features and other
- helpful information. Ideally, Comset should be run out of your
- autoexec.bat file when you first turn on your computer. Internal
- modem users can appreciate the fact that probably 2 or 3 times out of
- a 100 their internal modem does not "wake-up" properly when the
- computer is first turned on, and this can hang-up some communications
- programs. Also, BBS sysops sometimes experience problems with modems
- when stopping the BBS and trying to use the modem to call out. This
- is why Comset was written!
-
- II. SERIAL PORT INFORMATION
- ---------------------------
-
- Comset supports all the industry standard Serial Port address
- assignments for modems. Almost all PC-modems allow you to use COM1-4,
- however only specific software can use COM3 or COM4 on most machines.
- Comset will not only use COM3 and COM4 itself, but it will log those
- ports into DOS for use by other programs such as high-level languages
- and applications (something that under normal conditions can't be done
- with an IBM-PC or most clones without special software). Using the new
- "s" feature, you can also swap COM3 to COM1's address for those
- programs that cannot access a COM3 or COM4. Using the "p" feature, you
- can find out what serial port assignments your computer is using.
-
-
- III ERROR REPORTING INFORMATION
- -------------------------------
-
- Comset checks your serial port in three distinct steps;
- 1) Set the Serial Port computer UART to the desired baud rate and
- raise the DTR and RTS lines. If a serial port is not detected, Comset
- aborts and displays the message that there is no serial port with that
- COMM designation your system.
-
- 2) Check that DSR and CTS are returning from the modem, if not report
- an error and stop testing.
-
- 3 a)If steps 1 & 2 are successful, wake up the modem by sending the
- command string "ATZ". If OK is received, report all is Normal and
- leave the RTS and DTR lines active.
-
- b)If the modem did not wake up, issue a more advanced hardware and
- software command string to reset and wake up the modem. Three attempts
- are made..if it fails, the RTS and DTR lines are turned off. This
- could happen
-
- if you tell Comset to test a serial port that does not have a
- compatible modem attached. In that case, a "failure" of this kind
- would be "normal" for your system.
-
-
- Comset Version 9.0 Documentation copyright (c) 1992 by Hank Volpe
- Page 5
-
- You can redirect the output of Comset to a file if you wish to
- maintain a log of each initialization. To do this, just use the
- command string
-
- COMSET [speed] [port] >> comset.log
-
- Speed and port are optional. The >> symbol tells dos to make a file
- called comset.log and append it each time Comset is run.
-
-
-
- IV FULL FEATURE USE AND ERROR REPORTING
- ---------------------------------------
-
- Registered Users of Comset receive some advanced features, some of
- which were described above in previous sections. An additional feature
- of the registered version is that of error-code reporting. Error code
- reporting simply stated passes "result-codes" from Comset to its
- calling program. This allows you to write some advanced batch-file
- procedures or to take specific actions.
-
- Running the registered copy, additional information is displayed
- informing you of the Error code received. Also that error code can be
- interpreted by Dos Batch files using the ERRORLEVEL function. Under
- normal conditions, a result code of 0 is returned to the calling
- program. If something wrong is detected, an error code of 99 is
- returned to the calling program.
-
- A simple use of this can be to start a communications program if the
- modem is ok, but if not, default to some other action...an example
- batch-file program looks like this;
-
- echo off
- comset 24 1
- IF ERRORLEVEL 99 goto stop
- echo passed
- goto exit
- :stop
- echo failed!
- :exit
-
- Other uses are left up to your imagination...you could flash up help
- screens to the user like "HEY DUMMY...TURN ON THE MODEM!!!" or
- something similar. Combined with redirecting the output to a logging
- file, you could trace a history of failures or other actions.
-
- Comset Version 9.0 Documentation copyright (c) 1992 by Hank Volpe
- Page 6
-
- Also, new in the registered version of Comset is the ability to send
- custom setup strings to your modem from a simple text file. To use
- this feature, all you need to do is the following;
-
- 1) Make a file with valid AT commands using edlin or any ASCII
- text editor and name the file Comset.cmd
-
- 2) Place this file in the same directory that you are running
- comset out of. If you are running Comset from a path, then
- you must have a Comset.cmd file in the directory you are
- currently in for this feature to work. The reason for this
- is so that you could have multiple comset.cmd files
- in different directories for different uses.
-
-
-
- When Comset starts, it will look for Comset.cmd in the current
- default directory, and if it finds it, it will send that command
- string to the modem instead of the ATZ command. An example of such a
- command set is the following;
-
- From dos, type edlin comset.cmd
- when edlin starts, type I for insert.
- Next, type AT M0 H1 then return
- Next, type control-Z
- Next, type e and the file will save.
-
- The next time you run comset, it will find the file comset.cmd and
- tell the modem to shut off the speaker and go off-hook.
-
- Any valid AT command set for your brand of modem can be sent. The
- only restriction is that all these commands fit on one line and the
- first two letters must be AT.
-
- You can also redirect the output of this function to a file as
- explained above. Users of Modems can use this to capture the settings
- of their modem and save it in text form for future reference.
-
-
- Comset Version 9.0 Documentation copyright (c) 1992 by Hank Volpe
- Page 7
-
- V. REGISTRATION INFORMATION
- --------------------------
-
- You can freely make copies and distribute the shareware version of
- Comset over BBS systems or public domain libraries as long as no fee
- for Comset is charged (except duplication costs) and as long as
- Comset.exe is distributed along with this file Comset.doc. These may
- be archived together for use on a bbs system. Under no circumstances
- can the registered version of Comset be distributed. Each version
- displays "shareware" or "registered" when it is run from the dos
- prompt.
-
- Comset is copyrighted by Hank Volpe and is not public domain software.
- Shareware version users are granted a limited license for its use. No
- warranties for Comset are stated, expressed or implied.
-
- Shareware authors continually provide computer users with low priced
- software compared to the traditional retail approach. If you register
- Comset, you will be able to use all the features ( Com1-4 support,
- auto-log in of Com3 and Com4 for Dos applications, advanced error
- reporting and batch file support).
-
- Registration is simple...and price is low. Comset is only $10, which
- includes the latest version and free maintenance updates. To register,
- send $10 along with your name and address to;
-
- Hank Volpe
- PO Box 43214
- Baltimore MD 21236
-
-
- Comset Version 9.0 Documentation copyright (c) 1992 by Hank Volpe
- Page 8
-
-
- VI. ERROR MESSAGES
-
- THERE IS NO COMx IN YOUR SYSTEM -
- Comset was instructed by the user to test a non-existent comm
- port. This could happen automatically if you don't have a COM1
- in your system. If this is the case, use the line
- COMSET [speed] [port] to select your specific needs.
-
-
-
- MODEM NOT RESPONDING PROPERLY -
- The modem under test did not set up even after 3 extensive
- hardware and software attempts to do so. Either you have a non-
- compatible or non-intelligent modem, or you are using the wrong
- opening baud rate. Comset's defaults are 2400 bps and COM1. If
- you only have a 1200 or 300 bps modem, use the line
- COMSET [speed] [port] and use a lower speed. Valid speeds are
- 300 bps, 1200 bps , 2400 bps [default], 4800 bps, 9600 bps,
- 19200 bps, 38400 bps, and 57600 bps. Trailing zeros are not
- necessary..ie 576 is 57600 bps. Any other values default
- automatically to 2400 bps.
-
-
- Comset Ver 8.0 Documentation Copyright 1987-1991 Hank Volpe
- Page 7
-
- MODEM APPEARS TO BE OFF OR DISCONNECTED -
- The hardware handshaking pairs RTS/CTS or DTR/DSR are not
- communicating properly. This should NEVER happen on internal
- modems unless the CTS signal is not enabled. Internal Modems
- usually keep this signal at a logic 1, so if you see this error,
- check your internal modem for proper strapping of the CTS and DSR
- signals.
-
- If you have an external modem,and the power for the modem is on,
- you will see this error message if you do not have the CTS signal
- at a logic 1 or you have a defective or inadequate Serial Cable.
- Most external modems have Dip-switches on the back for setting
- the CTS signal. Normally the CTS follows the Serial Ports RTS and
- the modem DSR (sometimes called MR) follows the Serial Ports
- DTR.
-
- In the case of an external modem you will see this error message
- every time the modem has not been turned on. This is telling you
- that your serial port hardware is fine, just that your modem is
- off.
-
- Comset Version 9.0 Documentation copyright (c) 1992 by Hank Volpe
- Page 9
-
- VII COMSET PROGRAM HISTORY
- --------------------------
-
- Version 1 - Simple Assy program fixed at 300 bps. Two versions
- COM1 and COM2.
-
- Version 2 - Baud rate raised to 1200 bps.
-
- Version 3 - Baud rate raised to 2400 bps.
-
- Version 4 - COM1 / COM2 support in one program.
-
- Version 5 - Major rewrite, added interrupt support, hardware
- and software testing, COM 1-4 support, Multiple
- baud rate support, error checking and reporting,
- and support for high speed modems to 19200 bps.
-
- Version 6 - This version adds the U parameter to allow for testing
- and setup of dumb modems and other serial devices.
- The registered version adds the ability to send a
- custom command string from a file named comset.cmd
- to the modem in place of the normal ATZ command
-
- Version 7 - This version adds baud rates to 38.4K,improved Uart
- communications module.
-
- Version 8 - This version adds speeds to 56K baud, improved
- Uart communications module, addition of the
- comm port swap and comm address features
-
- Version 9 - Improves speed of routines, adds the ability for
- uart only setups not to require an active device,
- changes the top speed description to 57.6k, and
- adds a test to verify the baud rate register set
- to the desired baud rate
- Current Software release is Version 9.0
-
-
-