PC Hardware

Modem Commands

Just like the early computers that needed MS-DOS commands to tell them what to do, modems also need commands; also, programmers needed a standard command set to incorporate the use of modems into their software. Unfortunately, there are no true standard command sets for modems because manufacturers are free to create their own. There is, however, one set of commands that has been accepted as a de facto standard. Most modems today are Hayes-compatible. In the early 1980s, Hayes developed the AT command set.

These commands are very useful as diagnostic tools for today's computer professional. To use these commands, make sure the communication software is loaded and the computer is in terminal mode. Unless the modem is set up to autoconnect (online mode), it will be in command mode and ready to accept AT commands. The following table lists some of the more useful AT commands used by computer professionals.

Command Function
AT Lets you know that your modem is plugged in and turned on.
The modem should respond with OK.
ATE1 Echoes the command on the screen.
ATE0 Turns off the echo to the screen. Some modems will not run correctly when the echo is on.
ATH Takes the telephone off the hook. Should elicit a reply of OK or 0 from the modem, or a dial tone and an OH indicator if it's an external modem.
ATM1 Turns the speaker on for the dial tone. ATL0 is the lowest volume.
ATL2 is medium volume.
ATM0 Turns the speaker off.
ATD Takes the phone off the hook and dials a number if one is included with command (for example, ATDT555-2222). The second "T" is for tone; substitute "P" for a pulse phone. Include a "W" (ATDTW) to instruct it to wait for a dial tone before dialing. Include a comma anywhere after the command to instruct it to pause before continuing to dial.
ATQ0 Enables result codes. A troubleshooting aid. Type "ATV1" prior to this command and you will get back verbose result codes (OK-BUSY-CONNECT 2400,9600-COMPRESSION:V.42bis).
ATQ1 Disables result codes.
ATH, ATH0 Hangs up the modem.
ATX This resets your modem to a predefined state. You can configure your own reset state. If it wasn't set previously, it can be reset to the factory's default setting.

by BrainBellupdated
Advertisement: