Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Hayes AT command set
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
== Description == 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 [[Processor register|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 === The following syntactical definitions apply:<ref>[http://jimdgrayassoc.com/AT%20COMMANDS%20REFERENCE%20GUIDE.pdf AT Commands Reference Guide<!-- Bot generated title -->] {{dead link|date=September 2017}}</ref> * {{code|<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. * {{code|<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. * {{code|<...>}} Name enclosed in angle brackets is a syntactical element. They do not appear in the command line. * {{code|[...]}} 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 === A string can contain many Hayes commands placed together, so as to optimally prepare the modem to dial out or answer, e.g. <code>AT&F'''<u>&D2</u>'''&C1S0=0X4</code>. 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.<ref>{{Cite web |url=http://home.intekom.com/option/faq48.htm |title=Initialization Strings: Why, What & Where<!-- Bot generated title --> |access-date=2008-04-09 |archive-date=2009-03-10 |archive-url=https://web.archive.org/web/20090310153616/http://home.intekom.com/option/faq48.htm |url-status=dead }}</ref> The V.250 specification requires all [[Data communication equipment|DCEs]] to accept a body (after "AT") of at least 40 characters of concatenated commands.<ref name="V250_5_2_1">{{Citation |title=V.250 : Serial asynchronous automatic dialling and control (05/99, 07/03) |chapter=5.2.1 Command line general format |publisher=[[ITU-T]]/Telecommunication Standardization Bureau |chapter-url=http://www.itu.int/rec/T-REC-V.250/en |chapter-format=PDF}}</ref> === Example session === 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. {| class="wikitable" ! 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 [[echo (computing)|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 === 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 === 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.<ref>{{Cite web|url=http://www.piclist.com/techref/io/serials.htm|title=Serial Interfaces|website=PICList|access-date=2016-05-15}}</ref> 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 ''0''10000010''10''00101010''1'' (start and stop bits ''italicized'') which is used as [[syncword]].
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)