词条 | Hayes command set | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
释义 |
The Hayes command set is a specific command language originally developed by Dennis Hayes[1] for the Hayes Smartmodem 300 baud modem 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 – HistoryBackgroundPrior to the introduction of the Bulletin Board System (BBS), modems typically operated on direct-dial telephone lines that always 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 clearing the line when the other user manually disconnected. The need for automated outbound dialling was considerably less common, and 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 as a cost saving measure. {{anchor|+++}}Hayes' solutionHayes Communications introduced a solution in its 1981 Smartmodem by re-using the existing data pins with no modification. Instead, the modem itself could switch itself between one of two modes:
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, O. 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 packet's data payload as a Hayes command.[2] 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. CommandsThe Hayes command set includes commands for various phone-line manipulations, dialing and hanging-up for instance. 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 a small set 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.[3] 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) raised the 2400-baud command set into a formal standard with the title Data Transmission Systems and Equipment - Serial Asynchronous Automatic Dialing and Control, TIA/EIA-602. However, Hayes Communications moved only slowly to higher speeds or the use of compression, and three other companies led the way here — Microcom, U.S. Robotics and Telebit. Each of these three used its own additional command-sets instead of waiting for Hayes to lead the way. 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 US Robotics set from their popular line of modems. DescriptionThe following text lists part of the Hayes command set (also called the AT commands: "AT" meaning 'attention'). The Hayes command set can subdivide into four groups:
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). The register will store a particular value (alpha-numeric information) which the modem and the communications software can utilize. For example, S7=60 instructs the modem to "Set register #7 to the value 60". 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 definitionsThe following syntactical definitions apply:[4]
Modem initialization{{Other uses|initialization vector}}A string can contain many Hayes commands placed together, so as to optimally prepare the modem to dial out or answer, e.g. Example sessionThe 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 555-1234 (long distance). After every command and response, there is a carriage return sent to complete the command.
CompatibilityWhile 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:
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. AutobaudThe 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.[7] 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 11000001011001010101 (start and stop bits italicized) which is used as syncword. The basic Hayes command setThe following commands are understood by virtually all modems supporting an AT command set, whether old or new.
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.[8] Modem S register definitions
V.250The 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.
GSMThe 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:[9][10]
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.[11] Voice command set{{Main|Voice modem command set}}Modems with voice or answering-machine capabilities support a superset of these commands to enable digital audio playback and recording. See also
Notes and references1. ^{{cite web |url=http://history-computer.com/ModernComputer/Basis/modem.html |author=Georgi Dalakov |title=The Modem of Dennis Hayes and Dale Heatherington |accessdate=January 8, 2015}}{{Unreliable source?|date=September 2016}} 2. ^{{cite web|url=http://marc.info/?l=bugtraq&m=90695973308453&w=2|title=1+2=3, +++ATH0=Old school DoS|last=Max|first=Schau|date=27 September 1998|work=Bugtraq mailing list|accessdate=8 December 2012}} 3. ^Frank Durda IV, "The AT Command Set Reference - History", 1993 4. ^AT Commands Reference Guide {{dead link|date=September 2017}} 5. ^Initialization Strings: Why, What & Where 6. ^{{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 |url=http://www.itu.int/rec/T-REC-V.250/en |format=PDF}} 7. ^{{Cite web|url=http://www.piclist.com/techref/io/serials.htm|title=Serial Interfaces|last=|first=|date=|website=PICList|publisher=|access-date=2016-05-15}} 8. ^{{Cite web|url=http://www.chebucto.ns.ca/Help/Dialup/MoreModemCommands.shtml |title=More Modem Commands |publisher=Chebucto Community Net |accessdate=2016-09-12}} 9. ^1 {{cite web|title=Developers guidelines June 2010 AT commands for Sony Ericsson phones|url=http://developer.sonyericsson.com/wportal/devworld/article/technology-more-atcommands?cc=gb&lc=en|deadurl=yes|archiveurl=https://web.archive.org/web/20110929223402/http://developer.sonyericsson.com/wportal/devworld/article/technology-more-atcommands?cc=gb&lc=en|archivedate=2011-09-29|df=}} 090505 developer.sonyericsson.com 10. ^{{cite web|title=UC864-E Software User Guide|url=http://www.m2m-platforms.com/data/1vv0300767_UC864-E_Software_User_Guide_Final_DRAFT.pdf|deadurl=yes|archiveurl=https://web.archive.org/web/20110714011104/http://www.m2m-platforms.com/data/1vv0300767_UC864-E_Software_User_Guide_Final_DRAFT.pdf|archivedate=2011-07-14|df=}} 090505 m2m-platforms.com 11. ^{{cite web|title=Dan Williams’ blog - That’s when I reach for my revolver…|url=http://blogs.gnome.org/dcbw/2009/03/20/thats-when-i-reach-for-my-revolver/}} External links{{Wikibooks|Serial Programming|Modems and AT Commands|Serial Programming:Modems and AT Commands}}
1 : Modems |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
随便看 |
|
开放百科全书收录14589846条英语、德语、日语等多语种百科知识,基本涵盖了大多数领域的百科知识,是一部内容自由、开放的电子版国际百科全书。