Dec 142017
 
Concepts of the MNP protocol, explains all levels of MNP indepth.
File MNPCON.ZIP from The Programmer’s Corner in
Category Communications
Concepts of the MNP protocol, explains all levels of MNP indepth.
File Name File Size Zip Size Zip Type
MNPCON.TXT 22249 7377 deflated

Download File MNPCON.ZIP Here

Contents of the MNPCON.TXT file


=======================================================
Getting Acquainted with MNP Modem Concepts:
=======================================================

Each new piece of computer equipment inevitably comes
complete with a new vocabulary to learn. The world of
modems and telecommunications is no different. Although
this file is an excerpt from the Practical Peripherals
PM2400SA MNP manual and it contains some information
specific to the PPI modem, it does address the general
concepts of the Microcom Networking Protocol. These
concepts will usually apply to any modem using MNP. The
primary differences would be with specific commands or
settings.

Reading this file will provide you with some definitions
and background information that will help you understand,
in a general way, how any MNP modem works within your
total system. Without a firm mental image of the whole
environment, one can quickly become overwhelmed by the
vast array of details.

Your computer system is a digital device that "talks" with
a vocabulary limited to ones and zeros. The telephone
network, on the other hand, is an analog system which uses
varying tones to communicate. Your modem is simply a
device that can speak both the "Digital" and the "Analog"
languages and translate between them.

One of the "dialects" your PM2400SA MNP understands is the
AT command set. This is the industry standard "modem
language" and is used by most modems available today. The
standard AT command set was expanded in your PM2400SA MNP
to allow control of its advanced features. Although many
pages in this manual are devoted to these modem commands,
you should remember that your terminal software will
handle the complex details of talking directly with your
modem. Once a fully-featured communications program has
been installed on your system, you will rarely have need
to directly issue an AT command to your modem.

========================
Operational States
========================

Your PM2400SA MNP can be viewed as two modems in a single
case. This is not literally true, but it is conceptually
valid. In this document, these two modem identities will
be referenced as operational states.

First, is the 'Hayes compatible' state. This is the
operational state in effect when the modem is powered up
using the factory default configuration. In this state,
the PM2400SA MNP will operate like any other Hayes
compatible modem.

The second modem identity is the MNP operational state.
This second state is invoked with specific commands from
the extended AT command set. This can be done either by
sending the appropriate AT commands directly to the modem
from the terminal, or via the initialization string of
your communications software. In the MNP operational
state, your PM2400SA MNP is fully compatible with all
modems which support the Microcom Network Protocol (MNP).
This state provides hardware error detection, error
correction, and data compression.

================================================
MNP -- What is the Microcom Networking Protocol?
================================================

The Microcom Network Protocol allows error-free modem
connections by using a sophisticated hardware design which
can detect data errors and correct them. This is done by
sending the data in frames. These frames contain a header,
the data, and a frame check code. This frame check code is
computed by the sending modem for each frame of data
transmitted.

The receiving MNP modem does this same calculation on the
frame data and compares the result with the received check
code. If the two values match, the frame is accepted. If
they do not match, the receiving modem requests that the
corrupted frame be sent again.

MNP implementations vary in features dependent upon the
service class or level in use. Your PM2400SA MNP modem
supports MNP levels one through five. The primary
attributes of each of the supported levels is given below.

Level 1:

This is often called the block mode. This is a
unidirectional (half-duplex) mode. The sending modem sends
a block of data and then waits for an acknowledgement from
the receiving modem before sending the next block. This
level is rarely used in computer-to-computer
communications. It is usually restricted to use between
terminals.

Level 2:

This is called the stream mode. It is a bidirectional
(full-duplex) mode. This means that data flows in both
directions at the same time. Protocol overhead in Level 2
reduces throughput to about 84% of that of a standard
non-MNP modem.

Level 3:

Level 3 incorporates Level 2 but is more efficient since
the MNP modem strips the start and stop bits from the data
packet before it is sent. The receiving modem reinserts
the removed start and stop bits before passing the data to
the receiving computer. Throughput is increased to about
108% of that of a standard non-MNP modem.

Level 4:

Level 4 reduces certain information in the frame header to
reduce protocol overhead. In addition, under ideal
conditions, the frame size will be increased from that of
Level 3, further reducing the overhead burden. Level 4 can
boost throughput by as much as another 5 percent.

Level 5:

MNP Level 5 invokes data compression. The sending modem
detects redundant data and recodes it to fewer bits. The
receiving modem decompresses the data before passing it
along to the receiving computer. Throughput is very
sensitive to the data structure being transmitted. ASCII
text files will produce the greatest throughput gains.
Files with .EXE, .COM, and .ARC extensions may show as
little as 60% of the throughput benefits accorded ASCII
files.

Dependent upon the configuration in effect when an MNP
reliable connection is attempted, the two MNP modems will
negotiate a connection at the highest common MNP service
level available. This is done automatically by means of a
handshaking series of interrogations and responses.

=========================
Flow Control
=========================

Flow control is the method used by the modem to compensate
for differences in data transfer rates between incoming
and outgoing data. Flow control can be achieved by either
hardware or software. Software flow control is done by
inserting control characters within the transmitted data.
Hardware flow control is achieved by altering the voltage
level of various signal lines at the interface between the
computer and the modem's serial port.

In the MNP state you can transfer data from the local
computer to the local modem at 9,600 bps (bits per second)
while the modem link is established at 2,400 bps or even
lower. Since the data flowing in is greater per unit of
time than the data flowing out, there must be a way to
meter incoming data, to tell it to stop coming in until
more room is available in the modem's internal buffer.
Without flow control being enabled, the modem port and the
serial port must be operated at the same bps rate or data
will be lost .

Software flow control uses the XON and XOFF characters.
These are also known as Control-Q and Control-S
respectively. These characters are actually mixed in with
the transferred data. Hardware flow control usually uses
the signals RTS (request to send) and CTS (clear to send).
You will want to study the commands AT\Gn and AT\Qn in
Appendix C for further information on this topic.

The use of XON/XOFF software flow control presents the
problem of being certain that only the desired element in
the system responds to the flow control characters. If you
are using XON/XOFF to control the local serial port, you
may not want those flow control characters to be passed
along with the data to the remote modem.

The AT\Xn command (see Appendix C) is used to determine
whether these flow control characters are processed by the
PM2400 MNP and passed along with the data to the remote
modem or simply processed and deleted from the data
stream.

Hardware flow control can be either unidirectional or
bidirectional. Exactly how you will want to set the flow
control commands will depend upon your application. If
your application demands both file uploads and downloads
and the transfer protocol does not support some form of
XON/XOFF, bidirectional hardware flow control is
recommended.

When in the MNP reliable mode and the modem is performing
error corrections, the protocol itself controls data flow
on the modem port. Retransmissions caused by a very noisy
phone line, however, may cause the buffer to fill, so it
is still important to use flow control on the serial port.

Experimentation and experience will indicate what will be
most appropriate for your particular application and
software.

========================
Some Notes on Software
========================

Communications software is usually referred to as either
Telecommunications Software or Terminal Emulation
Software. The two are different, but the distinction is
sometimes hard to see. Generally, terminal emulation
software will allow you to type things at the keyboard and
see responses on the video display or printer. Often these
programs will be used to communicate with mainframe or
mini-computers and will not support disk management or
file transfers. Essentially this type of software will
"downgrade" your computer to a dumb terminal.

A full-featured communications package, however, will not
only allow file transfers, but will also provide a dial
directory, a script language for automated sessions, and a
host of other features. Of course, the more powerful and
flexible the software package, the more difficult it will
be to master. Regardless of which software package you
choose to use, you should spend sufficient time with the
program documentation to understand how it operates.

To take full advantage of the MNP features of the PM2400SA
MNP your selected program should allow turning off the
auto-baud feature. You should also be able to toggle both
XON/XOFF and hardware flow control. In addition, it should
support several file transfer protocols designed to be
used with an error-correcting modem.

Although your modem will work with most standard
communications programs and file protocols such as XMODEM,
there will be a throughput penalty when using a software
error-detecting protocol due to the redundant
error-checking overhead. (Practical testing has shown that
the ZMODEM protocol performs very well with MNP modems.
See the file XXXXXX.TXT for transfer comparisons.)

Procomm Plus is representative of a complete
communications package which provides ease of use with the
features required to take full advantage of the PM2400SA
MNP's capabilities. This program from DataStorm
Technologies supports both YMODEM-G and IMODEM. These file
protocols are tailored for use with error-correcting
modems. It also allows the user the option of adding
external file protocols as they become available.

=======================
Modem Modes
=======================

The PM2400SA MNP is a modem of many modes. It is essential
that the user understand the various modes and the
implications of each upon the modem's operation. This
section details the different aspects of each mode.

Standard versus MNP Operation
--------------------------------------

The first major division of the many modes has already
been explained in the discussion above about the modem's
operational states. The PM2400SA MNP will operate as
either a standard Hayes compatible modem or as a modem
using the Microcom Networking Protocol (MNP). Within
either of these operational states, standard or MNP, the
modem will always be either in the command mode or the
on-line mode.

When power is first applied, the modem comes up in the
Command Mode. In this mode, the modem is looking at
everything you type on the keyboard. It is constantly
checking to see if you've typed a valid AT command. When
it detects a valid command, it will execute that command
for you. In the command mode, you may ask the PM2400SA MNP
to answer the phone, hang up or dial, change an S-Register
value, or perform any number of other command functions.

The other condition is the On-Line Mode. In this second
mode, the modem is transmitting all the data it receives
down the phone line to the other modem. The PM2400SA MNP
is constantly checking (depending on configuration) the
state of the DTR (Data Terminal Ready) signal and for the
presence of a carrier from the remote modem. If the
carrier is present, the modem asserts the DCD (Data
Carrier Detect) signal.

It is also watching the local data stream for the escape
sequence. The default escape sequence is *+++. When the
proper escape sequence or change in the state of DCD or
DTR occurs, the PM2400SA MNP returns to the Command Mode
where it waits for your next AT command.

Don't be concerned if you don't understand the meaning of
DCD, DTR, or what an S-Register might be. Each topic will
be dealt with elsewhere in this manual. For now, you
simply need to understand that the DCD and DTR signals are
two of a group of signals which are collectively called
handshaking signals. The handshaking signals allow the
computer and the modem to coordinate their efforts in the
overall scheme of telecommunications.

When operating in the standard, Hayes compatible state,
this selection between the command mode or the on-line
mode is the end of the story. There are no more additional
modes to be concerned about during standard, Hayes
compatible, operations.

When operating in the MNP state, however, the selection
between the command mode and the on-line mode is just the
beginning. The on-line mode for the MNP operational state
is further subdivided into the direct, normal, reliable,
and auto-reliable modes. Each of these has specific
attributes that impact upon how the modem will function.
One of the primary distinctions between the standard modem
state and the MNP modem state is bidirectional data
buffering. This capability is available only in the MNP
state. Bidirectional buffering allows the modem to operate
with the serial port and the modem port set for different
data rates. This facility is crucial to the
error-correcting function of the MNP state.

In this document, serial port is used to define the
logical data communication link between the local computer
and the local modem. The physical conformation of that
link is irrelevant. For an external modem, that physical
structure would include the computer's serial I/O card,
the RS232 cable, and the DB25 connector on the rear of the
modem. For an internal modem, the physical components
associated with the logical serial port would be the
computer's bus slot connector, the local modem's edge
connector, as well as the supporting circuitry and
firmware.

Reference to the modem port is also a logical reference.
It pertains to the local end of the modem-to-modem data
communications link. A clear understanding of the meaning
and the distinction between the terms serial port and
modem port is essential to being able to follow the
discussions on flow control and the MNP command
explanations in Appendix C.

==========================
MNP Direct Mode
==========================

The direct mode of the MNP operational state is the
easiest to understand. There is no data buffering in this
mode. Therefore, the serial port and the modem port must
be set for the same data rate. If the link between the
PM2400SA MNP and the remote modem is at 2400 bps, then the
local terminal must talk to the PM2400SA MNP at 2400 bps.

Functionally, the on-line direct mode of the MNP
operational state is the same as the on-line mode of the
standard Hayes compatible state. The data is not buffered,
the port speeds must be the same, and no hardware MNP
error correction takes place.

========================
MNP Normal Mode
========================

The normal mode can be used to communicate with just about
any other modem, including standard non-MNP modems. The
PM2400SA MNP will fall back to the normal mode if an
auto-reliable link negotiation with the remote modem
fails.

Data buffering does take place in the normal mode. With
bps adjust off (see AT\Jn in Appendix C) the serial and
the modem ports can operate at different speeds. For
example, in the MNP normal mode, the local terminal can
talk to the modem at 9600 bps while the local modem is
connected to the remote modem at 2400 bps. To do this,
however, will require that your local terminal software
allows turning off its auto-baud feature.

MNP hardware error correction is not active in the normal
mode.

=======================
MNP Reliable Mode
=======================

The reliable mode uses the Microcom Network Protocol (MNP)
reliable link to provide hardware error detection and
retransmission when a data error occurs. Although MNP is
generally referenced as an error-correction protocol, it
actually re-sends the data sensed as faulty until either
it is received correctly or the connection terminates.

The MNP reliable link uses flow control on the serial port
connection between the local terminal and the PM2400SA
MNP. Transmitted data directed to the remote system is
received from the local terminal and buffered in the local
modem. When a data transmission error is sensed on the
modem-to-modem link, the PM2400SA MNP continues to accept
data into the buffer up to the buffer limit. It also
re-sends the data frame sensed as faulty to the remote
system via the modem-to-modem link.

Operation of the MNP reliable link is transparent to the
user. It does not need any additional hardware or special
software. The only requirement is that the remote system
have an MNP modem which supports an MNP reliable link and
flow control.

You may not want to use certain software error-correcting
protocols with the MNP reliable link, however. This
redundant error checking will only reduce the efficiency
of the MNP reliable link. There are file transfer
protocols available which are designed to be used with
hardware error-correcting modems such as the PM2400SA MNP.
Two of these file transfer protocols are IMODEM and
YMODEM-G. (Practical tests have shown ZMODEM to perform
within a few percentage points of the other protocols.)

In the reliable mode, the PM2400SA MNP will only connect
with another modem capable of establishing an MNP reliable
mode link. When the connect is made, it immediately
attempts to establish an MNP reliable link. If this
attempt fails, the PM2400SA MNP disconnects. Below is a
list of the reasons why the attempt to secure an MNP
reliable link might fail.


o The remote modem does not support an MNP reliable link.

o The remote modem is an MNP modem, but is not in the
proper mode.

o The telephone connection is so poor and noisy that even
an MNP reliable link connection would be unable to
assure dependable communications.

When using the reliable mode, it is important that you
know the capabilities and status of the remote system. If
you call a non-MNP modem while in the reliable mode, your
connection will fail. If you are unable to obtain the
appropriate information about the remote system, you will
probably want to use the auto-reliable mode.

===========================
MNP Auto-Reliable Mode
===========================

Since it is not always possible to know the type and
status of the remote modem, the PM2400SA MNP supports the
auto-reliable mode. In this mode, after the initial
connection is made, the PM2400SA MNP looks at the data
stream from the remote modem for incoming MNP characters.
If the appropriate characters are detected within the
first four seconds, the PM2400SA MNP tries to establish an
MNP reliable link.

If it cannot do this and bps adjust is ON (AT\J1) while
data buffering is OFF (AT\C0), the modem will make a
direct mode connect. On the other hand if bps adjust is
OFF (AT\J0), the PM2400SA MNP will fall back to a normal
mode connection and use flow control if it is enabled.
Please see Appendix C for details of the AT\Jn and AT\Cn
commands.

If the modem is set to auto-answer incoming calls in the
auto-reliable mode, this 4-second period can be reduced by
using the auto-reliable fallback character in conjunction
with the AT\C2 command. AT\C2 directs the modem to not
buffer data and switch to the normal mode upon receipt of
the fallback character defined by the AT%An command.
Under the foregoing conditions, when the PM2400SA MNP
detects the auto-reliable fallback character it stops
checking for the MNP identification characters and
immediately falls back to a normal connection.

For example, assume that the PM2400SA MNP is set to
auto-answer in the auto-reliable mode and AT%A13 is
active. If non-MNP callers to the PM2400SA MNP were to log
on by sending a carriage return, the modem would answer
and immediately connect in a non-reliable mode. MNP modems
would always send the MNP identification characters before
passing data. Therefore, a reliable connection would
already be established before the carriage return (ASCII
13) is received by the PM2400SA MNP. Once the MNP
characters have been detected, the PM2400SA MNP will
ignore the fallback character.

The auto-reliable mode will probably be the most often
used configuration. As stated before, experimentation and
experience in conjunction with careful study of the
command language will indicate what works best for your
application.

-----------------------------------
Paul E. Hansen, SysOp
Practical Peripherals
OPUS BBS (818) 706-2467
-----------------------------------


 December 14, 2017  Add comments

Leave a Reply