You can configure and communicate with your modem sending commands to it through its assigned COM port using serial or visa VIs and functions. Most modems use the Hayes AT Command Set. These are short commands strings each prefaced by the letters AT (for "attention"). This Knowledge Base describes some basic syntax for AT commands and gives examples of commands that can be used to dial and hang up. To get more information about the commands that your modem supports, please refer to your modem's user manual.
Some modems respond to the "AT$" command by returning the modem's supported command set as a form of online help. After installing the modem in your computer, you can check the COM port that it was assign to by going to
Start» Settings» Control Panel» Modem. Each modem has an initialization string which consist of a series of commands that set the communication parameters of the modem such as the dialing mode, busy signal detection, and many others. Again, please refer to your modem's user manual for the appropriate initialization string.
A command string should start with "AT", except for the commands "A/" (repeat command) and "+++" (escape). The modem will not respond to any commands not preceded by an AT. The commands can be typed in either lower case or upper case, but not mixed. Several commands can be typed in one line. In general, each line can contain up to 40 characters, including spaces and carriage returns. Commands and command strings must be terminated with a carriage return, except +++ and A/.The following table contains some of the frequently used commands:
Command |
Description |
AT |
ATtention - This prefix begins all commands but "A/" and "+++" |
+++ |
Escape - Allows you to return to command mode to reset the configuration after you have connected to another modem or to hang up |
A/ |
Repeat last command |
D |
Dial command - Format of the command: ATD [string], where [string] is the telephone number. It can contain up to 45 characters |
P |
Pulse dialing - This command modifies the D command. Format of the command: ATDP[string] |
T |
Tone dialing - This command modifies the D command. Format of the command: ATDT[string] |
E<0 or 1> |
Echo mode (0=OFF, 1=ON) - When echo is turned on, the modem will return all commands back to computer, instead of replying with an OK or a zero when the command is executed |
H<0 or 1> |
0-Hang up phone, 1-Go off hook |
I |
Inquiry - returns information about the modem |
M |
Monitor speaker (0=speaker off, 1=speaker on) |
Z |
Modem reset |
$ |
Returns |
For example to dial 800-433-3488 using tones, send
+++ATDT8004333488
To find more information about AT commands, see the link below titled "The Hayes Command Set" or search on the Internet for "Hayes AT Commands". You can also take a look at the Communication Toolkit developed by one of our Alliance Members, Microsys, in the link below.