How to Talk to Your Modem
by Clifton Karnes
You may not realize it, but you can talk directly to your modem in its own language. Give it the right commands, and it will dial your phone, answer incoming calls, and do just about everything else in between.
Human-to-modem communication is simplified by the fact that almost all PC modems speak the same language (with minor variations), a lingo based on commands originated by modem manufacturer Hayes. This language is appropriately called the Hayes command set.
As you might suspect, your modem has to know the difference between you're talking to it and when you're talking to a computer at the other end of the line. To keep these two situations straight, all Hayes-compatible modems have two operating modes: command, in which you can issue commands to the modem, and data, in which the modem simply sends what you type over the phone line.
The best way to get you feet wet with modem talk is to run your telecommunications program and enter its terminal mode. In this mode, as long as you're not connected to another computer, you'll be in command mode, and whatever you type will go directly to the modem.
Although the Hayes manual lists nearly 15 pages of commands, there are really just 10 essentials. Master these, and you're on your way to being a modem expert.
AT Type AT to grab your modem's attention. You precede almost every Hayes command with an AT. Type it now, followed by Enter. (You follow all AT commands with Enter, just the way you do DOS commands.) Your modem should respond with the message OK. It's worth mentioning that some modems require that you enter commands in uppercase; others aren't so choosy.
A Sets the modem to answer mode. If you're talking with a friend and you want to switch to computer communication, one of you types ATA, the other types ATD, and your PCs will take over. Before this magic can happen, however, you need to make sure that both communications programs are set with the same parameters and that the modems for both computers are connected through the phones.
DT This is the main touch-tone dialing command. To call 123-4567, you'd type ATDT1234567. If you don't have a touch-tone phone, use DP, for Dial Pulse.
, The comma pauses for the number of seconds specified in register S8 (see below). This command is handy if you're dialing from a switchboard system, like those found in hotels, that can't handle numbers as fast as you modem rolls them out.
H Hang up. If you've had it, ATH is the command to use.
Ln This is the speaker's loudness. Values for n are 0, 1 (low), 2 (medium), and 3 (high). If you want your modem to annoy as many people as possible at the office, use ATL3.
Mn Controls your modem's speaker, with values for n of 0 (off), 1 (on when dialing), 2 (always on), and 3 (on after carrier detected). To turn your speaker off, for example, type ATM0.
+++ When you're connected to another computer, you're in data mode, and the characters you type go directly to the other computer, they aren't considered commands by your modem. If you type AT in data mode, for example, your computer will simply send the characters A and T to the other end of the line. To get you modem's attention back again, type +++, without a preceding AT and without pressing Enter. Your modem will respond with OK. Now you can enter any commands you wish. To return to data mode and talk to the other computer again, type ATO.
Sn S stands for Store and denotes one of the Hayes registers. There are 16 of these, and although each is interesting in its own way, you'll probably use only two: S8 and S11. The value in S8 tells the modem the number of seconds to pause for a comma. ATS8=3 pauses for three seconds at every comma. S11 is a real sleeper. It controls dialing speed (in milliseconds). To make your modem dial like a demon, try ATS11=55 (smaller numbers make for faster dialing).
Z Resets the registers to their default values. If your modem starts misbehaving, ATZ is a gentle slap in its face.
After you've tried a few of these commands, you may want to look at your terminal program's configuration options. Most programs let you send a command string to the modem. Take advantage of this to make your modem louder or silent or to dial in a blur of speed.
You can also configure your modem by issuing commands directly from the DOS prompt or from a batch file. First, open a COM port with the MODE command; then send the commands to your modem with an ECHO statement. Here's a short batch file that tells your modem to dial the phone at warp factor 5.
That's it. Modem power in a nutshell.