💾 Archived View for spam.works › mirrors › textfiles › computers › how2mnp.txt captured on 2023-06-14 at 16:03:12.

View Raw

More Information

-=-=-=-=-=-=-

=======
PREFACE
=======

If you are reading this, you probably have a modem.

Your modem may be equipped with MNP error correction/compression protocols
(probably MNP 4 or 5 - will be explained soon).

MNP can help you work faster. In addition to its error-free connection, it has
features that increase the effective modem speed beyond its rated value.

If you do have MNP, chances are you are NOT using it correctly - you probably
do not communicate as fast as you can. In other words, you are probably paying
Bezeq more than you should.

Using MNP correctly requires that you set various options in various locations
(your modem, your communication program and your file transfer protocols).
You must set ALL options correctly to make MNP work. Moreover, your
communicating partner (the BBS) must also set all ITS options correctly. The
defaults that come with your modem and your software do not help - they are
usually wrong.

This article is intended to help you determine these settings so that you can
utilize your modem to its best.

The basic idea is very simple. First, you must get your modem to work in its
highest speed (in other words, setup MNP correctly); then you must make sure
that your computer and software do not become a bottleneck and slow the modem
down. This simple idea is not very easy to implement, however, so read
carefully.
 
One last remark. There are many brands of MNP modems in the market, and even
more communication programs and file transfer protocols. I cannot cover all
of them. The modem discussion will be based mainly on the Everex EV-941,
which I own and know the best. The software part will discuss Telix, Telemate,
Puma, Bimodem and DSZ. I will mention some other modems and software packages,
but your favorite one may not be among them. READ ANYHOW: if you understand
the basic ideas, you will probably be able to implement them for other
hardware or software items.


=================
SOME MODEM BASICS
=================

So that we can all understand each other, let me draw some basic facts. They
are not necessarily exact, but they are good enough for this discussion. If
you are familiar with these facts, you can skip this and the following
section.

Let's assume that YOUR computer wants to send some data to MY computer. Here
is what happens:

Your computer sends the data to its own "Serial Adapter" (or "RS232 card").
It sends the data in parallel - one full byte at a time (all bits together),
along with some control information.

Your serial adapter converts the data from parallel to serial representation.
In other words, the bits that form the byte (which entered your adapter at the
computer side together) leave it at the connector side one after the other.
The adapter is asynchronous, which means that it adds a "Start" bit, "Stop"
bit(s) and perhaps a parity bit to each sequence of bits that form a byte (I
will not discuss this any further).

Your Serial adapter narrows the eight-bits-per-byte-plus-control computer data
to a fewer number of lines, but is still creates digital data, which can be
transmitted over special (and short) lines only. This is why your adapter is
connected to a modem. The modem translates the digital data to voices that can
be transmitted over a standard telephone line.
 
On the other side of the phone line, my modem listens to the incoming voices,
translates them to serial bits and feeds the bits into my serial adapter. This
adapter converts the sequence of bits into parallel bytes, which are read by
my computer.
 
To summarize:
 
-     Your computer creates parallel bytes;
-     Your serial adapter receives parallel bytes and creates serial bits;
-     Your modem receives serial bits and creates voices;
-     My modem receives voices and creates serial bits;
-     My serial adapter receives serial bits and creates parallel bytes;
-     My computer receives parallel bytes.

(By the way, "internal" modems - such as the Everex EV-941 - combine the
serial adapter and the modem into a single card: they receive parallel data
and send voices, and vice versa. This is transparent to the software, since
the single-card modem emulates a serial adapter connected to an external
modem, and there is no difference on either the computer or the telephone line
side).


=======================
SOME MORE MODEM DETAILS
=======================

Let's get closer and examine some points in higher detail.

Your serial adapter is "Full Duplex", and so is probably your modem. This
means that they can receive and transmit data at the same time (the serial
adapter actually has two physical lines - one for outgoing bits, one for
incoming - as well as some control lines; the modem usually uses two basic
frequencies, one for transmitting and one for receiving).

Your software, serial adapter and modem must be able to tell when each of them
is ready to communicate. In other words, there must be a standard method of
"Handshaking" between all parties. This is done in several methods. 

First, there are several control lines between the serial adapter and the
modem (these lines can also be set and/or sensed by the software on the
computer side of the serial adapter). Of these control lines I will mention
four:

-     DSR (Data Set Ready) - Modem-to-computer: Used by the modem to tell the
      serial adapter and the computer that the modem is ready (but not
      necessarily able to receive new data).

-     CTS (Clear To Send) - Modem-to-computer: Used by the modem to tell the
      serial adapter and the computer that the modem is able to receive new
      data.

-     DTR (Data Terminal Ready) - Computer-to-modem: Used by the serial
      adapter to tell the modem that the adapter (and computer) is ready (but
      not necessarily able to receive new data).

-     RTS (Request To Send) - Computer-to-modem: Used by the serial adapter 
      to tell the modem that the adapter (and computer) is able to receive new
      data. 

Not all four lines are used by all modems, but MNP modems usually use all
four, as I'll explain later.

There is an alternate way of handshaking between the communicating parties.
Instead of relying on extra hardware lines, this method uses special ASCII
values that are sent as standard data but have a unique meaning. These values
are usually XON (hex 11), which means "start", and XOFF (hex 13), which means
"stop". Using XON/XOFF has several disadvantages: it slows down the
transmission (because handshaking comes in sequence rather than in parallel
with the data), and more important - the XON/XOFF characters, being used for
handshaking, are "swallowed" and cannot be transmitted as part of the normal
data.

One more thing you should know about modems is that they usually work in two
modes. In normal mode, everything you send to the modem is transmitted over
the phone to the other partner. The modem may also operate in "Command" mode;
in this case, the data you send to the modem is interpreted as modem commands
(the switch between normal and command mode will not be explained here, since
it is usually done for you by your communication program). Most modems use the
Hayes command language, in which all commands start with the characters "AT".
The Hayes language is not uniform - every manufacturer has its own implement-
ation of the language, particularly for such exotic things as MNP control,
which is what this document is all about. I cannot therefore give exact rules
that match all modems, and you will have to figure out your own commands if
your modem is different than mine.


====================
COMMUNICATION SPEEDS
====================

I said "communication speeds" and not "communication speed" on purpose. Each
modem has a rated maximum speed. This is somewhat misleading, because there
are several speeds involved, and the final communication speed depends on
more than one factor.

The modem speed itself is measured in Bits Per Second, or BPS. This is the
number of bits per second sent or received by the modem over the telephone
line. The most common speed today is 2400 BPS (1200 is used by older or
cheaper modems, while 9600 is becoming quite common).

(You may also hear the term "modem Baud rate". IGNORE IT. This measures the
number of modem status changes per second. 2400 BPS modems have usually a
Baud rate of only 600, and use special techniques such as frequency shifting
to squeeze in more bits per change in status).

The modem speed (BPS) refers to the PHONE side of the modem. The speed on the
other side, between the modem and the computer, is not necessarily the same.
MNP modems are usually capable of talking to the computer faster than they
talk between themselves; we'll soon see why this is necessary.

When the modem-to-computer and modem-to-modem speeds are different, some
handshaking techniques (explained above) must be used to ensure that the
computer does not "overrun" the modem beyond its actual capabilities and vice
versa.

To complicate things a little more, the BPS speed measures the actual number
of bits that flow between modems. MNP effective transfer rate can be faster,
because less bits are needed to transmit the same amount of data.

There is one thing you must remember. THE ACTUAL TRANSMISSION SPEED IS THE
SPEED OF THE SLOWEST COMMUNICATING PARTNER. If your modem can talk 2400 and
my can talk 1200, the actual speed will be 1200: this is straightforward. What
is less obvious is that if your modem can talk to my modem at an effective
speed of 3000 (actually 2400 enhanced by MNP) but your (or my) computer-to-
modem speed is fixed at 2400, the final speed will only be 2400 - and neither
of us may be aware of it.

Communication is a two-partners game. You may set all your speeds correctly
on your side, but this is not good enough. I must set my speeds right as well.
SYSOPS PAY ATTENTION: There is a whole world out there waiting for you to
setup your communication parameters correctly!


===============
SOME MNP BASICS
===============

MNP, or Microcom Networking Protocol (today supported by many more brands
beside Microcom), was originally intended to ensure error-free communication
between modems regardless of phone line conditions. MNP is divided into
classes. In the first (and earliest) classes, the error-free communication was
obtained at a price of reducing the effective speed (which is quite obvious
if you think about it). Newer classes use special techniques that result in
error-free data transfer while actually INCREASING the communication speed
(moderately to considerably).

MNP classes 1 and 2 reduce the transfer speed, and are not worth discussing.

MNP class 3 is the first class that resulted in an increased transfer rate.
This was done by communicating between the modems using SYNCHRONOUS "packets"
without start and stop bits, although the data transfer on the other side of
the modems (between the modems and the computer) is still synchronous. There
is still some overhead involved, so the effective transfer rate of MNP 3 is
about 108%, or up to 260 bytes per second for an 2400 BPS modem, compared to
240 bytes for non-MNP (assuming 1 start bit, 1 stop bit and no parity). These
speeds, by the way, are ideal and are never reached because of other limiting
factors, but you can get quite close.

MNP class 4 uses synchronous packets as well, and optimizes these packets by
eliminating unnecessary data and adjusting to line conditions. The effective
transfer rate of MNP 4 is up to 120%, or about 260 bytes per second for 2400
(assuming there are not too many errors - remember that the communication is
supposed to be error-free as well as faster).

MNP class 5 adds data compression to MNP 4. A real-time adaptive compression
algorithm is used, which means that the modem adjust the algorithm all the
time to match the data being transferred. Unlike the previous classes, which
provide a constant speed factor, compression depends of course on the data
being transmitted. MNP 5 is considered to have an effective rate of 200%,
which makes a 2400 BPS modem behave like a 4800. 

There is a catch, however. If your modem does mainly file transfers from a
BBS, chances are that you will not gain much by compression (to put it in
other words, if the already-compressed .ZIP or .ICE etc. files in the BBS can
be squeezed any further, the file compression method should probably be
changed!). Some publication suggest that you would be better off WITHOUT data
compression in this case, since compression does have its price, which means
that you should revoke MNP 5 and go back to using MNP 4. My own experience is
that MNP 5 does not harm file transfers that much, and you should probably
keep it on to take care of interactive BBS work, but your case might be
different - feel free to experiment and let me know the results.

This is as far as I will go. There are several further MNP classes (the latest
one I heard of is MNP 10, which makes a 2400 BPS modem behave like 19200!),
but the idea is the same, and modems above MNP 5 are still not that common.

One thing I didn't say, but should be obvious, is that MNP is a two-way
business - both communicating modems must use the same MNP level when they
communicate (the modems may negotiate and agree upon a certain level when they
make the first connection).


====================================
HOW TO SPEED THINGS UP - BASIC IDEAS
====================================

Enough with the theory - let's start doing something useful.

The things you should do to make your communication faster can be summarized
as follows:

1.    PURCHASE AN MNP MODEM (at least MNP 4, probably 5).

2.    PURCHASE A FAST-ENOUGH COMMUNICATION PROGRAM, that will not cause a
      bottleneck on your computer (notice that I said "purchase", not "steal"
      or "borrow"!).

3.    MAKE YOUR MODEM USE MNP (4 or 5 - as I said, I don't have a good advise
      here). This is rather easy, but remember that most MNP modems do NOT use
      MNP as a default, so you have to do some manual work.

4.    MAKE YOUR SERIAL ADAPTER TALK TO THE MODEM AT A HIGHER RATE THAN THE
      MODEM'S NOMINAL RATE. The manuals suggest 4800 for a 2400 modem; I
      myself am more optimistic and use 9600.

5.    MAKE SURE YOUR MODEM STAYS AT THE HIGH MODEM-TO-ADAPTER SPEED and does
      not revert to the modem-to-modem nominal speed when the connection is
      made.

6.    MAKE SURE YOUR COMMUNICATION PROGRAM STAYS AT THE HIGH SPEED and does
      not revert to the modem nominal speed when the connection is made.

7.    USE HARDWARE-LEVEL HANDSHAKING (CTS/RTS) between the modem and your
      communication program. Do NOT use XON/XOFF handshaking.

This is all you have to do, but you must make sure you do EVERYTHING specified
here. If you do a partial job, you'll end up without any gain in speed (the
better case) or with unreadable garbage on your screen (the worse case).


============================================
HOW TO SPEED THINGS UP - A PRACTICAL EXAMPLE
============================================

For the hardware part, let me assume that you have purchased an Everex EV941
modem with MNP 5 (this is NOT a recommendation - there may be better bargains
in the market). I'll also discuss some other modem setup possibilities.

For the software part, you may use the communication program that comes
bundled with your modem (Everex comes with something called "BitCom"), but
there ARE much better bargains in the market, and some of them are shareware,
so you can experiment and purchase the one you like. I'll mention two:

-     Telix seems like a fairly good choice. It is FAST, not too large, has
      built-in ZMODEM and a powerful script language, and is not too annoying
      to use.

-     Telemate is considered to be a good choice, since it allows a kind of
      multitasking (you can browse a file while you download so you can decide
      on-the-fly what to download next). If your computer is slow, Telemate
      may not be fast enough and may become a bottleneck (something a
      communication software should never be), and it also eats up too much
      of your precious RAM, but it is still worth considering.

I have also experimented with some other packages (including Procomm, Procomm
Plus which is used at my work but is NOT shareware, Boyan, Qmodem and GT1500).
Most of them can be used quite easily with MNP.

A communication program is not complete without some external file transfer
protocols. There are about a dozen of them around, but I'll discuss only
three: Puma, which is fast and elegant; Bimodem, which is quite amazing (it
is truly full-duplex - allows you to upload and download simultaneously at
full speed, and even chat with your friend at the same time); and DSZ, which
contains several protocols including ZMODEM and is preferred by many users.


===========
MODEM SETUP
===========

In the following lines I'll discuss only those modem settings that are
important for proper MNP operation. There are more options that I will not
mention.

Commands that have an alphabetic character immediately following the AT code
are usually common among all modems. Commands that start with AT& are less
common, and there are some variations. Commands that start with AT\, AT% or
AT* are unique, and probably have other codes in other modems.

ATB1        (Mandatory, default). Selects the Bell 212A protocol.

ATE1        (Mandatory, default). Echoes the commands to the screen; some
            communication programs require it, for others it does no harm.

ATQ0        (Mandatory, default). Suppresses "quiet" modes, and causes command
            responses to be sent by the modem (most communication programs
            require it to tell when a communication has been made, etc.).

ATV1        (Recommended, default). Causes command responses to be displayed
            in English words rather than in numeric codes.

ATX4        (Recommended, default). Causes the modem to wait for dial tone
            before dialing, and to detect BUSY and NO ANSWER conditions. some
            modems may not support it.

AT&C1       (Mandatory, default). Causes the modem to indicate Data Carrier
            Detect (DCD) only when there is actually a modem on the other
            side (DCD is not explained in this article).

AT&D2       (Mandatory, default). Causes the modem to hang up when the DTR
            line is down (DTR is explained above).

AT&S1       (Mandatory, NOT default!). Causes the modem to keep the DSR line
            up only when the modem is active (DSR is explained above). BE
            CAREFUL: Other modems use AT&S for other things (Motorola 82240,
            for example, uses it for front switch settings control).

AT\C1       (Mandatory, NOT default!). Enables an internal modem buffer to be
            used while the modems negotiate MNP. If not used, the first
            characters in the transmission may be lost.

AT\G0       (Mandatory, default). Disables XON/XOFF flow control between the
            two modems. Setting AT\G1 will cause problems with some file
            transfer protocols (such as Bimodem).

AT\J0       (Mandatory, NOT default, VERY important!). Turns "baud adjust"
            off. The default (AT\J1) causes your modem to adjust the speed by
            which it communicates with your computer (the RS232 side) to the
            nominal modem-to-modem speed at connect time, which eliminates all
            MNP speed gains (your 2400 modem will talk "effective-4800" to the
            second modem, but only 2400 to your computer!). Setting AT\J0
            keeps the speed between the modem and the serial port constant
            (how to set this speed initially is explained below). Other modems
            use other commands for this, such as AT&I1.

AT\K5       (Mandatory, default). Causes a Break signal to be sent and
            received in sequence with the data, which is important for file
            transfers. Other modems use other commands for this, such as
            AT*Y2.

AT\N3       (Mandatory, NOT default!). Causes the modem to work in "auto-
            reliable" mode, which means that it will try to use MNP and fall
            back to non-MNP if the other modem is not compatible. The default
            (AT\N1) DISABLES MNP altogether. Other modems use other commands
            for this, such as AT&E4 or AT&E6.

AT\Q3       (Mandatory, NOT default, VERY important!). Causes hardware-level
            handshaking (RTS/CTS) between your modem and your computer. If the
            modem and the serial adapter speeds are different (such as when
            AT\J0 is specified), handshaking MUST be enabled. DO NOT use
            XON/XOFF handshaking (AT\Q1), because it will cause problems with
            some file transfer protocols. Other modems use other commands for
            this, such as AT&K2.

AT\V1       (Recommended, NOT default!). Causes the modem replies to indicate
            if a reliable (MNP) connection has been made - you should probably
            want to know what kind of connection you have established.

AT\X1       (Mandatory, NOT default!). Enables XON/XOFF characters to be sent
            to the other modem as data. The default (AT\X0) will swallow
            XON/XOFF and will cause problems with some file transfer
            protocols.

AT%C1       (Up to you - I use it; NOT default). Enables data compression
            (uses MNP 5 rather than MNP 4). If you can prove that MNP 5 slows
            down file transfers considerably, I'll be glad (?) to switch back
            to AT%C0.

ATDT        (Recommended). This has nothing to do with MNP, but you may be
            able to use touch-tone (DTMF) dialing without being aware of it,
            and it is a real time saver. Even if you can't, try to ask Bezeq -
            you may be surprised.

AT&W0       You probably do not want to type all those setup strings every
            time, so save them once with AT&W0, and indicate to your
            communication program that your modem initialization string is
            simply ...

ATZ         Which is easy to remember and use.

AT&V        (View setting). Use this to check your non-MNP modem settings.

ATI6        (Inquire modem). Use this to check your special MNP modem settings
            (why use two different codes is beyond me).


===========
TELIX SETUP
===========

If you are using Telix as your favorite communication program, there are
several things that you should do to make it work properly with MNP.

First, bring up the Telix setup menu (Alt-O), and select "Terminal options".

Within "Terminal options", select option A and set the default baud rate to
9600 (!) if your modem is 2400 MNP. This will ensure that the serial-adapter-
to-modem speed is high enough not to cause a bottleneck.

Then select the appropriate options to turn XON/XOFF flow control OFF, CTS/RTS
flow control ON, and DSR/DTR flow control OFF. Do not use any other
combination of flow control!

Now go back to the configuration menu and select "Modem and dialing". Set the
modem initialization string to ATZ^M (provided that you have saved your
setup!), and set Auto Baud detect to OFF.

Finally, go to your dialing directory and define ALL entries to have a speed
of 9600 (even if you know for sure they are only 1200 or 2400).

Now start working. You should notice that the speed indication in the status
line always says 9600, whether you are idle or communicating. If it is (and
if you manage to work), you probably did everything right.

(What happens is that Telix talks to your modem at a constant speed of 9600
BPS and uses CTS/RTS flow control to avoid overruns; your modem talks to the
other modem as fast as it can, taking advantage of MNP if available, and is
not delayed by your computer's hardware or software).

There is one small problem. If you upload or download with Telix's internal
protocols, the estimated transfer time will be incorrect, because it will be
based on the assumption that your modem is actually 9600 BPS. This is a small
price to pay in order to be able to work faster.


==============
TELEMATE SETUP
==============

First of all, use Telemate only if your computer is fast enough and has enough
free memory - writing programs in C using Vermont Views results in very good
programs but does not contribute to their size and performance.

Go to Telemate's options menu (use your mouse or Alt-O).

Select "Dial setup", and turn "Auto Baud detect" OFF.

Select "Terminal", and turn XON/XOFF flow control OFF and RTS/CTS flow control
ON.

Select "Communication", and set the modem initialization string to ATZ^M
(provided that you have saved your setup!). In addition, set the "Baud rate"
(which by now you know should say BPS, not Baud) to 9600 (!) if your modem is
2400 MNP. This will ensure that the serial-adapter-to-modem speed is high
enough not to cause a bottleneck.

Do not forget to save your setup.

Finally, switch to your dialing directory and define ALL entries to have a
speed of 9600 (even if you know for sure they are only 1200 or 2400).

Now start working. If you left your status line on, you should notice that the
speed indication in the status line always indicates 9600, whether you are
idle or communicating. If it is (and if you manage to work), you probably did
everything right.

Unlike Telix, Telemate adjusts its estimated upload/download times as it
works. Therefore, only the initial estimated transfer time will be incorrect
(because it will be based on the assumption that your modem is actually 9600
BPS), but after a few blocks the estimate will be corrected.


==========
PUMA SETUP
==========

If you are using Puma as an external protocol, you can have MNP speed AND a
correct estimate of the file transfer time.

Run PUMASET to configure Puma, and choose "Change default options". In this
menu, select the following:

-     UART Baud - "current" (assuming you always call Puma when your
      communication program is operating).

-     Effective Baud - 2400 (assuming your modem is 2400). This figure is used
      for estimating the file transfer time.

-     CTS/RTS handshake - "fast".


=============
BIMODEM SETUP
=============

Bimodem is a protocol you cannot live without if you plan on being a honest
person and upload at least once in a while.

Like Puma, Bimodem can be configured to use MNP and estimate times correctly.

To do this, run BICONFIG (either directly or from BIMENU). Select "Terminal
options" and set the following:

-     "Baud (yack!) rate to base estimate on" - type here your nominal modem
      speed (e.g. 2400). This figure is used for estimating the file transfer
      time. Note that if you use MNP, your effective BPS rate will be faster,
      and the estimated time will be too long.

-     "CTS/RTS hardware flow control" - set to "Y".

The next time you are asked why you always download and never upload, do not
use the "I don't have time" or "I don't have money" excuses - they do not work
well with Bimodem.


=========
DSZ SETUP
=========

DSZ is a famous yet not-very-user-friendly file transfer package that supports
several protocols, most importantly ZMODEM. It is a must if you use a
communication program that does not have internal ZMODEM, and there are those
out there who use it even with Telix or Telemate, because DSZ is supposed to
be faster and better (you can try it and judge for yourself).

The following comments are based on the DSZ version dated April 11, 1990
(known as DSZ0411). They are probably relevant to other versions as well.

DSZ is command-line oriented and does not have a separate setup mode. The DSZ
documentation has the courtesy of stating that it has a "handshake XX"
command-line option (which can be abbreviated to "ha"), but it does not
indicate what values this mysterious XX can take (this is part of the
package's user-friendliness). If you dig deep enough, you find that the value
relevant to MNP is "handshake cts". The DSZ command for ZMODEM downloading
should therefore look something like:

      DSZ ha cts rz -rr <other options>

note that there is no hyphen before "ha", and that you must use lowercase
characters.

DSX has another option that may be relevant, called "estimate". If you
indicate the effective BPS rate to DSZ (such as 2400 when using non-MNP or
2900 when using MNP), DSZ will show a correct estimated transfer time;
otherwise the estimate will be based on the RS232 speed (9600) and will be
incorrect. If your file transfer is long enough, you may have enough time to
locate where exactly on the screen DSZ gives its estimate - somewhere towards
the end of its numerous line-mode messages.
 

=======================
A FINAL WORD FOR SYSOPS
=======================

As you have probably guessed by now, I am NOT a SYSOP and probably never will
be (I am too old, too busy and too poor).

I therefore have no idea what to do on your side of the game to make MNP work.

We users can do everything we can, but if you do not setup your end correctly,
we will never gain speed.

If any of you out there knows what to do with all those Front Doors and Remote
Accesses an QBBSes and FileDoors and other Buzzwords to make them utilize MNP,
please share this information with other SYSOPs, so that you and us (who cares
about you and us? - me!) can save some time and money.


========================
A FINAL WORD TO EVERYONE
========================

I don't want to have too many mistakes in this document. If you find one, or
if you want to add your own comments, please let me know.

You spent some money on your equipment - I hope this will help you use it
cheeper and faster.