The Hayes command set (also known as the AT command set) is a specific command language originally developed by Dale Heatherington and Dennis Hayes for the Hayes Smartmodem in 1981. The command set consists of a series of short text strings that 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 and as of 2018 still is important within the industry.
History
Background 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. For the originating modem, these frequencies are 1,270 Hz (Mark tone, Binary 1) and 1,070 Hz (Space tone, Binary 0). For the answering modem, the frequencies are 2,225 Hz (Mark tone) and 2025 Hz (Space tone). 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
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. 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.
… excerpt ends here. Continue reading the full article.


