Recent from talks
Nothing was collected or created yet.
Hayes AT command set
View on Wikipedia

The Hayes command set (also known as the AT command set) is a specific command language originally developed by Dale Heatherington and Dennis Hayes[1][2] for the Hayes Smartmodem in 1981.
The command set consists of a series of short text strings which can be combined to produce commands for operations such as dialing, hanging up, and changing the parameters of the connection. The vast majority of dial-up modems use the Hayes command set in numerous variations.
The command set covered only those operations supported by the earliest 300 bit/s modems. When new commands were required to control additional functionality in higher speed modems, a variety of one-off standards emerged from each of the major vendors. These continued to share the basic command structure and syntax, but added any number of new commands using some sort of prefix character – & for Hayes and USRobotics, and \ for Microcom, for instance. Many of these were re-standardized on the Hayes extensions after the introduction of the SupraFAXModem 14400 and the market consolidation that followed.
The term "Hayes compatible" was[3][1] and as of 2018[update] still is important within the industry.[4]
History
[edit]Background
[edit]Before the introduction of the bulletin board system (BBS), modems typically operated on direct-dial telephone lines that began and ended with a known modem at each end. The modems operated in either "originate" or "answer" modes, manually switching between two sets of frequencies for data transfer. Generally, the user placing the call would switch their modem to "originate" and then dial the number by hand. When the remote modem answered, already set to "answer" mode, the telephone handset was switched off and communications continued until the caller manually disconnected.
When automation was required, it was commonly only needed on the answer side; for instance, a bank might need to take calls from a number of branch offices for end-of-day processing. To fill this role, some modems included the ability to pick up the phone automatically when it was in answer mode, and to clear the line when the other user manually disconnected. The need for automated outbound dialling was considerably less common, and was handled through a separate peripheral device: a "dialler". This was normally plugged into a separate input/output port on the computer (typically an RS-232 port) and programmed separately from the modem itself.
This method of operation worked satisfactorily in the 1960s and early 1970s, when modems were generally used to connect dumb devices like computer terminals (dialling out) with smart mainframe computers (answering). However, the microcomputer revolution of the 1970s led to the introduction of low-cost modems and the idea of a semi-dedicated point-to-point link was no longer appropriate. There were potentially thousands of users who might want to dial any of the other thousands of users, and the only solution at the time was to make the user dial manually.
The computer industry needed a way to tell the modem what number to dial through software. The earlier separate dialers had this capability, but only at the cost of a separate port, which a microcomputer might not have available. Another solution would have been to use a separate set of "command pins" dedicated to sending and receiving commands; another could have used a signal pin indicating that the modem should interpret incoming data as a command. Both of these had hardware support in the RS-232 standard. However, many implementations of the RS-232 port on microcomputers were extremely basic, and some eliminated many of these pins to reduce cost.
Hayes' solution
[edit]Hayes Communications introduced a solution in its 1981 Smartmodem by using the existing data pins with no modification. Instead, the modem itself could be switched between one of two modes:
- Data mode in which the modem sends the data to the remote modem. (A modem in data mode treats everything it receives from the computer as data and sends it across the phone line).
- Command mode in which data is interpreted as commands to the local modem (commands the local modem should execute).
To switch from data mode to command mode, sessions sent an escape sequence string of three plus signs (+++) followed by a pause of about a second. The pause at the end of the escape sequence was required to reduce the problem caused by in-band signaling: if any other data was received within one second of the three plus signs, it was not the escape sequence and would be sent as data. To switch back they sent the online command, ATO. In actual use many of the commands automatically switched to the online mode after completion, and it is rare for a user to use the online command explicitly.
In order to avoid licensing Hayes's patent, some manufacturers implemented the escape sequence without the time guard interval (Time Independent Escape Sequence (TIES)). This had a major denial of service security implication in that it would lead to the modem hanging up the connection should the computer ever try to transmit the byte sequence +++ATH0 in data mode. For any computer connected to the Internet through such a modem, this could be easily exploited by sending it a ping of death request containing the sequence +++ATH0 in the payload. The computer operating system would automatically try to reply the sender with the same payload, immediately disconnecting itself from the Internet, as the modem would interpret the ICMP data payload as a Hayes command.[5] The same error would also trigger if, for example, the user of the computer ever tried to send an e-mail containing the aforementioned string.
Commands
[edit]The Hayes command set includes commands for various phone-line operations such as dialing and hanging-up. It also includes various controls to set up the modem, including a set of register commands which allowed the user to directly set the various memory locations in the original Hayes modem. The command set was copied largely verbatim, including the meaning of the registers, by almost all early 300 baud modem manufacturers, of which there were quite a few.
The expansion to 1200 and 2400 baud required the addition of new commands, some of them prefixed with an ampersand (&) to denote those dedicated to new functionality. Hayes itself was forced to quickly introduce a 2400 baud model shortly after their 1200, and the command sets were identical as a time-saving method.[6] Essentially by accident, this allowed users of existing 1200 baud modems to use the new Hayes 2400 models without changing their software. This re-inforced the use of the Hayes versions of these commands. Years later, the Telecommunications Industry Association (TIA)/Electronic Industries Alliance (EIA) formally standardized the 2400-baud command set as Data Transmission Systems and Equipment – Serial Asynchronous Automatic Dialing and Control, TIA/EIA-602.
However, Hayes Communications was slow to release modems supporting higher speeds or compression, and three other companies led: Microcom, U.S. Robotics, and Telebit. Each of these three used its own additional command-sets. By the early-1990s, there were four major command sets in use, and a number of versions based on one of these. Things became simpler again during the widespread introduction of 14.4 and 28.8 kbit/s modems in the early 1990s. Slowly, a set of commands based heavily on the original Hayes extended set using & commands became popular, and then universal. Only one other command set has remained popular, the U.S. Robotics set from their popular line of modems.
Description
[edit]The following text lists part of the Hayes command set, also called the AT commands: "AT" meaning 'attention'. Each command string is prefixed with "AT", and a number of discrete commands can be concatenated after the "AT".
The Hayes command set can subdivide into four groups:
- basic command set – A capital character followed by a digit. For example, M1.
- extended command set – An "&" (ampersand) and a capital character followed by a digit. This extends the basic command set. For example, &M1. Note that M1 is different from &M1.
- proprietary command set – Usually starting either with a backslash (“\”) or with a percent sign (“%”); these commands vary widely among modem manufacturers.
- register commands – Sr=n where r is the number of the register to be changed, and n is the new value that is assigned. A register represents a specific physical location in memory. Modems have small amounts of memory on board. The fourth set of commands serves for entering values into a particular register (memory location). For example, S7=60 instructs the modem to "Set register #7 to the value 60". Registers usually control aspects of the modem operation (e.g. transmission strength, modulation parameters) and are usually specific to a particular model.
Although the command-set syntax defines most commands by a letter-number combination (L0, L1 etc.), the use of a zero is optional. In this example, "L0" equates to a plain "L". Keep this in mind when reading the table below.
When in data mode, an escape sequence can return the modem to command mode. The normal escape sequence is three plus signs ("+++"), and to disambiguate it from possible real data, a guard timer is used: it must be preceded by a pause, not have any pauses between the plus signs, and be followed by a pause; by default, a "pause" is one second and "no pause" is anything less.
Syntactical definitions
[edit]The following syntactical definitions apply:[7]
<CR>Carriage return character, is the command line and result code terminator character, which value, in decimal ASCII between 0 and 255, is specified in register S3. The default value is 13.<LF>Linefeed character, is the character recognised as line feed character. Its value, in decimal ASCII between 0 and 255, is specified in register S4. The default value is 10. The line feed character is output after the carriage return character if verbose result codes are used (V1 option is used); otherwise, if numeric format result codes are used (V0 option is used), it will not appear in the result codes.<...>Name enclosed in angle brackets is a syntactical element. They do not appear in the command line.[...]Optional subparameter of a command or an optional part of AT information response is enclosed in square brackets. Brackets themselves do not appear in the command line. When the subparameter is not given in AT commands which have a Read command, the new value equals its previous value. In AT commands which do not store the values of any of their subparameters, and so have not a Read command, which are called action type commands, the action should be done on the basis of the recommended default setting of the subparameter.
Modem initialization
[edit]A string can contain many Hayes commands placed together, so as to optimally prepare the modem to dial out or answer, e.g. AT&F&D2&C1S0=0X4. Most modem software supported a user supplied initialization string, which was typically a long concatenated AT command which was sent to the modem upon launch.[8] The V.250 specification requires all DCEs to accept a body (after "AT") of at least 40 characters of concatenated commands.[9]
Example session
[edit]The following represents two computers, computer A and computer B, both with modems attached, and the user controlling the modems with terminal emulator software. Terminal-emulator software typically allows the user to send Hayes commands directly to the modem, and to see the responses. In this example, the user of computer A makes the modem dial the phone number of modem B at phone number (212) 555-0100 (long distance). After every command and response, there is a carriage return sent to complete the command.
| Modem A | Modem B | Comment |
|---|---|---|
| ATDT12125550100 | User at modem A issues a dial command: AT-Get the modem's ATtention; D-Dial; T-Touch-Tone; 12125550100-Call this number | |
| RING | Modem A begins dialing. Modem B's phone-line rings, and the modem reports the fact. | |
| ATA | Computer at modem B issues answer command. | |
| CONNECT | CONNECT | The modems connect, and both modems report "connect". (In practice, most modems report more information after the word CONNECT — specifying the speed of the connection.) Also, at this time, both modems will raise the DCD, or Data Carrier Detect signal, on the serial port. |
| abcdef | abcdef | When the modems are connected, any characters typed at either side will appear on the other side. The person at computer A starts typing. The characters pass through the modem and appear on computer B's screen. (User A may not see his own typed characters — depending on the terminal software's local echo setting). |
| +++ | The person at computer B issues the modem escape command. (Alternately, and more commonly, the computer B could drop the DTR, or Data Terminal Ready signal, to achieve a hangup, without needing to use +++ or ATH.) | |
| OK | The modem acknowledges it. | |
| ATH | The person at computer B issues a hang up command. | |
| NO CARRIER | OK | Both modems report that the connection has ended. Modem B responds "OK" as the expected result of the command; modem A says NO CARRIER to report that the remote side interrupted the connection. The modems on both sides drop their DCD signals as well. |
Compatibility
[edit]While the original Hayes command set represented a huge leap forward in modem-based communications, with time many problems set in, almost none of them due to Hayes per se:
- Due to the lack of a written standard, other modem manufacturers just copied the external visible commands and (roughly) the basic actions. This led to a wide variety of subtle differences in how modems changed from state to state, and how they handled error conditions, hangups, and timeouts.
- Each manufacturer tended to add new commands to handle emerging needs, often incompatible with other modems. For example, setting up hardware or software handshaking often required many different commands for different modems. This undermined the handy universality of the basic Hayes command set.
- Many Hayes compatible modems had serious quirks that made them effectively incompatible. For example, many modems required a pause of several seconds after receiving the "AT Z" reset command. Some modems required spaces between commands, while others did not. Some would unhelpfully change baud-rate of their own volition, which would leave the computer with no clue how to handle the incoming data.
As a result of all this, eventually many communications programs had to give up any sense of being able to talk to all "Hayes-compatible" modems, and instead the programs had to try to determine the modem type from its responses, or provide the user with some option whereby they could enter whatever special commands it took to coerce their particular modem into acting properly.
Autobaud
[edit]The Hayes command set facilitated automatic baud rate detection as "A" and "T" happen to have bit patterns that are very regular; "A" is "100 0001" and so has a 1 bit at the start and end and "T" is "101 0100" which has a pattern with (nearly) every other bit set.[10] Since the RS-232 interface transmits least significant bit first, the according line pattern with 8-N-1 (eight data bits, no parity bit, one stop bit) is 01000001010001010101 (start and stop bits italicized) which is used as syncword.
The basic Hayes command set
[edit]The following commands are understood by virtually all modems supporting an AT command set, whether old or new.
| Command | Description | Comments |
|---|---|---|
| A0 or A | Answer incoming call | |
| A/ | Repeat last command | Do not preface with AT, do not follow with carriage return. Enter usually aborts. |
| D | Dial | Dial the following number and then handshake P – Pulse Dial |
| E0 or E | No Echo | Will not echo commands to the computer |
| E1 | Echo | Will echo commands to the computer (so one can see what one types if the computer software does not support echo) |
| H0 or H | Hook Status | On hook. Hangs up the phone, ending any call in progress. |
| H1 | Hook status | Off hook. Picks up the phone line (typically you'll hear a dialtone) |
| I0 to I9 | Inquiry, Information, or Interrogation | This command returns information about the model, such as its firmware or brand name. Each number (0 to 9, and sometimes 10 and above) returns one line of modem-specific information, or the word ERROR if the line is not defined. Today, Windows uses this for Plug-and-play detection of specific modem types. |
| L0 or Ln (n=1 to 3) | Speaker Loudness. Supported only by some modems with speakers. Modems lacking speakers, or with physical volume controls, or ones whose sound output is piped through the sound card will not support this command. | 0 turns off speaker, 1 to 3 are for increasing volumes. |
| M0 or M | Speaker Mute, completely silent during dialing | M3 is also common, but different on many brands |
| M1 | Speaker on until remote carrier detected (user will hear dialing and the modem handshake, but once a full connection is established the speaker is muted) | |
| M2 | Speaker always on (data sounds are heard after CONNECT)
| |
| O | Return Online | Returns the modem back to the normal connected state after being interrupted by the "+++" escape code. |
| Q0 or Q | Quiet Mode | Off – Displays result codes, user sees command responses (e.g. OK)
|
| Q1 | Quiet Mode | On – Result codes are suppressed, user does not see responses. |
Sn
|
Select current register
Note that S |
Select register n as the current register |
Sn?
|
Select register n as the current register, and query its value. Using ? on its own will query whichever register was most recently selected. | |
Sn=r
|
Select register n as the current register, and store r in it. Using =r on its own will store into whichever register was most recently selected.
| |
| V0 or V | Verbose | Numeric result codes |
| V1 | English result codes (e.g. CONNECT, BUSY, NO CARRIER etc.)
| |
| X0 or X | Smartmodem | Hayes Smartmodem 300 compatible result codes |
| X1 | Usually adds connection speed to basic result codes (e.g. CONNECT 1200)
| |
| X2 | Usually adds dial tone detection (preventing blind dial, and sometimes preventing ATO) | |
| X3 | Usually adds busy signal detection. | |
| X4 | Usually adds both busy signal and dial tone detection | |
| Z0 or Z | Reset | Reset modem to stored configuration, and usually also physically power-cycles the modem (during which it is unresponsive). Z0, Z1 etc. are for multiple stored profiles. &F is similar in that it returns to factory default settings on modems without NVRAM (non volatile memory), but it does not reset the modem |
Note: a command string is terminated with a CR (\r) character
Although not part of the command set, a tilde character ~ is commonly used in modem command sequences. The ~ causes many applications to pause sending the command stream to the device (usually for half a second), e.g. after a Reset. The ~ is not sent to the modem.[11]
Modem S register definitions
[edit]| Register | Description | Range | Default value |
|---|---|---|---|
| S0 | Number of rings before Auto-Answer | 0–255 (0 = never) | 0 |
| S1 | Ring Counter | 0–255 rings | 0 |
| S2 | Escape character | 0–255, ASCII decimal | 43 ("+") |
| S3 | Carriage Return Character | 0–127, ASCII decimal | 13 (Carriage Return) |
| S4 | Line Feed Character | 0–127, ASCII decimal | 10 (Line Feed) |
| S5 | Backspace Character | 0–32, ASCII decimal | 8 (Backspace) |
| S6 | Wait Time before Blind Dialing | 2–255 seconds | 2 |
| S7 | Wait for Carrier after Dial | 1–255 seconds | 50 |
| S8 | Pause Time for Comma (Dial Delay) | 0–255 seconds | 2 |
| S9 | Carrier Detect Response Time | 1–255 tenths of a seconds | 6 (0.6 second) |
| S10 | Delay between Loss of Carrier and Hang-Up | 1–255 tenths of a second | 14 (1.4 seconds) |
| S11 | DTMF Tone Duration | 50–255 milliseconds | 95 milliseconds |
| S12 | Escape Code Guard Time | 0–255 fiftieths of a second | 50 (1 second) |
| S18 | Test Timer | 0–255 seconds | 0 seconds |
| S25 | Delay to DTR | 0–255 (seconds if synchronous mode, hundredths of a second in all other modes) | 5 |
| S26 | RTS to CTS Delay Interval | 0–255 hundredths of a second | 1 hundredth of a second |
| S30 | Inactivity Disconnect Timer | 0–255 tens of seconds | 0 (disable) |
| S37 | Desired Telco Line Speed | 0–10
Command options:
|
0 |
| S38 | Delay before Force Disconnect | 0–255 seconds | 20 seconds |
V.250
[edit]The ITU-T established a standard in its V-Series Recommendations, V.25 ter, in 1995 in an attempt to establish a standard for the command set again. It was renamed V.250 in 1998 with an annex that was not concerning the Hayes command set renamed as V.251. A V.250 compliant modem implements the A, D, E, H, I, L, M, N, O, P, Q, T, V, X, Z, &C, &D, and &F commands in the way specified by the standard. It must also implement S registers and must use registers S0, S3, S4, S5, S6, S7, S8, and S10 for the purposes given in the standard. It also must implement any command beginning with the plus sign, "+" followed by any letter A to Z, only in accordance with ITU recommendations. Modem manufacturers are free to implement other commands and S-registers as they see fit, and may add options to standard commands.
| Leading characters |
Includes commands related to |
|---|---|
| +A | Call control (network Addressing) issues, common, PSTN, ISDN, ITU-T Rec. X.25, switched digital |
| +C | Digital Cellular extensions |
| +D | Data Compression, ITU-T Rec. V.42 bis |
| +E | Error Control, ITU-T Rec. V.42 |
| +F | Facsimile, ITU-T Rec. T.30, etc. |
| +G | Generic issues such as identity and capabilities |
| +I | DTE-DCE Interface issues, ITU-T Rec. V.24, etc. |
| +M | Modulation, ITU-T Rec. V.32 bis, etc. |
| +P | PCM DCE commands, ITU-T Rec. V.92 |
| +S | Switched or Simultaneous Data Types |
| +T | Test issues |
| +V | Voice extensions |
| +W | Wireless extensions |
GSM
[edit]The ETSI GSM 07.07 (3GPP TS 27.007) specifies AT style commands for controlling a GSM phone or modem. The ETSI GSM 07.05 (3GPP TS 27.005) specifies AT style commands for managing the Short Message Service (SMS) feature of GSM.
Examples of GSM commands:[12][13]
| Command | Description |
|---|---|
| AT+CPIN=1234 | Enter PIN code |
| AT+CPWD="SC","old","new" | Change PIN code from 'old' to 'new' |
| AT+CLCK="SC",0,"1234" | Remove PIN code |
| AT&V | Status |
| ATI | Status (Manufacturer, Model, Revision, IMEI, capabilities) |
| AT+COPS=? | List available networks 0-Unknown/2-Current/3-Forbidden, Longname, Shortname, Numerical-ID, "AcT" |
| AT+CSQ | Get signal strength. Answer: +CSQ: <rssi (more=better)>, <ber, less=better> |
| ATD*99# | Dial access point |
| AT+CGDCONT=1,"IP","access.point.name" | Defines PDP context[12] |
GSM/3G modems typically support the ETSI GSM 07.07/3GPP TS 27.007 AT command set extensions, although how many commands are implemented varies.
Most USB modem vendors, such as Huawei, Sierra Wireless, Option, have also defined proprietary extensions for radio mode selection (GSM/3G preference) or similar. Some recent high speed modems provide a virtual Ethernet interface instead of using a Point-to-Point Protocol (PPP) for the data connection because of performance reasons (PPP connection is only used between the computer and the modem, not over network). The set-up requires vendor-specific AT command extensions. Sometimes the specifications for these extensions are openly available, other times the vendor requires an NDA for access to these.[14]
Voice command set
[edit]Modems with voice or answering-machine capabilities support a superset of these commands to enable digital audio playback and recording.
See also
[edit]- Access Point Name (APN)
- Command and Data modes (modem)
- ITU-T Recommendations:
Notes and references
[edit]- ^ a b Victoria Shannon (January 7, 1999). "The Rise and Fall of the Modem King". The New York Times.
with a partner
- ^ Georgi Dalakov (January 4, 2021). "The Modem of Dennis Hayes and Dale Heatherington". Retrieved January 8, 2015.
- ^ "Hayes compatible". Computerworld. March 30, 1987. p. 61.
- ^ "How to Set Up a Hayes Compatible Modem". IBM. June 17, 2018.
- ^ Max, Schau (September 27, 1998). "1+2=3, +++ATH0=Old school DoS". Bugtraq mailing list. Retrieved December 8, 2012.
- ^ Frank Durda IV, "The AT Command Set Reference – History" Archived 2008-04-15 at the Wayback Machine, 1993
- ^ AT Commands Reference Guide [dead link]
- ^ "Initialization Strings: Why, What & Where". Archived from the original on March 10, 2009. Retrieved April 9, 2008.
- ^ "5.2.1 Command line general format" (PDF), V.250 : Serial asynchronous automatic dialling and control (05/99, 07/03), ITU-T/Telecommunication Standardization Bureau
- ^ "Serial Interfaces". PICList. Retrieved May 15, 2016.
- ^ "More Modem Commands". Chebucto Community Net. Retrieved September 12, 2016.
- ^ a b "Developers guidelines June 2010 AT commands for Sony Ericsson phones". Archived from the original on September 29, 2011. 090505 developer.sonyericsson.com
- ^ "UC864-E Software User Guide" (PDF). Archived from the original (PDF) on July 14, 2011. 090505 m2m-platforms.com
- ^ "Dan Williams' blog – That's when I reach for my revolver…". March 20, 2009.
External links
[edit]Modems and AT Commands
- List of AT commands: Basic (Hayes), Extended, Proprietary
- Hayes AT Command Reference Manual
- A list of Hayes AT commands Archived 2008-07-10 at the Wayback Machine
- 3gpp.org, 3GPP AT command set for User Equipment
- Modem initialisation string Archived 2009-03-10 at the Wayback Machine
- Extended Hayes AT command parameters for SMS (dead)
- Determining your Class of Fax / Modem
- Openmoko: AT Commands
- Cell modem commands Archived 2007-10-28 at the Wayback Machine
- ITU Standard V.250
- AT Commands Reference Guide from Telit (dead)
Hayes AT command set
View on GrokipediaHistory and Development
Origins in Early Modem Technology
In the late 1960s and early 1970s, modem technology evolved from acoustic couplers, which required users to manually dial a telephone and place the handset into rubber cups on the device to transmit data over phone lines, to direct-connect modems that plugged straight into telephone jacks for more reliable and convenient operation.[9] Acoustic couplers, developed around 1966 by institutions like Stanford Research Institute, were limited by their dependence on sound transmission, which was susceptible to background noise and required physical handling of the phone, but they enabled early computer-to-computer connections at speeds up to 300 bits per second.[10] By the mid-1970s, direct-connect models began to dominate as FCC regulations in 1976 allowed non-AT&T devices to connect directly to phone lines, reducing the need for couplers and improving signal quality for personal and small business use.[11] Early modems like the Novation CAT, an acoustic coupler released in the late 1970s compatible with the Bell 103 standard at 300 baud, and the Anderson Jacobson AJ880, a direct-connect model from the same era, relied on proprietary control methods that hindered widespread adoption.[11] These devices often required custom software written specifically for each model or manual intervention via front-panel switches to configure settings such as baud rate, dialing, or mode switching, making them incompatible across brands and burdensome for users without technical expertise.[12] Such limitations meant that integrating modems with emerging personal computers demanded bespoke programming efforts, often locking users into vendor-specific ecosystems and complicating remote control or automation.[5] The introduction of personal computers like the Apple II in 1977 and the IBM PC in 1981 amplified the demand for programmable modem interfaces around 1979-1980, as hobbyists and businesses sought to connect these machines to bulletin board systems (BBS) and remote services for data sharing and communication.[13] Apple's 1978 Communications Interface Card, designed for modem integration, exemplified this growing need, but the lack of standardized controls persisted as a barrier until solutions emerged to address the fragmentation.[13] Key to this era were AT&T's Bell 103 standard, developed in the early 1960s for full-duplex 300 bps transmission using frequency-shift keying, and the Bell 212A standard of 1976, which quadrupled speeds to 1200 bps while maintaining backward compatibility, establishing foundational protocols for data transmission over dial-up lines.[14] These developments highlighted the market's readiness for a unified command interface to simplify modem operation amid the personal computing boom.[11]Creation by Hayes Microcomputer Products
In 1981, Hayes Microcomputer Products, founded in 1977 by Dennis Hayes and Dale Heatherington in Atlanta, Georgia, introduced the Smartmodem 300, a groundbreaking 300 baud modem that connected personal computers to telephone lines via an RS-232 port.[15][9] The device was developed to address the limitations of earlier modems, building briefly on standards like the Bell 103 for compatibility with existing telephone systems.[9] Hayes, a former IBM engineer, and Heatherington, an electronics expert, designed the Smartmodem as an external unit with a built-in microprocessor, enabling automated operations that simplified connectivity for early personal computing users.[15] The primary motivation behind the Smartmodem's design was to create a user-friendly interface that allowed software control of the modem, replacing cumbersome hardware configurations such as DIP switches that required manual adjustments for dialing and settings.[15] To achieve this, Heatherington and Hayes invented the AT command set in June 1981, a standardized language for issuing instructions to the modem.[15] The "AT" prefix stood for "Attention," signaling the modem to interpret the following command, such as "D" for dialing a telephone number (e.g., ATD followed by the number).[12] This approach facilitated seamless integration with terminal software on diverse microcomputers, making modem operation accessible without specialized hardware knowledge.[12] The launch of the Hayes Smartmodem 300 revolutionized modem accessibility for hobbyists and small businesses by enabling easy auto-dialing, auto-answering, and configuration through simple text commands sent over serial connections.[9] Priced at around $300, it quickly gained traction, with Hayes selling 140,000 units in 1982 alone and generating $12 million in revenue, demonstrating rapid initial adoption.[15] By the mid-1980s, cumulative sales exceeded one million units, underscoring the product's role in democratizing online access for personal and professional use.[15]Industry Adoption and Evolution
Following the introduction of the Hayes Smartmodem in 1981, the AT command set quickly gained traction as a de facto standard for modem control, largely due to the Federal Communications Commission's (FCC) Computer II decision in 1980, which deregulated customer premises equipment by separating it from regulated network services, and the 1982 Modified Final Judgment in the AT&T antitrust case, which divested AT&T and allowed it to compete in the CPE market, thereby accelerating adoption of affordable, direct-connect modems.[16][15] This regulatory environment enabled Hayes and other manufacturers to sell intelligent modems to personal computer users, with Hayes achieving sales of 140,000 units and $12 million in revenue by 1982.[15] The absence of broad patents on the core AT command set facilitated rapid cloning by competitors, including U.S. Robotics and Telebit, resulting in a proliferation of "Hayes-compatible" modems by 1984 that adhered to the same syntax for dialing, configuration, and status reporting.[15] These clones undercut Hayes' pricing while expanding market access, as software developers could write universal terminal programs supporting the AT interface without proprietary restrictions, leading to Hayes capturing nearly 60% of the 300-baud and 1200-baud markets by mid-1984.[15] By 1986, as the industry shifted to higher speeds, Hayes introduced extensions to the AT set for V.32 full-duplex operation at 9600 bits per second, maintaining compatibility while supporting error correction and compression protocols that became essential for reliable data transfer over analog lines.[17] The AT command set played a pivotal role in fostering Bulletin Board System (BBS) culture and early internet access during the 1980s and 1990s, enabling users to automate connections to remote servers via simple dialing commands like ATDT, which powered the exchange of files, messages, and software among hobbyists before widespread graphical web browsers emerged.[18] This standardization supported the growth of over 100,000 BBSes worldwide by the early 1990s, where AT-compatible modems facilitated asynchronous communication at speeds from 300 to 14,400 baud, bridging isolated personal computers into nascent online communities.[19] Hayes Microcomputer Products experienced a sharp decline in the 1990s amid market saturation, intense competition from low-cost clones, and internal executive conflicts, culminating in Chapter 11 bankruptcy filing in 1994 and eventual acquisition, as the company struggled to innovate amid the transition to 56 kbit/s standards like V.90 and V.92 that demanded advanced digital signaling Hayes had not aggressively pursued.[15]Command Syntax and Fundamentals
Syntactical Structure and Parsing
The Hayes AT command set employs a structured syntax where each command line begins with the prefix "AT", denoting "attention" to synchronize baud rate and parity settings with the host device.[20] This prefix is followed by one or more command identifiers, typically single uppercase letters or symbols (such as "D" for dialing operations), optionally accompanied by parameters that modify the command's behavior, such as numeric values or qualifiers.[21] The entire command line concludes with a carriage return character (ASCII 13, configurable via the S3 register), which signals the modem to parse and execute the buffered input.[20] Command buffering allows the modem to accept and process multiple commands within a single line, typically concatenated without separators (though spaces may be inserted for readability, if not recommended), with execution occurring sequentially from left to right. Specific modifiers like the semicolon (;) after dialing commands return the modem to command mode without entering data mode.[21] Buffer capacity varies by model, typically limited to 40 characters in early Smartmodem implementations, though later V-series modems support up to 255 characters; exceeding this limit triggers an error response without processing further input.[20] During input, line editing is facilitated by the backspace character (ASCII 8, defined by the S5 register) or delete (ASCII 127), enabling correction of the command line before termination.[21] Upon execution, the modem generates response codes to indicate outcomes, available in either numeric or verbose formats controlled by the V register (V0 for numeric, V1 for verbose, with V1 as default).[20] Numeric responses include values such as 0 for OK (successful execution) and 1 for CONNECT (established link), while verbose equivalents render as textual strings like "OK" or "CONNECT".[21] These responses are prefixed and suffixed by carriage return and line feed characters (CRLF) for readability, with additional details like connection speed appended in verbose mode (e.g., "CONNECT 300").[20] Error handling in parsing returns a specific response code—numeric 4 or verbose "ERROR"—for invalid syntax, unrecognized commands, or buffer overflows, halting further processing in the line while allowing subsequent command lines to proceed.[21] To facilitate mode transitions during active connections, an escape sequence of three plus signs ("+++") is used to revert from data mode to command mode, requiring a guard time pause (default 1 second, adjustable via S12 register) before and after the sequence to avoid misinterpretation as data.[20] This sequence confirms the switch with an "OK" response, enabling re-entry of AT commands without disconnecting the line.[21]Command and Data Modes
The Hayes AT command set operates the modem in two primary modes: command mode and data mode, which determine how the modem interprets incoming characters from the data terminal equipment (DTE).[22][23] In command mode, the modem accepts and processes AT commands sent from the DTE, such as those for configuration, dialing, or status queries, but does not transmit user data over the telephone line.[5][22] This mode is the default state upon modem power-up or reset, where characters are buffered until a carriage return is received, allowing multiple commands to be combined in a single line prefixed by "AT" or "at".[23] The modem responds with result codes, such as "OK" or "ERROR", to acknowledge command execution, ensuring controlled interaction without ongoing data exchange.[22] Data mode, also known as online mode, enables transparent transmission of data between the local DTE and a remote device after a successful connection is established.[5][23] In this state, incoming characters from the DTE are forwarded directly to the remote end without interpretation as commands, facilitating bidirectional communication at the negotiated line speed.[22] The modem enters data mode automatically following a dial-out command like ATD or an answer command like ATA that results in carrier detection, or via explicit transition from command mode.[23] Transitions between modes are essential for modem operation. From command mode to data mode, the modem switches upon successful connection or via a command such as ATO, which resumes online data transfer after an escape.[22][23] Conversely, from data mode to command mode, the user initiates an escape sequence consisting of three plus signs (+++), followed by a valid AT command like ATZ for reset, or by dropping the Data Terminal Ready (DTR) signal or issuing a hangup command like ATH.[5][22] The escape sequence requires specific timing to avoid false triggers within the data stream: a guard time of silence, typically 1 second (configurable via S12 register, default 50 units of 20 ms each), must precede and follow the +++ characters.[5][23] This time-independent escape sequence (TIES) ensures reliable mode switching without interrupting legitimate data.[23] These modes have distinct implications for flow control and error correction. In command mode, flow control is generally unnecessary due to the low volume of short command exchanges, which occur at the DTE's baud rate without line transmission; however, hardware signals like RTS/CTS may still modulate command acceptance to prevent buffer overflow.[23] In data mode, flow control becomes critical to manage data rates between the DTE and modem, supporting options such as XON/XOFF software flow or RTS/CTS hardware flow to buffer incoming data and avoid loss during speed mismatches.[23] Error correction protocols, like V.42 or MNP levels 4/5, are active only in data mode to detect and retransmit corrupted packets over the noisy analog line, ensuring reliable end-to-end transfer, whereas command mode relies on simple acknowledgments without such mechanisms.[23][22]Initialization Sequences
Upon power-on, Hayes-compatible modems initialize to a predefined configuration, typically the factory defaults or a user-selected profile stored in non-volatile memory, which governs parameters such as baud rate, speaker volume, echo control, and result code verbosity.[24][5] This non-volatile storage ensures that settings persist through power cycles, with the power-on profile often determined by the&Y command (e.g., &Y0 for profile 0 or &Y1 for profile 1).[24]
The primary reset mechanism during initialization is the ATZ command, which restores the modem to a stored user profile without requiring a hardware reset; ATZ0 recalls profile 0, while ATZ1 recalls profile 1, and a plain ATZ defaults to profile 0 in many implementations.[25][5] Complementing this, the AT&F command loads the manufacturer's factory default settings, clearing custom configurations and S-register values to their original state (e.g., AT&F0 for standard defaults).[25][24] For verification post-reset, the ATI command queries product details, returning lines of information such as model name, firmware revision, and capabilities, with the number of lines controlled by an optional parameter (e.g., ATI0 for minimal output).[25]
Autobaud detection enhances initialization by allowing the modem to automatically sense the host computer's baud rate from the timing and bit patterns of the initial AT command sequence, eliminating the need for manual rate configuration.[26] This process relies on the regular ASCII bit sequences of 'A' (1000001) and 'T' (1010100), which provide distinct transitions suitable for synchronization at standard rates like 300, 1200, 9600, and 115200 baud.[26][27] Enabled by default in most Hayes-compatible modems, autobaud can be disabled via commands like #BDR to fix a specific rate if needed.[24]
A common initialization string combines reset and configuration steps for reliable startup, such as ATZ&F to reset and restore factory defaults, often followed by profile viewing with AT&V to confirm settings like active S-registers and stored profiles.[25][5] More comprehensive examples include AT&F&C1&D2 to set factory defaults with carrier detect control and data terminal ready handling.[25]
While effective for standard baud rates, autobaud detection may encounter compatibility issues with non-standard rates (e.g., 57600 or custom values), as the bit pattern analysis assumes common clock timings, potentially resulting in failed synchronization or fallback to a default rate and requiring manual intervention or hardware adjustments.[28][27]
Basic Command Set
Dialing and Connection Commands
The dialing and connection commands in the Hayes AT command set enable modems to initiate, answer, and terminate telephone connections, forming the core of remote data communication over analog phone lines.[21] These commands, prefixed with "AT" to denote "attention," allow users to specify dialing methods and control call flow without manual intervention.[21] The primary dialing command is ATD, which instructs the modem to enter originate mode and dial the specified telephone number.[21] It supports two dialing modes: pulse dialing (denoted by "P"), which generates rotary-style pulses and serves as the factory default, and tone dialing (denoted by "T"), which produces dual-tone multifrequency (DTMF) signals for faster and more reliable connections on modern telephone systems.[21] The dial string follows the mode specifier, such as ATDP123 for pulse dialing the number 123 or ATDT555-0123 for tone dialing.[21] Key modifiers within the dial string include a comma (,) for inserting a pause—typically 2 seconds as set by the S8 register—and a semicolon (;) to return the modem to command mode after dialing without attempting a full connection, useful for sending tones to automated systems like voice mail.[21] For example, ATDT9,555-1234; dials 9, pauses, dials the number, and then awaits further commands rather than handshaking.[21] To answer incoming calls, the ATA command off-hooks the modem and initiates a handshake with the remote device, provided the auto-answer ring count (S0 register) is set greater than zero, such as S0=1 for answering after one ring.[21] Conversely, the ATH command (or ATH0) terminates an active connection by on-hooking the modem and returning to command mode; ATH1 variants off-hook without handshaking for testing purposes.[21] Pulse and tone dialing can be switched persistently using the ATP command to set pulse dialing as default or ATT to set tone dialing, overriding the per-dial specifier until reset.[21] Connection modifiers like the semicolon in ATDT123; allow the modem to remain in command mode post-dialing, facilitating scenarios such as generating tones for interactive voice response systems without establishing data transfer.[21] In the original Hayes command set, these dialing commands supported connections from 300 baud up to 14400 baud, reflecting the progression from early 300 bps modems to V-series high-speed models by the early 1990s.[21] Successful connections via ATD or ATA typically return result codes like "CONNECT 14400" to indicate the established baud rate.[21]| Command | Syntax | Primary Function | Key Modifiers/Options |
|---|---|---|---|
| ATD | ATD | Initiate outbound dial | P (pulse), T (tone), , (pause), ; (return to command mode) |
| ATA | ATA | Answer incoming call | Requires S0 > 0 for auto-answer |
| ATH | ATH | Hang up connection | ATH1 for off-hook without handshake |
| ATP | ATP | Set pulse dialing as default | Use ATT |
Configuration and Control Commands
The configuration and control commands in the Hayes AT command set allow users to customize modem behavior for optimal data transmission, audio feedback, and protocol handling prior to establishing connections. These commands adjust parameters such as character echoing, result code output, speaker operation, flow control mechanisms, error correction protocols, and data compression options, ensuring compatibility with diverse communication environments. By issuing these commands in the modem's command mode, typically via an initialization string like AT&F followed by specific settings, users can tailor the modem's hardware and software configurations without interrupting ongoing sessions.[21] Echo and result code controls manage user interface feedback during command entry and operation. The E command governs command state character echo, where E0 disables echoing to prevent redundant display on the terminal, and E1 enables it for visual confirmation of typed commands (factory default). Complementing this, the Q command regulates result code transmission, with Q0 enabling codes like "OK" or "CONNECT" to report modem status (factory default), and Q1 suppressing them for silent operation in automated scripts. These settings enhance usability by balancing verbosity and efficiency in terminal interactions.[21] Speaker control commands provide audible cues for dialing and connection processes, aiding troubleshooting in acoustic environments. The M command selects speaker modes, including M0 to keep the speaker always off for quiet operation, and M1 to activate it during off-hook until carrier detection (factory default), allowing users to monitor dialing tones without persistent noise post-connection. This configuration is particularly useful in shared spaces or when integrating with software that relies on silent hardware.[21] Flow control commands prevent data overflow between the modem and connected device by regulating transmission rates. The &K command sets local flow control options, such as &K0 to disable all flow control for direct connections, and &K3 to enable RTS/CTS hardware flow control, which uses dedicated signals to pause and resume data flow dynamically (common factory default in error-corrected modes). This ensures reliable throughput, especially in high-speed asynchronous communications where buffer overruns could lead to data loss.[21] Error correction and guard tone commands configure protocols for robust signal integrity over telephone lines. The \N command selects error correction modes, with \N0 disabling error correction for normal buffered mode, and \N3 enabling auto-reliable mode using MNP 4 or V.42 protocols with fallback to non-error-corrected operation if negotiation fails (factory default in many implementations). For international compatibility, the &G command adjusts guard tones, where &G0 disables tones (standard for North America), &G1 enables a 550 Hz tone, and &G2 a 1800 Hz tone to minimize interference in certain networks. These settings mitigate transmission errors caused by line noise or frequency-specific distortions.[21] Data compression commands optimize bandwidth usage alongside error correction. The %C command enables compression, such as %C0 to disable it entirely, and %C2 to activate V.42bis compression for up to 4:1 data reduction in compatible sessions (factory default). When paired with error correction like \N3, this allows efficient handling of compressible payloads, such as text files, while maintaining link reliability without requiring separate protocol negotiation.[21]Status and Information Commands
The status and information commands in the Hayes AT command set allow users to query the modem's operational state, firmware details, and connection parameters without altering settings, providing essential diagnostics for troubleshooting and verification. These commands are executed in command mode and typically elicit textual or numeric responses followed by an "OK" confirmation, enabling software or users to retrieve real-time data on the modem's configuration and line conditions.[5] The ATI command retrieves product identification and firmware information, helping identify the modem model and revision for compatibility checks. Subvariants like ATI0 display the basic product code (e.g., "Hayes Compatible 2400"), while ATI1 or ATI2 report ROM checksums for integrity verification, and ATI4 lists supported features. The response format varies by implementation but always concludes with "OK" if successful.[29][5] AT&V displays the current and stored configuration profiles, including active S-register values, dialing options, and stored telephone numbers, offering a snapshot of the modem's setup across multiple profiles (e.g., Profile 0 as active with settings like B0 E1 L1 M1). This command is particularly useful for reviewing user-defined presets without needing to read individual registers. The output is a formatted text block ending in "OK".[29][5] To read a specific S-register value, the ATSn? command is used, where "n" specifies the register number (e.g., ATS0? for the ring count threshold). It returns the register's content as a three-digit decimal value (e.g., "000" for S0), padded if necessary, followed by "OK", allowing targeted queries into timing, error correction, and other parameters stored in the modem's non-volatile memory.[29][5] The extended &L command selects line type for dial-up (&L0, default) or leased line (&L1) operation. To view current settings including line type, use AT&V. These integrate with standard result codes like "CONNECT" or "NO CARRIER" for broader status feedback.[5]S-Registers
Purpose and Access Methods
S-registers in the Hayes AT command set serve as software-programmable storage locations within the modem, designed to hold configurable parameters that control operational behaviors such as timeouts, retries, and other persistent settings essential for modem functionality. These registers provide a mechanism for users to customize and maintain modem configurations across sessions, ensuring consistent performance without requiring repeated manual adjustments.[30][5] Access to S-registers is achieved through specific AT commands: the syntaxATSn=m sets the value of register n (where n is the register number) to m (a decimal value), while ATSn? queries and displays the current value of register n.[30][31] Upon modem power-up or execution of the ATZ command, which performs a soft reset, the S-registers are loaded from the selected power-on profile stored in non-volatile memory. Factory defaults, predefined by the manufacturer, are restored using the &F command followed by ATZ.[21][32]
The allowable range for values in most S-registers is 0 to 255 in decimal notation, though certain registers employ bit-mapped structures to encode multiple options within a single value.[30][5] To enable non-volatile persistence, the &W0 or &W1 command writes the current configuration of S-registers (along with other settings) to stored profile 0 or 1 in non-volatile RAM, preventing loss during power cycles; the &Y0 or &Y1 command then selects which profile (0 or 1) is loaded upon subsequent power-on or reset.[30][31] This profile-based system allows for multiple predefined setups, enhancing flexibility in modem deployment.[32]
Key Register Definitions
The S-registers in the original Hayes AT command set store configurable parameters that govern fundamental modem operations, including auto-answer thresholds, character recognition for commands and escapes, and critical timing intervals for dialing and connection management. These registers, accessible via AT commands like ATSn=v (to set) and ATSn? (to read), allow users to tailor the modem's response to network conditions and user needs without altering the core command syntax. Below is a catalog of the most important S-registers from the Hayes Smartmodem era, focusing on their functions, default values, and ranges as defined in early implementations.| S-Register | Function | Default Value | Range | Units/Notes |
|---|---|---|---|---|
| S0 | Specifies the number of incoming rings required before the modem automatically answers a call. | 0 | 0–255 | 0 disables auto-answer; values 1–255 set the ring count for auto-answer activation.[21][5] |
| S2 | Defines the ASCII code for the escape character used to switch from data mode to command mode (typically part of the "+++" sequence). | 43 | 0–255 | 43 corresponds to the "+" character; escape disabled if value >= 128; 0-127 sets the ASCII escape character.[21][20] |
| S3 | Sets the ASCII code for the carriage return character, which terminates command lines entered in command mode. | 13 | 0–127 | 13 is the standard carriage return (CR); values outside this range may cause command parsing issues.[21][20] |
| S6 | Establishes the pause duration after going off-hook before proceeding with blind dialing (without dial tone detection) or wait time for dial tone if detection is enabled. | 2 | 2–255 | Seconds; this prevents premature dialing in pulse-based systems.[5][21] |
| S7 | Determines the maximum time the modem waits to detect a valid carrier signal after initiating a dial or answer command. | 30 | 1–255 | Seconds; if no carrier is detected within this period, the modem times out and returns to command mode.[5] |
| S10 | Sets the time between loss of carrier signal and automatic disconnection (hangup). | 14 | 1–255 | 0.1 seconds; 255 = do not disconnect on carrier loss (default 1.4 s). Aids in handling brief carrier drops.[21][23] |
| S12 | Sets the minimum guard time (silence period) required before and after the escape sequence to recognize it and switch to command mode. | 50 | 0–255 | 1/50 second (default 1 s); 0 disables escape sequence recognition. Prevents accidental mode switches during data.[23] |
| S37 | Configures the maximum desired line speed (DCE rate) for connections (later extensions, not in original 300 bps Smartmodem). | 0 | 0–11 (model-dependent) | 0 enables auto-detection; other values select specific rates (e.g., 5=1200 bps, up to 11=14400 bps in compatible models).[21] |
Extensions and Standards
V.250 and ITU-T Extensions
The ITU-T V.250 recommendation, originally designated as V.25 ter and first approved in August 1995 with revisions in 1997 before being renumbered to V.250 in 1998, standardized the Hayes AT command set for serial asynchronous automatic dialing and control in data terminal equipment (DTE) to data circuit-terminating equipment (DCE) interfaces.[33] This formalization aimed to promote interoperability among V.34 modems operating at speeds up to 33.6 kbit/s, extending the basic Hayes commands to support advanced features required for higher-speed data communications over telephone networks.[34] By codifying the AT syntax and reserving the "+" prefix for future standardized extensions, V.250 ensured orderly evolution of the command set without conflicting with proprietary implementations.[35] Key extensions in V.250 include identification commands such as +GMI to request the manufacturer's identification string, +GMM for the model identification, +GMR for the revision level, and +GSN for the product serial number, which provide standardized ways to query modem capabilities beyond basic Hayes information responses.[36] For enhanced error correction and data compression aligned with V.42 and V.42bis protocols, commands like +ES select error control modes, +DS configure data compression parameters (e.g., dictionary size and maximum code words), and +DR set reporting for compression status during connections.[36] Flow control was improved with +IFC, allowing selection of software (XON/XOFF) or hardware (RTS/CTS) methods to manage data flow at higher rates, while +MS enables modulation selection for V.34, specifying carrier frequencies and symbol rates to achieve optimal line speeds.[36] Compared to the basic Hayes set, V.250 introduced more verbose and standardized result codes (e.g., via extensions to the V and X registers) for detailed connection feedback, including negotiated data rates and protocol modes, which facilitated automated scripting for 56 kbit/s modems under later amendments supporting V.90 and V.92 standards approved in 2001.[37] These enhancements addressed limitations in legacy Hayes commands, such as rudimentary speed reporting, by mandating comprehensive online data state management. V.250's adoption became foundational for post-1990s dial-up modems from manufacturers like Hayes and US Robotics, and it influenced configuration interfaces in early DSL modems for tasks like line diagnostics and protocol negotiation, promoting global compatibility in telecommunication equipment.[34]GSM and Mobile Network Commands
The Hayes AT command set was extended in the 1990s to support GSM mobile networks through ETSI standards GSM 07.05, which defines AT commands for Short Message Service (SMS) and Cell Broadcast Service (CBS), and GSM 07.07, which specifies commands for controlling mobile equipment functions and GSM network access.[38][39] These standards, originating from ETSI's Special Mobile Group, were developed to enable terminal equipment to interact with GSM networks via serial interfaces, building on the basic dialing syntax of the original Hayes commands.[38] They have since evolved under 3GPP into Technical Specifications TS 27.005 for SMS-related commands and TS 27.007 for broader mobile termination control, with the latest versions maintaining compatibility while adding support for later generations like UMTS and LTE fallback.[40] Key commands for SMS operations include AT+CMGS, which sends an SMS-SUBMIT message from the terminal equipment to the network.[38] In text mode (set via AT+CMGF=1), the syntax isAT+CMGS=<da>[,<toda>] followed by the message body and terminated with Ctrl-Z (ASCII 26); <da> specifies the destination address as a string, and <toda> indicates the type of address (e.g., international).[38] Upon success, it returns +CMGS: <mr>, where <mr> is the message reference number; errors yield +CMS ERROR: <err>.[38] For data connectivity, ATD99#[[<cid> selects the context ID, and success prompts a "CONNECT" response entering data mode.[40]
Network registration is managed via AT+CREG?, which queries the circuit-switched (CS) domain status, returning +CREG: <n>,<stat>[,<lac>,<ci>[,<AcT>]]; <stat> values include 0 (not registered, not searching), 1 (registered, home), 2 (searching), 3 (denied), 4 (unknown), or 5 (registered, roaming), with <lac> and <ci> providing location area and cell ID in hexadecimal.[40] Operator selection uses AT+COPS=[<mode> 0 enables automatic selection, 1 manual (specifying <oper> as alphanumeric or numeric PLMN code), 2 deregisters, and 3 sets format only, with query response +COPS: <mode>,<format>,<oper>.[40] For call control, AT+CLCC lists active calls, outputting +CLCC: <id>,<dir>,<stat>,<mode>,<mpty>[,<number>,<type>]; <dir> is 0 (mobile-originated) or 1 (terminated), <stat> ranges from 0 (active) to 7 (held with others active), and <mode> covers voice (0), data (1), or fax (2).[40]
These commands remain relevant in 2025 for IoT applications, particularly in modules like the SIM800 series from SIMCom, which implement the full GSM 07.05/07.07 profile for 2G operations and support 3G fallback where available, enabling low-power SMS, data, and call functions in remote sensors and telemetry devices.[41] The SIM800 supports AT+CMGS for messaging, AT+CREG and AT+COPS for network management, AT+CLCC for calls, and ATD*99# for GPRS, aligning with 3GPP TS 27.005 and 27.007 while adding IoT-specific extensions like TCP/IP stacking.[41]
Voice Modem Command Set
The voice modem command set extends the Hayes AT command framework to enable audio processing and telephony operations, allowing modems to handle voice calls beyond traditional data transmission. Developed in the 1990s, this command set supports features like speakerphones and answering machines by controlling audio routing, compression, tone generation, and buffering. It is based on the TIA IS-101 Voice Control Interim Standard for Asynchronous DCE, prepared by the TIA Technical Subcommittee TR29.2, which defines protocols for asynchronous data circuit-terminating equipment (DCE) to manage voice data streams.[42] A core command is #VLS, used for local speaker and audio device control, which selects the source and destination for voice signals such as the telephone line, handset, speaker, or microphone. The syntax isAT#VLS=<n>, where <n> is a value from 0 to 15 (e.g., 0 for telephone line on-hook, 1 for handset off-hook); this enables configurations for hands-free operation in speakerphone setups.[30]
The #VSM command configures voice sample modes, specifying compression algorithms and sampling rates to optimize audio quality and bandwidth. Its syntax is AT#VSM=<cmi>,<vsr>, with <cmi> indicating the compression method (e.g., 128 for 8 kHz PCM linear) and <vsr> the samples per second (e.g., 8000); this is essential for encoding voice data in answering machine recordings or real-time telephony.[30]
DTMF tone generation is handled by the #VTS command, which transmits dual-tone multi-frequency signals for interactive applications. The syntax is AT#VTS=<string>, where <string> includes digits (0-9), symbols (*, #, A-D), or custom tones specified as [frequency1,frequency2,duration]; for instance, AT#VTS=123 sends the tones for digits 1, 2, and 3 sequentially.[30]
For voice recording and playback, the #VRX command initiates receive mode to capture audio from the line or microphone into the modem's buffer, using the syntax AT#VRX (no parameters), returning a CONNECT result code upon starting. Complementarily, #VTX starts transmit mode to send buffered audio to the line or speaker, with syntax AT#VTX; these commands facilitate full-duplex or half-duplex voice sessions in devices like automated answering systems.[30]
Buffer management is supported by the #VBQ command, which queries the sizes of transmit and receive voice buffers to prevent overflow during audio operations. The syntax is AT#VBQ? (no parameters), responding with values in bytes (e.g., transmit buffer size followed by receive); this aids in applications requiring stable audio flow, such as early VoIP gateways interfacing analog voice with IP networks prior to the 2000s.[30]