back to table of contents

Chapter 1. The Origins of the Modem

Why is it important to start with all of this obsolete technology?

Using modems, and supporting users at home or at the office who use modems is difficult and time consuming.   Modems were not designed and developed into their current state overnight. Rather, over 20 years of incremental advances and tweaks have brought us forward to the technology we currently use.  For better and for worse, modems today can still connect to many modems made ten years ago and more.  All of that older technology exists in newer modems as a "fallback" to use when nothing else works. Given that all that old stuff is still inside your brand new V.90 this-years-model modem, perhaps a little look backwards into modem history might be really helpful as an introduction.

The RS-232 Standard

How do you get two devices on your desk connected to each other?  There are a number of standards.  There are serial (RS-232) cables,  parallel (centronics) printer cables, and in recent years new standards such as USB (Universal Serial Bus) and Fire-Wire (IEEE-1394) have been introduced. These later technologies may later make RS-232 obsolete, but it is still the standard way to attach an external modem to your computer.

RS-232 is standard for serial communications between computers and other "intelligent" electronic devices. RS means Recommended Standard. Although the standard has been ratified for over 20 years, and is really known as EIA-232, almost everybody persists in referring to it as RS-232. It’s really the same thing, by either name.

RS-232 is a serial data transfer standard. Serial communications means that bits are sent in single file, one at a time. That means it takes eight bits plus some extra control bits to send out a single byte of data.  These bits are transmitted as a series of positive and negative voltage pulses.  RS-232 dictates all of the electrical characteristics of this standard, and suggests that certain connectors and wiring arrangements be used, to make connecting devices to each other easier.  The connectors are usually DB-9 or DB-25 connectors you are familiar with on the back of your PC.

The alternative approach is a parallel data transmission, such as the parallel port used to communicate with your printer.

RS-232 Cables and Pinouts

Basic RS-232 cables generally use either DB-25 or DB-9 connectors. Most modems and non-PC devices still use DB-25 connectors. Older PC systems, such as clone 80486 PCs, and early Pentium Clone PCs use DB-25 connectors. Newer Pentium II PCs, and most name-brand Pentium and Pentium II PCs use the smaller DB-9 connector. There is no technical difference between the ports, since over half of the pins on the DB-25 connector are unused. The connector on the back of a computer is typically male (so a female cable end plugs into it), and the connector on the back of the modem is typically female (so a male cable end plugs into it). A standard serial cable is a male to female DB-25 cable, typically 6 to 20 feet long. The cable is wired straight through; pin 1 to pin 1, pin 2 to pin 2, and so on. The modem and computer are wired especially so that a straight through cable will enable them to communicate properly.

The way in which a cable should be wired is called a "pinout". Appendix A includes full technical specifications for the RS-232 standard, including typical cable pinouts.

A Null Modem Is Not a Modem

When two computers or a computer and any computer-like intelligent device are plugged directly into each other, some changes to the cable wiring are required. This either takes the form of a specially wired cable, or a small adapter box called a null-modem. A null modem is not really a modem, and it has no electronic components. It is called a Null modem because it removes the need for a modem when two computers need to talk directly to each other. All it really does is cross the transmit and receive wires, and some of the other signal lines so that the two computers can communicate directly with each other. Note that for file transfer, null modem cables are much faster than going

The pinout for a null modem cable is also in Appendix A.

 

A Tale of A Two Modulator/Demodulators

Modems originally appeared as a way to extend the reach of serial communications to allow users to remotely access host computers.

Local Access to a Mainframe Computer via Terminal Device with an RS-232 Port

 

When computers were very expensive, most companies had only a few computers, each accessed by many people. Each person had a terminal device, which had a keyboard and a screen, and either no CPU at all, or else a very limited one, capable only of reading the keyboard and updating the screen. Users at a company were connected to the central computer through serial cables. Unfortunately you could only run a serial cable so far, certainly not from a company headquarters to a persons home. And since the signals on the serial cable are digital, you can’t just hook up the serial cable to a phone, and put the data directly through a phone system. Phone systems are analog devices, designed for transmitting sound, and only transmit sound within a certain frequency range. In addition, the quality of phone lines varies widely, and phone systems are very prone to noise, cross-talk, and interference.

 

 

An oversimplified view of a terminal being used to remotely access a mainframe computer,

using a 110 baud or 300 baud acoustic-coupled modem.

 

 

Modulator/Demodulators

"Captain, perhaps if we modulate it differently…" -- Just about every Star Trek episode

The original Modem theory was very simple. A remote user could dial into a host computer by having a pair of Modulator/Demodulator sets on both ends of a phone line. The word "Modem" was coined from a contraction of this term. When a computer transmitted a positive voltage (a zero in the RS-232 standard), the modem would output sound at one frequency, and when the computer transmitted a negative voltage (a one in the RS-232 standard), another frequency would be output. On the other side of the phone connection, the modem would listen to the frequency of the incoming data and decode the data back into a string of positive and negative voltages. Although modems worked they were extremely primitive by today’s standards.

In the early 70’s if you were very lucky, you could get a shiny new 110 Baud acoustic coupled Modulator/Demodulator that sent 110 bits of data per second, encoded as a series of high and low acoustic noises. When listening to early modems you could actually hear each frequency change. The overall sound could be described as a birdlike "warbling" sound. Even at that time when devices were extremely slow and very simple from an electronics and programming point of view, there were frequent problems with remote communications.

Dumb and Dumber…

The original modems were known as Dumb Modems. They did not accept any commands from the computer, and they could not even dial the phone. An early modem user would pick up his handset, dial the number of a remote phone, listen for a person to answer, and ask them to turn on their modem, and place their handset in the acoustic couplers. Once the remote user could hear the carrier tone that indicated a remote computer was available, and he would then place his handset into his acoustic coupler. The acoustic coupler was a set of two rubber fittings that went around the ear-piece and mouth-piece of your phone’s handset, so your computers could "talk" over the phone the same way you would call a friend.

Manual Answering and Acoustic Coupling

Modems couldn’t dial, and they couldn’t automatically answer the phone. Two human beings, one on each end would start and end a call completely manually. The only way a modem knew if it was supposed to be the originator or the answering modem was a switch on the modem that was placed in one of two positions: Originate, or Answer. The modems behaved in complementary ways depending on the position of this switch. Once turned on, and for as long as it was on, the answering modem emitted a tone called a carrier. The originating modem would listen for the carrier tone, and once a carrier was established, it would start sending data. The carrier tone continued underneath the data, and was the assurance to the calling party that there was still a link between the systems, even when no data was being transferred. A light on the modem labeled "CD" or "Carrier" would be lit of a remote carrier was detected.

Duplex

The originating and answering modem also used different frequencies for their data transmission, so that data could be transmitted in both directions at the same time. Transmitting data in two directions simultaneously is known as "Full Duplex" mode. The opposite of this is known as "Half Duplex" mode, where you can not transmit while receiving, or receive while transmitting.

What’s a Baud, Anyway?

Modem speed, which was originally measured in baud, was rated as the number of transitions between one audio frequency and another. A 110 baud modem could transmit 110 bits of data, composed of 110 discrete audio tones. Each tone would transmit one bit. These bits aren’t very useful until you can reliably assemble them into a string of 8 bits.

8 Bits Makes A Byte, At Least On Paper

The computers not only transmit and read bits from the modem, but they also have to know when the bytes being transmitted are starting and ended. This means a few extra bits are used for time-keeping purposes.

To transmit one whole byte, which is composed eight bits of data, you had to transmit one bit to indicate the start of a byte (called the start bit), followed by the eight data bits, followed by a stop bit to indicate the end of the data. Quite often computers were not fast enough to deal with this original system, so additional delays were introduced. Adding another stop bit, or changing the timing of the stop bits slightly allowed some devices to work that were otherwise reluctant to work. To this day, people ask "What are stop bits and why do I need them?" The answer today is that you almost never do need anything more or less than the default of 1 stop bit. The reasons for its continued existence are largely for backwards compatibility.

 

Word Length - 8 Bits or 7 Bits - What’s the Difference?

There are many variations in the format that data is transmitted in. Many of them have no real use anymore, but we still need to know about it. For example, many older systems were designed to use 7 data bits instead of 8. Using 7 data bits you can transmit decimal values from 0 to 127. This is adequate for transmission of the letters, numbers, punctuation and symbols that make up the ASCII table. I won’t get into the ASCII table here, but suffice to say that the ASCII standard defines that the letter A and the number 3, and every other character that appears on your screen should have a certain fixed binary and numeric representation inside the computer. These numbers range from 0 to 127, and a table of the ASCII character set is reproduced in an appendix to this document. When modems were used primarily for remote access by computer terminals, this ASCII standard was all that was necessary to send the keys that the user typed from her terminal back to the mainframe computer, and for the mainframe computer to send the program output back to the user’s screen.

Parity

Since only seven bits were used for data on these systems, a use was devised for the eighth data bit. Parity checking is a simple error detection scheme. It can detect some errors in data transmission. There are several parity checking schemes. You have a seven bit number, which in reality represents a value from 0 to 127. The eighth bit is like an error check value. It can only be a zero or a one, so it can’t tell you much, but it does have some usefulness.

In Odd Parity mode, you count how many 1’s there are in your data byte so far. Then you set or clear your parity bit so that there will always be an odd number of 1’s in your data byte. If your data byte was the ASCII code for the letter ‘A’, which is 65, then the binary form of that would be:

x1000001

Since there are two bits that are 1’s, you should set your parity bit, so that there will be three 1’s, which is an odd number. The above X indicates the position of the parity bit. When the remote computer reads in the byte, if it knows that it’s supposed to be receiving data in Odd Parity mode, then it will know to discard any bytes it receives that do not have an odd number of bits turned on. Another little light on your terminal or modem used to indicate this by flashing whenever bad data was being received and discarded. You’ll probably never ever see this again, unless you’re in a computer museum, where you can wow your friends with your knowledge of arcane computer trivia.

Even Parity is the opposite of Odd Parity You set or clear the parity bit so that there will always be an even number of bits turned on.

No Parity means that all 8 bits are used for data, and that parity checking is not used. Losing this primitive error checking method is no big deal. Most of the time, you’ll want to use No Parity, and now you’ll even know what it means, if you didn’t before. The exception is when trying to talk to a device that requires this. You will occasionally run into them so it’s worthwhile knowing about this.

Mark and Space parity are the most useless form of parity: Mark means always store a 1 and Space means always store a 0. I have never seen a system that requires using this, but engineers are nothing if not arcane. So, Mark and Space parity are just here to confuse you. Forget about them.

300 Baud Modems

Progress marched onwards, and soon somebody had improved the 110 baud modem, and made a 300 baud modem. It worked just like the 110 baud modems, but it was almost 3 times faster. Whoa. A 110 baud modem could transmit about 11 characters per second, and a 300 baud modem could transmit about 30. Although you can read a screen faster than a 300 baud modem can update it, it was an acceptable speed.

Of course, you give people something and immediately they’re unhappy with it again. People disliked the manual dialing and answering process, and the leaking of room noise in through the acoustic couplers made an already noisy phone system even noisier.

Somebody developed the Auto Modem. It had an RJ-11 jack and plugged into your wall directly. A second RJ-11 jack allowed you to plug your regular phone into the modem, so you didn’t need to buy a $5 phone line splitter at Radio Shack. A nice feature. Usually the modem was big enough that you could set your phone right on top of it, and it would have a nice big row of LED’s showing all kinds of status information on the front of the modem. Around 1975 this was pretty high tech. 23 years later, external modems still haven’t changed much in appearance.

The modem could be instructed by the terminal to dial the phone (auto-dialing), and could be put into auto answer mode, to automatically detect a ring, switch into answer mode, and answer the phone with a friendly screeching sound. The modem received its commands from the computer. Unfortunately, the very first generation of modems all used their own command sets. The most popular among these was the Hayes 300 baud modem.

 

The Hayes AT Command Set

 

 

Hayes developed its own proprietary set of commands for controlling its modems, which quickly became a defacto standard. You will still sometimes see the brand-name "Hayes" attached to the AT Command set standard, although it is pretty much in the public domain now.

The AT command set refers to the AT prefix which indicates a modem command is being sent. AT was a short form for Attention, or "Hey Modem, wake up, I want to send you some commands now." The modem sees that prefix and knows that it is receiving a command. If it doesn’t see the AT command it pretty much ignores what it sees. When the modem turns on it reverts to a default configuration and goes into command mode awaiting instructions from your terminal or computer.

Beyond the basic commands are commands used to configure the modem. This can be one of the most confusing and complex areas of understanding modems, because this part of the AT command sets differs from manufacturer to manufacturer, to the point that it’s hardly standard at all. On the bright side, at least all the commands start with AT. Each family of modems has many similarities, usually to support the features that are common to that family of modem products. The variance means you have to dig in and learn a lot of nitty-gritty details about every modem you use, if you want to be able to troubleshoot them.

Some of the basic commands which everybody supports are:

ATA Answer the phone

ATD5551212 Originate a call, and dial the phone number

ATH0 Hang up

ATM1 Modem speaker on

ATM0 Modem speaker off

ATZ Reset modem

ATI1, ATI2 … Get product and setup information from the modem

ATS0=1 Go into auto-answer mode.

ATS0=0 Turn auto answer mode off.

Using these commands, every aspect of the modem’s operation could be controlled from the terminal. Since these commands were originally developed while people were still using dumb terminals, not true computers or PCs, they were designed to be simple enough to be typed by a user. A user might switch on their dumb terminal, and type in an AT command to control their modem, and hit enter. If the user typed the command correctly, and it was accepted, the modem would respond back with an OK message. If there was something wrong with the command, the modem would respond with an ERROR message.

Connecting and disconnecting from a remote computer are indicated by standard messages being displayed, and these are largely standardized as well, and are considered to be part of the AT Command standards. There are some variations on these messages, but we will discuss those later.

CONNECT A carrier has been detected, and the connection is made

NO CARRIER The remote connection has been lost, or one part or the other has hung up.

Enter the PC, and Terminal Emulation Software

 

At the same time that 300 baud modems were becoming popular, most people were using a dumb terminal to access remote systems. With the introduction of small and inexpensive computers in the late 70s and early 80s, the use of dumb terminals was replaced with small microcomputers. In order for people to be able to use these microcomputers, or PCs as terminals, a variety of software packages were written, called "Terminal Emulators", or just Terminal programs. These terminal programs emulated a variety of very popular real hardware. Most of these terminal programs were designed for people who used Modems, although a terminal emulator would also let you connect locally to your host computer if you were within reach of a standard serial cable. Terminal programs often came with the modem, and at least basic terminal programs still do come with most modems.

 

The Real terminal devices that terminal programs were designed to imitate:

 

In the background is a PDP-11, a popular minicomputer of that day.

The simplest and oldest hardware terminal was known as TTY or a Teletype. A TTY was an early device that often did not even have a video screen. It was composed of a keyboard and a typewriter. It accepted and printed ASCII characters, and in fact the ASCII character set we mentioned before was developed so that standard TTY devices could be used. The capabilities of TTY terminals were very limited, and therefore TTY is the simplest and least useful of the terminal types.

Software-based Terminal programs almost always support TTY as a default standard, and most of them supports one or more of the following more advanced video terminal types:

DEC VT-52 DEC VT-100/102
DEC VT-200/220 IBM 5250
ADM-31 ANSI

Note that ANSI is a variation on VT-102 that was very commonly used on PCs but was not really a physical terminal. These terminal emulations defined things like the codes to be sent to position the cursor on the screen, the codes to clear the screen, and other functions that terminals have to do when drawing the screens that the user sees. When communicating between a terminal and a host device, it is very important that terminal emulation be set to the correct type or your terminal screen will be mostly filled with junk. Correcting the terminal type that the remote computer thinks you are, or correcting your own terminal settings on your terminal program will fix this kind of miscommunication.

back to table of contents