home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The Devil's Doorknob BBS Capture (1996-2003)
/
devilsdoorknobbbscapture1996-2003.iso
/
Dloads
/
MISSING
/
WWA1-422.ZIP
/
WWDOC422.ZIP
/
WWIVMODM.DOC
< prev
next >
Wrap
Text File
|
1991-11-30
|
25KB
|
531 lines
WWIV v4 Modem Documentation
Copyright (c) 1988-1991 by Wayne Bell
Because so many people have problems with their modems, and having the
BBS use them, I am writing a separate .DOC file to attempt to better
describe modems, and how they need to be configured in order to run
optimally with WWIV. Additionally, this describes how WWIV v4.20 and
later handles the modem, and how to add support for additional modem
types.
The first thing you need to be aware of is that just about every modem
manufactured for the IBM claims to be "100% Hayes compatible." This
doesn't actually mean that it is 100% compatible, but only that it is
relatively close (would you buy a modem that is advertised as 99%
compatible?). With 9600 and faster modems, Hayes compatibility means
very little. Each modem handles high speed differently, and special
support may be needed for each brand modem.
For external modems, one important feature is your modem cable. In order
to work correctly with WWIV, the following pins need to be connected
from the modem to the computer (all are pin numbers on the DB-25
connected to the modem): 2,3,7,8,20. If any of these are not connected,
the modem probably won't work correctly, so you'll need a new modem
cable. Fortunately, just about all straight serial cables manufactured
correctly connect these pins. If your modem cable has sealed connectors
on the ends, don't tear it apart; it is probably fine. However, If you
made up your own cable (or had someone else make you up one), you might
want to check it out.
For both external and internal modems, the first important setting you
need to have on your modem is the carrier detect. Most modems have two
settings for carrier detect (or CD). Either CD is ALWAYS ON, or CD
tracks the state of the carrier. Using the second setting, WWIV is
correctly able to tell if a remote caller is connected by checking the
CD lead. But, for some damned fool reason, most modem manufacturers set
it to default to the always on state.
On some modems, there will be a physical switch that you will need to
check (and probably change). On some modems (such as Hayes external),
you'll need to pop off the face-plate and use a pencil or something to
flip the DIP switch. Other external modems may have the DIP switches
located on the back panel. So, pull out your modem manual, and check
which switch affects the CD or DCD lead, and have it set so that it
ISN'T ALWAYS ON. Internal modems that have DIP switches place the
switches on the modem card.
With some modems, there are "logical" (changed via the keyboard)
switches that determine the CD status. The keyboard command for the
Prometheus 2400G, for example, is &C1. The WWIV modem configurations
default to &C1 for all 2400 or faster modems.
The second important setting is the data terminal ready line (DTR),
which is like the CD lead. The DTR lead is what WWIV uses to send a
'hang up' command to the modem. Usually, the DTR lead is ON until WWIV
turns the DTR lead OFF, at which time the modem should hang up. Most
modems can be set so that the modem will completely ignore the DTR
status. Also, by some quirk in the Universe, it is also usually set by
the manufacturer to ignore DTR status instead of correctly looking at
it.
So, if you have physical switches on your modem, whip out your manual
again, and find which switch you need to check so that the modem will
hang up when DTR is dropped.
For the modems without physical switches, you need to find the command
for that setting. For the 2400G, the correct command is &D2, which is
described as, "Modem goes on-hook, assumes command state and disable
auto-answer with ON-to-OFF transition." Fortunately, (again), the WWIV
modem configurations default to setting &D2 for all 2400 or faster
modems.
Contained in the WWIV software ZIP file is a file named MODEMS.MDM.
This file contains setups (or configurations) for most modems. The .MDM
file is what INIT reads to create a modem data file, which is what the
BBS uses. If none of the standard configurations in the MODEMS.MDM seem
to work for your speed/ make/type modem, you have several options:
1. You can 'tweak' an existing configuration in the MODEMS.MDM file
2. You can build your own configuration and add it to the end of the
MODEMS.MDM file
3. You can create your own .MDM file (file name can be named any legal DOS
file name, but MUST have the .MDM extension
4. Write me for help
Modem configurations are placed in the BBS data directory, and the data
itself is stored in text format (for easy editing with any ASCII
editor). Only the file MODEMS.MDM can contain more than one
configuration. Any other *.MDM file can contain only one configuration,
and does not require a "FILE:" line, as the file name (before the .MDM)
is the name. Don't worry, that will be explained later. Also, the
MODEMS.MDM file is the only file that can contain auto-selection lines.
Described below are examples of the above options. Additional
information can be also be found in the WWIVINIT.DOC file.
WWIV defaults to the optimal setup for most non-MNP 300, 1200 and 2400
baud modems. These are the "H0300", "H1200" and "H2400" configurations,
which are described below. Some modems are a bit slow to respond after
they send the RING result code, and do not properly answer the phone
when it rings (despite WWIV saying that it has answered the phone). If
the BBS does not answer the phone when it should, try one of the "S"
configurations - "H1200S" or"H2400S". This should take care of the
problem. The only difference between the "S" configurations and the
normal ones is that the "S" configurations have a different ANSR:
string, which as a "~" (tilde) at the beginning. The tilde causes about
an 0.5 second delay, giving the modem some time before the "ATA" is
sent. If this still doesn't work, try editing the appropriate
configuration file, and adding an additional tilde on the beginning.
If one of the 300, 1200 or 2400 configurations does not work for your
modem, you have two choices: 1) read about the WWIV modem configuration
file, located below, and modify (tweak) the appropriate section to get
it to work, or 2) contact me via one of the methods in the 'READ.ME'
file, and see if I can get it to work for you (or if I already have an
updated configuration file that supports your modem). If you have a
good understanding of how modems work, I'd suggest trying to figure it
out on your own first.
In any case, if you have to modify a part of the default configuration
file to get your modem to work, please send the updated configuration
section (be sure to update the modem name and description also) to me,
so that I may include that configuration in future releases of WWIV.
This will help other sysops who purchase the same model modem.
Some MNP and 9600+ modems require special configuration. Fortunately,
most of the high-speed modems on BBS's (that I know of) are USRobotics
modems, and WWIV already knows how to handle the USRobotics high-speed
modems.
If WWIV does not currently support the type of high-speed modem that you
have, you can try building your own configuration section for it.
However, unless you are VERY familiar with how the modem works, I'd
suggest not trying that. Even if you are able to use your high-speed
modem perfectly with your terminal program, the same configuration will
NOT work for the BBS. The reason is, in the terminal program, you (the
user) are sitting there, and are able to interpret the result codes and
fix things if problems occur. There is nobody around to help a BBS if
it gets confused. Also, the BBS needs very specific information on the
modem (including flow control, buffering, baud rates, result codes,
etc.) in order to work properly for the variety of callers and modems
that connect with it.
If you are unable to get your own configuration to work (or don't want
to try), you'll pretty much have to contact me directly. Unless you are
trying this during the first few weeks after the release of v4.20, there
is a good chance I will already have the configuration file for your
modem, and can forward it (e-mail) it to you. When contacting me, BE
SURE to include as much information about your modem as possible.
Telling me only that it's supposed to be a Hayes compatible modem just
won't do it. I need manufacturer, model number, maximum speed and what
the modem returns when you enter 'AT'<enter> and 'AT0'<enter> when in a
terminal program.
If I find I DON'T already have a configuration file for it, then I will
need a fair amount of information on the modem to get it to work. In
all likelihood, if you call up technical support for your modem
manufacturer, and ask them to send me (a developer) a copy of the
manual, they probably won't mind. With a manual, I can probably work it
out from there (at no cost to you). If you send me YOUR copy of the
manual, don't expect me to mail it back. I just don't have the time to
be running to the post office every few days.
If you have a modem type that is not currently supported, I REALLY WOULD
like to get a configuration setup for that modem and support it in WWIV.
Please do not think that I am unwilling to support all types of modems.
I do want to support them, and will put in the time necessary to get
your modem working. But remember: I will need quite a bit of info on
your modem type.
/****************************************************************************/
Now, more about the WWIV modem configuration file.
Creating a new section of the modem configuration file does not require
any programming knowledge; it only requires in-depth, intimate knowledge
of how the modem works. I would not suggest that anyone try to set up
their own modem configuration section from scratch; rather, take one of
the existing configurations, and tweak it as necessary.
Modem configurations are stored in text format (for easy editing with
any ASCII editor), in *.mdm files in the data directory. The file
'modems.mdm' contains the default configurations (multiple
configurations). Any other *.mdm file can contain only one
configuration, and does not require a "FILE:" line, as the file name
(before the .mdm) is the name. Don't worry, that'll be explained later.
Also, the 'modems.mdm' file is the only file that can contain
auto-selection lines.
Let's start out with a sample configuration (for a 2400 baud modem), and
explain the various parts of it (this configuration is from the
MODEMS.MDM file).
##############################################################################
#
# Hayes compatible 2400 baud modems.
#
FILE: "H2400"
NAME: "Hayes compatible 2400"
NOTE: "If the BBS doesnt answer the phone, try the H2400S configuration."
SETU: "AT&C1&D2Q0V1{"
INIT: "ATC1E0F1H0M0Q0V1X4S0=0S2=1{"
ANSR: "ATA{"
PICK: "ATH1{"
HANG: "ATH0{"
DIAL: "ATDT"
SEPR: ""
DEFL: MS=2400 CS=2400 EC=N DC=N AS=N FC=N
RESL: "OK" "Normal" NORM
RESL: "RING" "Ring" RING
RESL: "NO CARRIER" "No Carrier" DIS
RESL: "ERROR" "Error" ERR
RESL: "NO DIAL TONE" "No Dial Tone" NDT
RESL: "NO DIALTONE" "No Dial Tone" NDT
RESL: "BUSY" "Busy" DIS
RESL: "NO ANSWER" "No Answer" DIS
RESL: "RINGING" "Ringing" RINGING
RESL: "VOICE" "Voice" DIS
RESL: "CONNECT" "300" MS=300 CS=300 CON
RESL: "CONNECT 1200" "1200" MS=1200 CS=1200 CON
RESL: "CONNECT 2400" "2400" MS=2400 CS=2400 CON
As you can see, the modem configuration is made-up of three groups:
The STRING lines (FILE, NAME, NOTE, SETU, INIT, ANSR, PICK, HANG, DIAL,
SEPR), the DEFAULT SETTINGS (DEFL), and the RESULT CODE lines (RESL).
The "FILE" line gives the "file name" of the configuration. If you took
the configuration above (minus the FILE: line), copied it from the
modems.mdm file, and put it in a "H2400.MDM" file in the data directory,
everything would work exactly the same. The "FILE" entry just allows
you to put multiple configurations into the 'modems.mdm' file, and not
clutter up your data directory with lots of *.mdm files that you don't
need.
Each of the strings allows control characters and delays to be
specified. A "{" is converted to a carriage-return. A "~" is converted
into an 0.5 second delay. Any string such as "^J" is converted into the
specified control character (here, control-J, or a linefeed). Any
string such as "\^" or "\~" quotes the character after it, allowing you
to put a ^ or a ~ into the string. Also, each string is terminated by
either a single or double quote. If you need to actually have a ' or "
in the string, you will need to 'quote' the quote, as in \' or \".
"NAME:" gives a textual name/description of the modem, which is
displayed in INIT section 5, along with the file name, which is used to
help select the correct configuration.
"NOTE:" A note that is printed out for the user when the specific modem
configuration is selected, giving any caveats for the configuration.
Multiple NOTE: lines may be specified, however you will need to end each
line with "^M^J" (carriage-return/line-feed), so it looks nice for the
user.
"SETU:" gives the setup string for the modem. This string is sent out
once each time the BBS is loaded and run.
"INIT:" gives the initialization string for the modem. This is sent out
to the modem when the BBS is first run (but after the SETUp string), and
after each caller hangs up.
"ANSR:" gives the string sent to the modem to tell it to answer the
phone (such as after the RING result code is received).
"PICK:" gives the string to pick up the modem (take the phone off-hook),
to prevent users from calling and getting a ring (thus thinking the BBS
is down).
"HANG:" gives the string t hang up the phone (after the PICK string is
sent).
I believe every modem in the world will probably use the same strings
for ANSR, PICK, and HANG. (Except, some modems (as noted earlier) are
slow, and need the answer string to be "~ATA{" (pause 1/2 second before
sending the answer string).
"DIAL:" gives the dial prefix. If your phone line does not support
tones, then changing it to "ATDP" will use pulse dialing. Putting
"ATB1DT" will cause a USR Dual Standard to dial out with the HST
protocol (instead of V.32, since "B0" is in the init string).
"SEPR:" gives separation characters for the result codes. This will be
discussed later, under the high-speed modem section.
"DEFL:" gives the default modem setup. It gives, essentially, modem
result configuration info.
"RESL:" gives modem result code info. There are two strings, then the
result configuration info.
The first string is the actual "result code" received from the modem.
Here, verbose result codes are used. (All result codes are converted to
uppercase).
The second string is the description of the result code, presented to
the user.
The result configuration info gives information describing the modem
result code. The possible strings in this area are:
NORM normal state of modem
RING phone is ringing
RINGING remote phone is ringing
ERR error encountered
DIS disconnected (No connection)
NDT no dial tone (same as DIS)
CON connection established
MS= modem speed
CS= com port speed
AS= asymmetrical baud rates (Y/N)
EC= error correcting (Y/N)
DC= data compression (Y/N)
FC= flow control (Y/N)
For 2400 or slower modems, you'll pretty much just have "MS=2400 CS=2400
CON" (or whatever the baud rate is). The other flags are used for
high-speed modems.
So, how do you modify this information? You pretty much take it as-is,
and modify it. Say your modem had a result code indicating connection
at 600 baud. You'd then just add a line saying:
RESL: "CONNECT 600" "600" MS=600 CS=600 CON
And that would be it. If you needed additional initialization strings
sent to the modem, then you'd just add that into either the setup or
init strings (depending on if you needed it sent only once, or for each
caller). Beware, though: Most modems only have a 40 character buffer,
so if you make the strings too long, it might not work.
Thus, modifying a 2400 or lower modem configuration should be fairly
simple (if you know what you need it to do). 9600's, however, are much
more complicated.
If/when you need to modify a modem configuration, you should first take
the configuration you are starting with, and copy it out of the
'modems.mdm' file into a separate file. If, say, you need to tweak the
H2400 configuration for your Prometheus modem, you'd copy the H2400
configuration (minus the FILE: "H2400") into a file, say, "PROMETH.MDM"
in your data directory. Then you'd modify the NAME: and NOTE: lines for
the new modem type. Then, when you're done, you can easily distribute
the new configuration (as the file PROMETH.MDM) to other people who
might need it (and also send a copy back to me, so I can include it in
future versions of the modems.mdm file).
/****************************************************************************/
The configuration for the latest USRobotics high-speed modems is:
##############################################################################
#
# Newest version of USR HST/V.32bis/DS modems
#
# This really returns the optimal information.
#
FILE: "USRC31"
NAME: "USR Courier (Newest, With rectangular LEDs/V.32bis)"
CONF: "ATZ{~~~~~~~AT{~~AT&W{"
SETU: "ATC1E0F1H0M0Q0V1X6&A3&B2&C1&D2{~~AT&H1&I0&K2&N0&R2&S0S0=0S2=1{"
INIT: "ATB0H0M0{"
ANSR: "ATA{"
PICK: "ATH1{"
HANG: "ATH0{"
DIAL: "ATB1DT"
SEPR: "/"
DEFL: MS=38400 CS=38400 EC=N DC=N AS=N FC=Y
RESL: "OK" "Normal" NORM
RESL: "RING" "Ring" RING
RESL: "NO CARRIER" "No Carrier" DIS
RESL: "ERROR" "Error" ERR
RESL: "NO DIAL TONE" "No Dial Tone" NDT
RESL: "BUSY" "Busy" DIS
RESL: "NO ANSWER" "No Answer" DIS
RESL: "RINGING" "Ringing" RINGING
RESL: "VOICE" "Voice" DIS
RESL: "CONNECT" "300" MS=300 CS=300 CON
RESL: "CONNECT 1200" "1200" MS=1200 CS=1200 CON
RESL: "CONNECT 2400" "2400" MS=2400 CS=2400 CON
RESL: "CONNECT 4800" "4800" MS=4800 CS=4800 CON
RESL: "CONNECT 7200" "7200" MS=7200 CS=7200 CON
RESL: "CONNECT 9600" "9600" MS=9600 CS=9600 CON
RESL: "CONNECT 12000" "12000" MS=12000 CS=12000 CON
RESL: "CONNECT 14400" "14400" MS=14400 CS=14400 CON
RESL: "ARQ" EC=Y CS=38400
RESL: "HST" '/HST' AS=Y
RESL: "V32" '/V.32' AS=N
RESL: "MNP" '/MNP' EC=Y
RESL: "LAPM" '/LAPM' EC=Y
RESL: "MNP5" '/MNP5' DC=Y
RESL: "V42BIS" '/V.42bis' DC=Y
RESL: "NONE" EC=N
RESL: "SYNC"
As you can see, much of it is the same.
One of the differences is that the setup string is divided into two
portions, to get around the (stupid) 40 character buffer in the modem.
Another major difference is the "CONF:" line. This configuration line
is sent out from the INIT program, when the specific modem configuration
is selected. It is sent out at the maximum baud rate the modem runs at.
For the USRobotics here, it sets the baud rate in the NRAM to 38400
baud. This is important, as this stored baud rate is used by the modem
when an error-correcting connection is made. Modems such as the
Compucom (which does not have any NRAM) will not need a CONF: line.
A subtle, but important, change is that the SEPR: is now set to "/". The
USRobotics result codes are sent out in strings such as "CONNECT
9600/ARQ/V32/LAPM/V42BIS". The SEPR: "/" tells the BBS to split up that
big result code into several "partial result codes", at the separator
character. Thus, the above result code will be split into "CONNECT
9600", "ARQ", "V32", "LAPM, "V42BIS", which is much easier for the BBS
to handle. Each one of the partial result codes is then processed
independently, in order. All of the partial result codes are processed
before any connected/disconnected decision is made by the BBS.
Now, the "DEFL:" line here says that, by default, the state of the modem
is (in order) running at 38400 bps, non-error-correcting, no data
compression, not asymmetrical, and flow control IS needed. When a
result code is received, all the modem settings are assumed to be at the
DEFL state. The result configuration info for each partial result code
modifies each field independently, starting from the DEFL state.
Each of the "CONNECT" partial result codes simply sets both the modem
speed (MS=) and the com port speed (CS=) to the baud rate specified,
same as for 2400 baud modems.
Suppose we got the result code "CONNECT 14400/ARQ/HST/HST/V42BIS".
We start out at the default:
Partial result code modem settings after processing
At beginning, DEFL MS=38400 CS=38400 EC=N DC=N AS=N FC=Y
"CONNECT 14400" MS=14400 CS=14400 EC=N DC=N AS=N FC=Y
"ARQ" MS=14400 CS=38400 EC=Y DC=N AS=N FC=Y
"HST" MS=14400 CS=38400 EC=Y DC=N AS=Y FC=Y
"HST" MS=14400 CS=38400 EC=Y DC=N AS=Y FC=Y
"V42BIS" MS=14400 CS=38400 EC=Y DC=Y AS=Y FC=Y
Which means:
MS=14400 The user's throughput is 14400 bps
CS=38400 The BBS should talk to the modem at 38400 bps.
(Due to the &B2 setting)
EC=Y Error correction is active (LAPM/MNP2-4)
DC=Y Data compression is active (V.42bis/MNP5)
AS=Y Asymmetrical baud rates. This is because, with the HST
connection, it is only 14400 bps in one direction. The
other direction is only 450 bps.
FC=Y Flow control is still active.
The "CON" at the end of each of the "CONNECT" lines means that the user
is connected. Even though the "CON" is processed in the first partial
result code, the remaining partial result codes are still processed
Note that, for the HST, V32, etc, partial result codes, the description
of the partial result code is in single-quotes (vs double-quotes for the
CONNECT descriptions). If the description is in double-quotes, then any
previous descriptions is OVERWRITTEN. If the description is in
single-quotes, then the description is APPENDED to any previous partial
description. For the result code above, the description would end up
being "14400/HST/HST/V.42bis"
For the ARQ partial result code, there is no description, and so the
description (so far) is unmodified by the "ARQ".
How do you make your own modem configuration file? A lot of it will
probably be the same as other configurations (ANSR, PICK, HANG, DIAL,
the first few RESL), however you will certainly have to completely
re-write the SETU and INIT strings. You will also almost certainly have
to modify the DEFL line, and the RESL lines for the connecting result
codes.
There are also length limits on the strings:
file: 8 chars
name: 80 chars
note: 4096 chars TOTAL (for however many NOTE: lines you have)
conf: 160 chars
setu: 160 chars
init: 160 chars
ansr: 80 chars
pick: 80 chars
hang: 80 chars
dial: 80 chars
sepr: 9 chars
result code from modem: 40 chars
result code description: 30 chars
Also: the sepr: string may contain multiple chars. It is not really a
"string" as a "list of chars". If you know C, this string is passed to
strtok().
/****************************************************************************/
Auto-selection: WWIV maintains a database for automatic modem type
detection in the MODEMS.MDM file. The data comprise a sort of "state
machine". When trying to detect a certain type of high-speed modem, it
starts out in state 1. If/when it gets to state 0, then it has detected
the modem type. If it passes through the entire list without passing
any of the rules, then it determines that it cannot determine the modem
type.
The first column is the "start" state. The second is the "end" state.
If the current state is equal to the "start" state, then the string in
the fourth column is sent to the modem. If the response is equal to the
string in the fifth column, then the state transition is made, and the
current state is set to the "end" state, and the currently detected
modem type is set to the string in the third column.
Note that the auto-selection data is used ONLY if the modem responds at
9600 baud or higher.
Also note that it is not important for you to put in auto-selection data
to detect your modem type. The auto-selection stuff is only a nicety,
and you can always go into init section 5 and pick whichever modem data
you want.