The Hayes AT command set is the industry standard method of communicating with modems. The information listed here is a general set, some modems might have some different features as well.
'AT' or 'at' always precedes a command. The modem needs these two letters to adjust itself to the settings of the PC’s comport. The modem then switches automatically to the defined baud rate and parity, until the next command is issued or the modem is turned off. The modem will not respond to any commands not preceded by an AT.
The modem recognises following formats :
1 or 0 start bits, 7 or 8 data bits, no, odd or even parity and 1 or 2 stop bits.
The commands can be issued at a rate between 300 and 115,000bps. In V.23 mode, the commands are sent at 1,200bps. The modem’s replies are then sent at 75bps to the PC.
The command interpreter recognises AT and at, but not At or aT. Both characters have to be sent in upper- or lowercase and must be sent directly after one another.
| +++ | Switch from data mode to command mode without dropping the line. A second before and after this command, no other character may be sent to the modem, including a <CR>. |
| A/ | Repeat last command, no <CR> |
|
ATA |
Answer incoming call When you want to answer a call manually, you type this command after a ring has appeared on the screen of your Terminal emulator. |
|
ATBn |
Select protocol :Bell or CCITT ( ITU-T ) This command only affects V.22 orV.21 |
|
n=0 CCITT V.22 or V.21 n=1 Bell212 or 103 |
|
ATDTn |
Dial a telephone number After issuing this command, the modem will attempt to establish a connection and dial the number n. The call can be aborted at any stage before the connect message appears, by entering any character except Linefeed. |
|
Options to the command D: W Wait for dial tone. When using a PABX this is used to wait for the second dial tone. Note: not all PABXs give a second dialling tone. Consider using "@" instead. @ Wait for silence for 5 seconds. , Pause for 2 seconds (S8) ! Flash (on-hook for value in S29) ; Return to command mode after dialling. P Pulse dial T Tone dial n The telephone number to be dialled Sn Dial number stored in directory entry &Zn where n=0..19. The selected number is shown on the screen for verification. J Perform MNP10 link negotiation at highest supported speed (for this call only). L Redial last number. ^ Disable calling tone, this call only. |
ATEn |
Command echo to host. With this command you can select if the modem should return all the commands to the screen or not. This is useful to check if all characters are received by the modem. If characters appear double on the screen, disable echoing by the modem or by your terminal. The value of ATE can be written in the RAM of the modem using AT&W. |
n=0 Commands are not echoed |
|
n=1 Commands are echoed |
ATFn |
Select transmission mode/speed These commands are not valid for V.34 modems. The equivalent command for the V.34 modems is +MS, please refer to this command. |
|
n=0 Auto-mode |
|
|
n=1 V.21 300bps |
|
|
n=3 V.23 75Tx/1200Rx with AT%F1 V.23 1200Tx/75Rx with AT%F2 |
|
|
n=4 V.22 1,200bps |
|
|
n=5 V.22bis 2,400bps |
|
|
n=6 V.32bis 4,800bps |
|
|
n=7 V.32bis 7,200bps |
|
|
n=8 V.32bis 9,600bps |
|
|
n=9 V.32bis 12,000bps |
|
|
n=10 V.32bis 14,400bps |
|
ATHn
|
Go on-hook, hang up. |
|
n=0 Go on-hook (Hang up) |
|
|
n=1 Go off-hook |
|
ATIn |
Identifiers |
|
n=0 Product code |
|
|
n=1 Pre-computed Checksum |
|
|
n=2 Returns OK |
|
|
n=3 Returns OK |
|
|
n=4 OEM String |
|
|
n=5 .. 11 Returns OK |
|
|
n=12 ROM Checksum |
|
|
n=13 RC Version number |
|
|
n=14 Shows Firmware version |
|
|
n=15 Shows selected country |
|
|
n=17 GSM option |
|
|
n=18 Shows Supported GSM Kit (GSM-ready™ only) |
|
ATLn
|
Speaker volume settings. With this command the speaker volume can be set. |
|
n=0 Lowest speaker volume |
|
|
n=1 Low speaker volume |
|
|
n=2 Medium speaker volume |
|
|
n=3 Highest speaker volume |
|
ATMn |
Speaker control |
|
n=0 Speaker always off |
|
|
n=1 Speaker on until carrier detected |
|
|
n=2 Speaker always on |
|
|
n=3 Speaker on only while answering |
|
ATNn
|
Select Automode Connection speed set to that inS37, if S37=0, DCE rate equals last DTE rate or AT command. This command is not longer valid for the V.34 modems. |
|
n=0 Automode disabled |
|
|
n=1 Automode enabled |
|
ATOn
|
Return to data mode |
|
n=0 Return to data mode from command mode, only if on-line. |
|
|
n=1 Return on-line and initiate retrain (2400bps or higher). |
|
ATQn
|
Result codes. If the quiet mode is enabled, the responses from the modem are not sent to the PC. |
|
n=0 Modem returns result codes |
|
|
n=1 Quiet mode enabled. Modem gives no result codes. |
|
ATSn
|
Sets and reads the selected register n is a numeric value, varying between 0 and 255 (depending on the register). |
|
ATSn=x Sets register n to the value x |
|
|
ATSn? Reads the value of register n |
|
ATVn
|
Result codes in numerical or verbose form |
|
n=0 Returns the code in numerical form |
|
|
n=1 Full-word result codes |
|
ATWn
|
Connect messages formatting |
|
n=0 DTE rate (connect rate) |
|
|
n=1 Hayes 4 line format : Carrier, Protocol, Compression, DTE rate |
|
|
n=2 Result code is DCE rate (carrier rate) |
|
ATXn
|
Extended Result codes X3 and X1 set the modem for Blind Dialling. This option is country specific, because some countries do not allow blind dialling. |
|
n=1 Ignore dial tone and busy tone |
|
|
n=2 Ignore busy tone |
|
|
n=3 Inner dial tone |
|
|
n=4 Modem recognises dial tone and busy tone |
|
ATYn
|
Long Space disconnect If the modem receives, after activating this function, a BREAK-signal of at least 1.6 seconds coming from the remote PC, it will send a BREAK-signal of 4seconds back to the remote PC before hanging up the telephone line. |
|
n=0 Disable long space disconnect |
|
|
n=1 Enable long space disconnect |
|
ATZn
|
Resetting the modem If this command is issued to the modem during a connection, the modem will drop the line. According to the parameter n, the modem will restore the values stored in the non-volatile RAM (See also &W). |
|
n=0 Restore stored profile 0 |
|
|
n=1 Restore stored profile 1 |
|
AT&Cn
|
Carrier-detect Data Carrier Detect (DCD) is a hardware signal that notifies the software that the modem is in communication with another modem. Most software will not start-up properly if the DCD is active. Default is &C1. |
|
n=0 DCD is always active |
|
|
n=1 DCD is active if modem is on-line |
|
AT&Dn
|
Data Terminal Ready settings |
|
n=0 Modem ignores DTR |
|
|
n=1 Go to command mode on ON-to-OFF DTR transition. |
|
|
n=2 Hang up on DTR-drop and go to command mode |
|
|
n=3 Reset (ATZ) on DTR-drop. Modem hangs up. |
|
AT&Fn
|
Restore factory configuration |
|
n=0 Use profile 0 |
|
|
n=1 Use profile 1 |
|
AT&Gn
|
Select guard tone This command may not be permitted in some countries. |
|
n=0 Disables guard tone |
|
|
n=1 Disables guard tone |
|
|
n=2 Selects 1800Hz guard tone |
|
AT&Kn
|
Flow Control Flow control is the use of characters or RS232 signals to start and stop the flow of data to avoid data loss during buffering. This is extremely important when the DTE/DCE rate is different from the line speed, e.g. when data compression is used. The DTE/DCE rate must be higher then the line speed. RTS/CTS flow control (Hardware flow control) The PC will send data to the modem. The modem will store this data in a buffer. When this buffer is full, the modem will drop the CTS-line, telling the PC that it has to stop transmitting data until the signal raises again. If the RTS-signal is OFF, transmitting data to the PC is stopped until the signal switches to ON. XON/XOFF flow control (Software flow control) If the modem receives an XON-character (S32) from the PC, it stops transmitting data to the PC until it receives a XOFF-character (S33). The process is similar if the PC is sending data to the modem. NOTE : The preferable setting is RTS/CTS flow control |
|
n=0 Flow control disabled |
|
|
n=3 RTS/CTS flow control (Hardware) |
|
|
n=4 XON/XOFF flow control (Software) |
|
|
n=5 Transparent XON/XOFF flow control |
|
|
n=6 RTS/CTS and XON/XOFF flow control |
|
AT&Pn
|
Pulse dial make-break Settings may be locked depending on country selection. Default is also country dependent. |
|
n=0 61/39 ratio at 10pps |
|
|
n=1 67/33 ratio at 10pps |
|
|
n=2 39/61 ratio at 20pps |
|
|
n=3 33/67 ratio at 20pps |
|
AT&Qn |
Sync Async Mode This command is used to control the connection modes permitted. |
|
n=0 Selects direct async operation. |
|
|
n=1 Selects synchronous connect mode with async off-line command mode. |
|
|
n=2 Selects synchronous connect mode with async off-line command mode and enables DTR dialling. |
|
|
n=4 Selects Autosync™mode |
|
|
n=5 The modem will try to negotiate an error corrected link. |
|
|
n=6 Selects async operation in normal mode. |
|
AT&Rn
|
CTS/RTS option This selects how the modem controls CTS. CTS operation is modified if hardware FC is selected (AT&Kn). |
|
n=0 In sync mode, CTS tracks the state of RTS. In async mode, CTS acts according V.25 bis handshake. |
|
|
n=1 In sync mode CTS is always on. In asynchronous mode, CTS will drop only if required by flow control. |
|
AT&Sn
|
DSR Override This command selects how the modem will control DSR. |
|
n=0 DSR will remain on at all times. |
|
|
n=1 DSR will become active after answer tone has been detected and inactive after the carrier has been lost. |
|
AT&Tn |
Test and diagnostics The modem will perform selected test and diagnostic functions according to the parameter supplied. A test can be run only when in an asynchronous operation in non-error-correction mode. To terminate a test in progress, the escape sequence must be entered first, except for parameters 7 and 8. |
|
n=0 Terminates test |
|
|
n=1 Initiates local analogue loop-back |
|
|
n=2 Returns ERROR |
|
|
n=3 Initiates local digital loop-back |
|
|
n=4 Enables digital loop-back acknowledgement for remote request. |
|
|
n=5 Disables digital loop-back acknowledgement for remote request. |
|
|
n=6 Requests a remote digital loop-back without self test. |
|
|
n=7 Requests a remote digital loop-back with self test. |
|
|
n=8 Initiates local analogue loop-back with self test. |
|
AT&Vn |
Display current configuration and stored profiles Reports the current (active) configuration, the stored (user) profiles, and the first four stored telephone numbers. |
|
AT&Wn
|
Store current configuration |
|
n=0 Store current configuration in profile 0 |
|
|
n=1 Store current configuration in profile 1 |
|
AT&Xn
|
Select Synchronous Clock Source Selects the source of the transmit clock for the synchronous mode of operation. |
|
n=0 Selects internal timing |
|
|
n=1 Selects external timing |
|
|
n=2 Selects slave receive timing |
|
AT&Yn |
Designate a default reset profile Selects which user profile will be used after a hard reset. |
|
n=0 The modem will use profile 0 |
|
|
n=1 The modem will use profile 1 |
|
AT&Zn=x |
Store telephone number |
|
n=0 to 3 and x= dial string |
|
AT%En |
LQM and Auto-retrain or FB/FF Controls whether or not the modem will automatically monitor the line quality and request a retrain or fall back/fall forward depending on the line quality. |
|
n=0 Disable Line Quality Monitor and auto-retrain |
|
|
n=1 Enable Line Quality Monitor and auto-retrain |
|
|
n=2 Enable Line Quality Monitor and fall back/fall forward. (V.34 only) |
|
AT%Cn |
Enable/Disable data compression Enables or disables data compression negotiation. The modem can only perform data compression on an error corrected link. |
|
n=0 Disables data compression |
|
|
n=1 Enables MNP5 |
|
|
n=2 Enables V.42bis |
|
|
n=3 Enables both V.42bis andMNP5 data compression. |
|
AT\Gn |
Modem to modem flow control In non-error correction mode, the modem enables or disables the generation or recognition of modem to modem XON/XOFF flow control according to the parameter supplied. In error correction mode, the setting of \G is ignored. |
|
n=0 Disables modem-to-modem flow control |
|
|
n=1 Enables modem-to-modem flow control |
|
AT n |
Operating mode This command controls the preferred error correcting mode to be negotiated in a subsequent data connection. |
|
n=0 Normal speed buffered mode.(&Q6) |
|
|
n=1 Serial interface selected.(&Q0) |
|
|
n=2 Reliable connection ( FirstV.42 the MNP4). Failure to make a reliable connection results in modem hanging up. |
|
|
n=3 Auto reliable mode ( FirstV.42, then MNP4 then speed buffered ) |
|
|
n=4 V.42 (LAPM) . If connection fails, modem hangs up. |
|
|
n=5 MNP4 EC mode. Failure results in hanging up. |
|
\An
|
Select maximum MNP block size |
|
n=0 64 characters |
|
|
n=1 128 characters |
|
|
n=2 192 characters |
|
|
n=3 256 characters |
|
)Mn
|
Enable cellular power level adjustment Enables or disables automatic adjustment of the transmit power level to accommodate the signalling requirements of cellular telephone equipment. |
|
n=0 Disables transmit power level adjustment during MNP10 link negotiation. |
|
|
n=1 Enables transmit power level adjustment during MNP10 link negotiation. V.34 : Uses the @Mn value to establish initial cellular connection. After connection power level is determined by modem. |
|
|
n=2 Enables transmit power level adjustment during MNP10 link negotiation. Uses the @Mn value to establish initial cellular connection. After connection power level is fixed. (V.34 only) |
|
-Kn
|
MNP Extended Services Enables or disables conversion of a V.42 connection to a MNP10 connection. |
|
n=0 Disables V.42 LAPM to MNP10 conversion |
|
|
n=1 Enables V.42 LAPM to MNP10 conversion |
|
|
n=2 Enables V.42 LAPM to MNP10 conversion, inhibits MNP ES initiation during V.42 LAPM answering mode detection Phase (V.34 only) |
V.34 Commands
Following commands are valid only for V.34 modems.
|
@Mn |
Initial Cellular Power Level setting Sets the initial power level for up shift at connect until line conditions can be determined. |
|
n=0 -26dBm (Default) |
|
|
n=1 -30dBm |
|
|
n=2 -10dBm |
|
|
n=3..10 -10dBm |
|
|
n=11..31 -11dBm.. -31dBm |
|
:En |
Compromise Equaliser Enable command Enables or disables the V.32compromise equaliser. This command can be used when the modem is attached to either a flat line or a cellular connection. |
|
n=0 Disables the equaliser |
|
|
n=1 Enables the equaliser |
|
+MS |
Select Modulation |
||||||||||||||||||||||||||||||||
|
+MS=<mod>[,[<automode>][,[<min-rate>][,[max_rate>]]]] response : +MS:11,1,300,28800 (example) Sub-parameter definitions: <mod>
<Automode> This is an optional numeric value which enables or disables automatic modulation negotiation using V.8 or V.32bis Annex A. The options are : 0 Automode disabled 1 Automode enabled using V.8 orV.32bis Annex A
The default value is 1, which enables automode. Note, however, there are modulations for which there is no automatic negotiation, e.g., Bell 212. <Automode>=1 The modem connects at the highest possible rate in accordance with V.8 or V.32bis Annex A if V.8 is not supported by the remote modem. A. If <max_rate> is greater than the highest speed supported by then modulation specified by <mod>, the modem automodes down from the highest rate to the selected modulation. For example : +MS=10,1,1200,24000 selects automoding down from V.32bis 14400bps. B. To emulate issuance of the N1S37=x sequence command, specify the modulation and the rate to start automoding down from using <mod> and<max_rate>, respectively. Examples : +MS=11,1,300,16800 automode at V.34 16800bps (S37=?) +MS=9,1,300,12000 automode at V.32bis 12000bps (N1S37=10). <Min_rate> is an optional number which specifies the lowest rate at which the modem may establish a connection. The value is decimal coded, in units of bps, e.g. 2400 specifies the lowest rate to be 2400. The default is 300 for 300bps. <Max_rate> is an optional number which specifies the highest rate at which the modem may establish a connection. The value is decimal coded, in units of bps, e.g. 14400 specifies the lowest rate to be 14400. The default is 33600 for 33600bps.
|
|||||||||||||||||||||||||||||||||
|
+MS? Reports selected options response :+MS:(0,1,2,3,8,9,10,13,64,69,74),(0,1),(300-28800),(300-28000) |
|
AT+CBST |
Select Bearer Service Set command selects the bearer service <name> with data rate <speed>, and the connection element <ce> to be used when data calls are originated |
|
+CBST=[<speed>[,<name>[,<ce>]]] <speed> 0 autobauding (automatic selection of the speed) 2 1200 bps (V.22) 66 1200 bps(V.110) 4 2400 bps (V.22bis) 68 2400bps (V.110) 6 4800 bps (V.32) 70 4800 bps(V.110) 7 9600 bps (V.32) 71 9600 bps(V.110) <name> 0 asynchronous modem <ce> 0 transparent 1 non-transparent |
|
*NCnn |
Country select To change the country settings, use following procedure : AT*NCnn Modem responds with OK ATZ Modem responds with OK Note : Some counties do not allow their country settings to be altered. |
nn= 40 Australia |
|
nn=1 Austria |
|
nn=2 Belgium |
|
nn=3 Denmark |
|
nn=4 Finland |
|
|
nn=5 France |
|
|
nn=6 Germany |
|
|
nn=17 Greece |
|
|
nn=10 Netherlands |
|
|
nn=7 Ireland |
|
|
nn=8 Italy |
|
|
nn=43 Japan |
|
|
nn=26 Namibia |
|
|
nn=11 Norway |
|
|
nn=12 Portugal |
|
|
nn=27 South Africa |
|
|
nn=13 Spain |
|
|
nn=14 Sweden |
|
|
nn=15 Switzerland |
|
|
nn=16 U.K. |
|
|
nn=22 United States |