Use the basic at command of the modem

Source: Internet
Author: User
Tags call back unsupported

Note: These are common Modem commands. Some commands may not apply to all modem instances. If any problem occurs, see the modem documentation or contact the modem manufacturer's Technical Support Department.

All commands (with two exceptions) must start with the character. The two exceptional commands are escape sequences (++) and repeated commands (/). The command line prefix (letter at) and subsequent command sequence can be entered in upper or lower case (for the old MODEM model), but generally do not mix the input. You can enter multiple commands in each line. You can separate them with spaces for ease of reading. The modem command interpreter ignores these spaces, but includes these spaces within the number of characters in the input line. For most modem, the command line buffer can accept a maximum of 39 characters, including characters a and T. Spaces, carriage returns, and any line breaks do not enter the buffer zone, nor are they limited by 39 characters. Some modems have a line length limit of at least 24 characters. Other modems may have large buffers. For different modem types, see the modem related documentation. If 39 characters are entered or the command line has syntax errors, the modem returns an error.CodeAnd ignore the command input.

 

Basic commands

The following basic AT commands allow you to call, select a dialing method (audio or pulse), control the speaker volume, and perform other basic modem operations.

Important: you must use the AT command in the "command" mode of the communication software. For more information about entering the "command" mode, see the document attached to the communication software.

At: This prefix starts all commands sent from the local device to the modem (with two command exceptions) and notifies the modem of attention! Command.

D. Dialing command. Use the D command to call the phone number through the command line. The command format is as follows:

ATD [String]

The string parameter can contain a maximum of 45 characters, a telephone number, and a modifier. The modifier tells the modem how to handle the call. Do not use any additional characters, such as parentheses or font size in phone numbers.

++ -- Escape Character Sequence. After connecting to another modem, you may need to return to the command mode to adjust the configuration of the modem, or, more commonly, to stop the modem. So that the keyboard remains idle for at least one second (without pressing any key), and then press the plus sign (+) three times ). This is one of the two commands that do not use the at prefix or do not enter a carriage return. After a while, the modem responds to the OK (normal) message, indicating that the command mode has been returned.

P: pulse dialing. This modifier is located before the phone number after the D command, and notifies the modem to use the pulse service to dial the phone number. For example, to dial the phone number 123-4567 on a pulse Telephone Line, enter "atdp 1234567 ".

T: audio dialing. This modifier uses DTMF audio to select the audio dialing method. Note: When you need to use both audio dialing and pulse dialing, you can use them in the dialing command line. For example, to dial the number 123-4567 on a key, enter "atdt 1234567 ".

Return to the top dialing command Modifier

The command modifier defines other parameters of the modem. It automatically performs some functions when dialing phone numbers. This parameter is valid only when the dial-up string contains these parameters (after the D command. The command used to complete this task is called the command modifier, which is placed in the dial-up string before the command is published.

Syntax: ATD {dial modifier} 1234567 [enter]

;: Continue command mode after dialing. If the number to be dialed is too long and cannot be contained in the command buffer (45 characters in the D command), use the semicolon (;) modifier, divides a dialing string into multiple dialing commands. All commands except the last command must end with; modifier.

,: Pause when dialing. When dialing, the comma (,) modifier causes the modem to pause. The modem will pause for several seconds as specified by S-register S8, and then continue dialing. If the pause time exceeds the value specified in S-register S8, insert multiple commas (,) in the dialing command line, or change the value of S-register S8, you can increase the pause time. In the following example, the command uses a 9 modifier to represent an access (public) external line. Because of the comma (,) modifier, the modem delays dialing before the phone number 5551212.

For example, ATD 9, 5551212 [enter]

! : Use the host to flash. Exclamation point (!) The modifier makes the modem wait (pause) for half a second, which is equivalent to holding down the switch hook key on the phone for half a second. This function is useful when transferring calls.

W: Wait for the subsequent dial tone. The W dial modifier enables the modem to wait for another dial tone before dialing the number following W. The waiting time of the modem depends on the value specified in S-register S7. You can call the modem to call the modem through a dedicated group switch (PBX) or long-distance call service that requires delay during the dialing process. You can use the W command to wait for the second dial-up sound, or use the comma (,) command to pause the fixed time before dialing.

Example: atdt 9 W 1 2155551212 [enter]

A/: -- duplicate. This command does not use the at prefix or carriage return. Enter this command to make the modem repeat the last command, which is most useful for the phone number that repeatedly calls the busy line.

& FN: default factory value. If the modem has a default factory value, this command (where n = 0 or 1) returns all parameters to the selected set with the default factory value, but not all modems.

H: Hang up. This command notifies the modem to "wait" or disconnect the telephone line.

O: online. This command returns the modem to the online mode, which is usually used for subsequent communication after the escape sequence (++.

Zn: reset the modem. This command (where n = 0 or 1) resets the modem to the configuration file that is stored at the unstable memory location 0 (OR 1.

Call back to the top

The following example shows how to call with several modifiers.

ATD 1234567

    • The local modem loses the carrier signal of the remote modem.
    • Issue the hanging command (h ).
    • When the & D2 or & D3 command is valid, the DTr interface signal between the local DTE and the modem is discarded.
The modem calls 1234567 and waits for the carrier of the long-distance or remote modem. If no carrier is detected within the specified time period (for example, as defined in the initial settings in S-register 6), the modem Automatically releases the telephone line and sends no carrier (no carrier) result code. If the carrier is detected, the modem provides the connect result code and enters the online status, allowing communication with the remote modem. When either of the following conditions causes the modem to hang up, return to the command mode, and issue no carrier response, the connection between the two modems is interrupted:

Note: All the commands Based on the hyphen (&) are related to the execution status. They are extensions of the original Hayes command set. At & f1dt9, p5551234 [enter]

This command restores the factory default value, uses audio dial 9 to access the external line, pauses it, and then uses the pulse dial number 555-1234. See the preceding example. Back to the top and manually dial in the phone

The command mode of the communication software should be used to manually dial the phone.

    1. Pick up the phone microphone and dial the number you want to call.
    2. TypeAth1, And then press enter to connect to the modem, and then hung up the microphone.
    3. TypeAt0And then press enter to notify the modem to go online.
Return to the top and respond manually

When the automatic response function (s-register S1) is not used, you can manually respond to the incoming call by entering ATA and then pressing enter when receiving the incoming call. The modem receives the incoming call and enters the online mode.

Online status:

To transmit or receive data, the modem must be online. When a call is made, the modem uses the dialing command to go online. On the remote end, set S-register S0 to any number between 0 and 255. When the modem receives a command to automatically respond to a call, it enters the online status. You can also use the ATA command to implement this function.

Switch back to command mode:

After establishing a connection with a remote modem, you can enter the escape sequence to return the connection to the command mode without interrupting the connection. The escape sequence consists of three plus signs (++.

There is no need to start this sequence by using the attention Code or by entering the escape code and then pressing enter.

Returned online status:

After an escape sequence is sent, the modem can return to the online status. To enable the modem to return online status, send the ATO command. To enable the modem to return online and begin balancing the compensation sequence, use the ato1 command.

Repeat the final command:

Each Command sent to the modem is stored in the command buffer before the next command is sent or before the modem power is disabled. To repeat the last command, Enter command /. A/command does not contain at characters before it, or enter a/command without pressing enter. For more information, see the command reference.

Omitted parameters:

Some commands need to use parameters to completely define them. If the parameter in a command that requires a parameter is omitted, the command uses the default parameter value.

Result code:

The screen displays the modem's response, indicating the result after it processes the command or attempts to process the command. The result code shows the status of the modem or the progress of the Call Sequence, either in text or numeric format. The default value is the text response defined by the atv1 command. To receive a digital response instead of a text response, use the atv0 command. To completely close the response, use the atq1 command.

Command syntax:

All modem control commands have at or at prefixes and end with enter. Case-insensitive mixing (at or at) is not allowed. The at sequence is called the attention command. The attention command is located before all commands except the repeated commands (A/) and escape code (++.

Some commands starting with at can be entered in one line, and each command is followed by a carriage return. Spaces can be inserted between commands for ease of reading, but spaces are not stored in the command buffer with a size of 255 characters. Escape key characters can be used to eliminate errors, but are not used as terminal applications.ProgramSave part of the command buffer. The modem records unsupported commands and returns OK or error.

The modem accepts the new command only after the previous command is fully executed. You can delete a command line at any time by entering Ctrl + X. The at sequence can be followed by any number of commands in order, except for the Z, D, or a commands. Commands that follow Z, D, or a are ignored. The maximum number of characters on any command line is 56 (including a and T ).

Other information can be found at the Hayes and US robotics sites. In addition, the modem manufacturer may provide additional information about the commands supported by your modem. 

Basic commands

The following basic AT commands allow you to call, select a dialing method (audio or pulse), control the speaker volume, and perform other basic modem operations.

Important: you must use the AT command in the "command" mode of the communication software. For more information about entering the "command" mode, see the document attached to the communication software.

At: This prefix starts all commands sent from the local device to the modem (with two command exceptions) and notifies the modem of attention! Command.

D. Dialing command. Use the D command to call the phone number through the command line. The command format is as follows:

ATD [String]

The string parameter can contain a maximum of 45 characters, a telephone number, and a modifier. The modifier tells the modem how to handle the call. Do not use any additional characters, such as parentheses or font size in phone numbers.

+++: Escape Character Sequence. After connecting to another modem, you may need to return to the command mode to adjust the configuration of the modem, or, more commonly, to stop the modem. So that the keyboard remains idle for at least one second (without pressing any key), and then press the plus sign (+) three times ). This is one of the two commands that do not use the at prefix or do not enter a carriage return. After a while, the modem responds to the OK (normal) message, indicating that the command mode has been returned.

P: pulse dialing. This modifier is located before the phone number after the D command, and notifies the modem to use the pulse service to dial the phone number. For example, to dial the phone number 123-4567 on a pulse Telephone Line, enter "atdp 1234567 ".

T: audio dialing. This modifier uses DTMF audio to select the audio dialing method. Note: When you need to use both audio dialing and pulse dialing, you can use them in the dialing command line. For example, to dial the number 123-4567 on a key, enter "atdt 1234567 ".

Return to the top dialing command Modifier

The command modifier defines other parameters of the modem. It automatically performs some functions when dialing phone numbers. This parameter is valid only when the dial-up string contains these parameters (after the D command. The command used to complete this task is called the command modifier, which is placed in the dial-up string before the command is published.

Syntax: ATD {dial modifier} 1234567 [enter]

;: Continue command mode after dialing. If the number to be dialed is too long and cannot be contained in the command buffer (45 characters in the D command), use the semicolon (;) modifier, divides a dialing string into multiple dialing commands. All commands except the last command must end with; modifier.

,: Pause when dialing. When dialing, the comma (,) modifier causes the modem to pause. The modem will pause for several seconds as specified by S-register S8, and then continue dialing. If the pause time exceeds the value specified in S-register S8, insert multiple commas (,) in the dialing command line, or change the value of S-register S8, you can increase the pause time. In the following example, the command uses a 9 modifier to represent an access (public) external line. Because of the comma (,) modifier, the modem delays dialing before the phone number 5551212.

For example, ATD 9, 5551212 [enter]

! : Use the host to flash. Exclamation point (!) The modifier makes the modem wait (pause) for half a second, which is equivalent to holding down the switch hook key on the phone for half a second. This function is useful when transferring calls.

W: Wait for the subsequent dial tone. The W dial modifier enables the modem to wait for another dial tone before dialing the number following W. The waiting time of the modem depends on the value specified in S-register S7. You can call the modem to call the modem through a dedicated group switch (PBX) or long-distance call service that requires delay during the dialing process. You can use the W command to wait for the second dial-up sound, or use the comma (,) command to pause the fixed time before dialing.

Example: atdt 9 W 1 2155551212 [enter]

A/: -- duplicate. This command does not use the at prefix or carriage return. Enter this command to make the modem repeat the last command, which is most useful for the phone number that repeatedly calls the busy line.

& FN: default factory value. If the modem has a default factory value, this command (where n = 0 or 1) returns all parameters to the selected set with the default factory value, but not all modems.

H: Hang up. This command notifies the modem to "wait" or disconnect the telephone line.

O: online. This command returns the modem to the online mode, which is usually used for subsequent communication after the escape sequence (++.

Zn: reset the modem. This command (where n = 0 or 1) resets the modem to the configuration file that is stored at the unstable memory location 0 (OR 1.

Call back to the top

The following example shows how to call with several modifiers.

ATD 1234567

    • The local modem loses the carrier signal of the remote modem.
    • Issue the hanging command (h ).
    • When the & D2 or & D3 command is valid, the DTr interface signal between the local DTE and the modem is discarded.
The modem calls 1234567 and waits for the carrier of the long-distance or remote modem. If no carrier is detected within the specified time period (for example, as defined in the initial settings in S-register 6), the modem Automatically releases the telephone line and sends no carrier (no carrier) result code. If the carrier is detected, the modem provides the connect result code and enters the online status, allowing communication with the remote modem. When either of the following conditions causes the modem to hang up, return to the command mode, and issue no carrier response, the connection between the two modems is interrupted:

Note: All the commands Based on the hyphen (&) are related to the execution status. They are extensions of the original Hayes command set. At & f1dt9, p5551234 [enter]

This command restores the factory default value, uses audio dial 9 to access the external line, pauses it, and then uses the pulse dial number 555-1234. See the preceding example. Back to the top and manually dial in the phone

The command mode of the communication software should be used to manually dial the phone.

    1. Pick up the phone microphone and dial the number you want to call.
    2. TypeAth1, And then press enter to connect to the modem, and then hung up the microphone.
    3. TypeAt0And then press enter to notify the modem to go online.
Return to the top and respond manually

When the automatic response function (s-register S1) is not used, you can manually respond to the incoming call by entering ATA and then pressing enter when receiving the incoming call. The modem receives the incoming call and enters the online mode.

Online status:

To transmit or receive data, the modem must be online. When a call is made, the modem uses the dialing command to go online. On the remote end, set S-register S0 to any number between 0 and 255. When the modem receives a command to automatically respond to a call, it enters the online status. You can also use the ATA command to implement this function.

Switch back to command mode:

After establishing a connection with a remote modem, you can enter the escape sequence to return the connection to the command mode without interrupting the connection. The escape sequence consists of three plus signs (++.

There is no need to start this sequence by using the attention Code or by entering the escape code and then pressing enter.

Returned online status:

After an escape sequence is sent, the modem can return to the online status. To enable the modem to return online status, send the ATO command. To enable the modem to return online and begin balancing the compensation sequence, use the ato1 command.

Repeat the final command:

Each Command sent to the modem is stored in the command buffer before the next command is sent or before the modem power is disabled. To repeat the last command, Enter command /. A/command does not contain at characters before it, or enter a/command without pressing enter. For more information, see the command reference.

Omitted parameters:

Some commands need to use parameters to completely define them. If the parameter in a command that requires a parameter is omitted, the command uses the default parameter value.

Result code:

The screen displays the modem's response, indicating the result after it processes the command or attempts to process the command. The result code shows the status of the modem or the progress of the Call Sequence, either in text or numeric format. The default value is the text response defined by the atv1 command. To receive a digital response instead of a text response, use the atv0 command. To completely close the response, use the atq1 command.

Command syntax:

All modem control commands have at or at prefixes and end with enter. Case-insensitive mixing (at or at) is not allowed. The at sequence is called the attention command. The attention command is located before all commands except the repeated commands (A/) and escape code (++.

Some commands starting with at can be entered in one line, and each command is followed by a carriage return. Spaces can be inserted between commands for ease of reading, but spaces are not stored in the command buffer with a size of 255 characters. The Escape key character can be used to eliminate errors, but is not saved as part of the terminal application command buffer. The modem records unsupported commands and returns OK or error.

The modem accepts the new command only after the previous command is fully executed. You can delete a command line at any time by entering Ctrl + X. The at sequence can be followed by any number of commands in order, except for the Z, D, or a commands. Commands that follow Z, D, or a are ignored. The maximum number of characters on any command line is 56 (including a and T ).

Other information can be found at the Hayes and US robotics sites. In addition, the modem manufacturer may provide additional information about the commands supported by your modem.

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.