Modem Basics
Basics
A modem is a device which converts a computer's digital information (ones
and zeros) in to an analog signal (like the sine waves from trigonometry),
that is, it converts it into sound. This is called MOdulating. On
the other end, the other modem converts the data back into digital data
(or DEModulates).
(MOdulate + DEModulate = MODEM)
Flow Control
When sending data over the phone lines, the data can flow at different
rates. First, there's the transfer rate between the sending computer and
the sending modem. Second, there's the transfer rate between the two
modems over the phone lines. Third, there's the transfer rate between the
receiving modem and receiving computer. (See the image below.)
Now throw in the fact that the receiving modem can become the sending
modem and the sending becomes the receiving, you now have six different
possible transfer rates. Thus it is likely that one modem will send data
faster than the other modem can handle.
Flow control allows one modem to request the one on the other end to pause
in sending while it catches up.
There are three types of flow control:
- None: Flow control isn't
needed when transmission speed is very slow (300bps). Since minimum
speed requirements for a stable PPP connection is 9600bps, this
wouldn't work for StarNet.
- Software (or XON/XOFF):
Special data characters (usually CTRL-S and CTRL-Q) are used to
indicate when the data flow is to stop and start. However, line
noise or binary files can have those same characters--interfering
with the data flow. This problem makes it impractical for modem
communications.
- Hardware (or RTS/CTS): For
PC modems and internal Macintosh modems, there's special hardware
built on to the modem that handles flow control. On external modems
on the Mac, there are wires in a special cable which handles flow
control.
Error Correction
Error correction is a method of ensuring all the data sent is received and
received in usable form.
The data to be sent is broken down into small blocks called frames. A
checksum is added to that frame. (A checksum is like a tamper-proof seal
on a bottle of medicine--if the contents have been damaged, the seal will
usually reveal it.) If the data doesn't match the checksum, the modem
requests that the frame be resent.
Also, the receiving modem sends an acknowledgement for each frame it
receives. If the sending modem doesn't get the acknowledgement, it resends
the frame. Several frames can be sent before an acknowledgement is
required. The size of the frame and the exact number of frames allowed
before an acknowledgement is required is negotiated between the two modems
when the connection is made.
There are two classes of modem error correction protocols:
- MNP (Microcom Networking
Protocol) with versions 2, 3, 4 and 10
- V.42 is the standard which
uses LAPM (Link Access Procedures for Modems) or can use MNP
versions 2, 3 or 4
Data Compression
You cannot increase the number of bits of data carried over a connection
by a modem, but you can make those bits carry more information. That is,
you can make it so two or three bits of data sent by the modem actually
stands for 10 to 15 bits of actual data.
This compacting is done through compression. Roughly, compression takes
common, repeated series of characters and replaces it with other, shorter
series of characters. For example, imagine how much smaller a text
document would be if common words (like "the", "that", "which", etc.) and
common groups of letters (like "ing", "ous", "ness", etc.) could be
replaced by one or two special characters each.
The size of the document would be decreased, so there'd be less to send
over the modem. The modem on the other end could convert it back back to
the original format after receiving it (assuming both modems are using the
same method to encode/decode the file).
In practice, data compression works best when transfering basic text
files. Most program files or other files (like graphics) are already
compressed to a certain extent. Compressing a compressed file can take
longer and result in a larger file (which defeats the purpose of data
compression for modems).
Data compression isn't required for a stable modem connection. As a matter
of fact, some connection and stability problems can be resolved by turning
off data compression.
There are two types of data compression protocols:
- MNP 5
- V.42bis is the standard and
is superior to MNP 5
Connection Terms
It's not that likely you'll run across the following, but you never know:
- Direct - a throw-back to the
2400 baud and earlier days. There's no flow control, error control
and data compression.
- Normal - Same as Direct
except that flow control is used.
- Reliable - It uses flow
control. The modem will often hang up if it can't establish error
control and data compression connections.
- Auto-Reliable - The same as
Reliable but will fall back to Normal and then Direct before
hanging up.