C:\>ConventionalMemory.io

Guide · Updated October 8, 2026 · 7 min read

Hayes modem AT commands cheat sheet

Every dial-up modem you ever met, from a 300 bps acoustic oddity to a 56k external, understood the same two letters. AT means attention, and what follows is a command. Here is the working vocabulary, the registers behind it and a tidy init string that makes a flaky old modem behave.

How we pick. A product makes the list only when reviewers and long-time collectors keep recommending it, it does one job well and it will still work in five years. No filler, no mystery brands, and no paid placements. Not every item has been through our own bench, so we go by reputation. Prices change, so check the listing.

Some links on this page are affiliate links. If you buy through one, Conventional Memory earns a small commission at no cost to you. Affiliate links. As an Amazon Associate I earn from qualifying purchases. Disclosure

How the command set works

Dennis Hayes built the Smartmodem so that software could control a modem with plain text sent over the serial port. In command mode, the modem reads any line that starts with AT, runs the commands that follow and answers with a result code. Once it connects, it switches to data mode and sends everything you type down the line.

Commands can be strung together after one AT, in any order, without spaces: ATE1V1X4&C1&D2 is one line. Press Enter to send. Commands are not case sensitive, but the AT prefix must be all capitals or all lower case.

To try any of this you need a terminal program (Telix, Procomm Plus or Windows HyperTerminal), a COM port set to the modem's speed and a modem set to a fixed port speed. Typing AT and getting OK is the first test of any modem.

Commands you will use

Core Hayes commands
CommandWhat it does
ATAttention. The modem answers OK if it is alive and talking
ATZReset the modem and load the stored profile
AT&FLoad the factory defaults
AT&WWrite the current settings to non-volatile memory
AT&VView the current settings (many modems)
ATE0 / ATE1Echo off / on. Off is useful for scripts
ATV0 / ATV1Numeric result codes / words
ATQ0 / ATQ1Result codes shown / hidden
ATM0 / ATM1 / ATM2Speaker off / on until carrier / always on
ATL0 to ATL3Speaker volume low to high
ATX0 to ATX4Which result codes are reported. X4 is the most complete and shows BUSY and NO DIALTONE
ATDT 5551212Dial by tone
ATDP 5551212Dial by pulse
ATAAnswer the phone now
ATH0Hang up
ATOReturn to the online data mode after +++
+++Escape: stop sending data and return to command mode. Pause a second before and after, and type nothing else
ATI0 to ATI7Product code, checksum and other information
AT&C1DCD follows the real carrier signal
AT&D2Hang up and return to command mode when the computer drops DTR
AT&K3Hardware (RTS/CTS) flow control. Other makers use &H1 or &R2
ATS0=1Answer after 1 ring (set 0 to turn off auto answer)

Dial string modifiers

Characters you can put inside a dial string
CharacterMeaning
, (comma)Pause two seconds (set by S8). Use to wait for an outside line: ATDT9,5551212
WWait for a dial tone before continuing
; (semicolon)Dial, then return to command mode without going online
@Wait for quiet answer before dialing
!Flash the hook, used for call transfer
*70,Turn off call waiting on many US lines: ATDT*70,5551212
Digits, * and #Dial as typed

Result codes

Basic result codes
NumberWordMeaning
0OKCommand accepted
1CONNECTConnected at the basic speed
2RINGThe line is ringing
3NO CARRIERCarrier was lost, or nothing answered with a modem tone
4ERRORUnknown command or bad syntax
5CONNECT 1200Connected at 1,200 bps
6NO DIALTONENo dial tone. Check the line cord and the line
7BUSYThe number is busy
8NO ANSWERNo one picked up

Faster modems report their real speed in the CONNECT message, for example CONNECT 28800 or CONNECT 33600, and often add compression and error-correction details such as CONNECT 14400/ARQ/V32/LAPM/V42BIS.

S-registers: the settings behind the commands

A modem keeps its numeric settings in S-registers. ATS7? reads register 7, and ATS7=60 sets it.

S-registers worth knowing
RegisterDefaultWhat it controls
S00Rings before auto-answer. 0 means never answer
S10Counts rings as they arrive
S243Escape character code (43 is the plus sign)
S313Carriage return character
S410Line feed character
S58Backspace character
S62Seconds to wait for a dial tone
S750Seconds to wait for carrier after dialing. Raise it for long distance
S82Length of the comma pause in seconds
S1014How long carrier can be lost before hangup, in tenths of a second
S1195Tone dialing speed in milliseconds
S1250Escape guard time in fiftieths of a second, so 50 is one second

These are common values. The original Hayes Smartmodem used S7=30, and different makers changed others, so treat the table as a starting point. Read your modem's manual for the full list.

An init string that behaves

Most dial-up software sends an init string when it starts. A conservative one for a modern-era modem:

AT&F E1 V1 X4 &C1 &D2 &K3 S0=0

Break it down. &F loads clean factory defaults, E1 echoes what you type, V1 uses word result codes, X4 reports everything, &C1 &D2 makes carrier and DTR behave, &K3 turns on hardware flow control and S0=0 stops it from answering calls. Use S0=1 to run a host that picks up after one ring. Save a working setup with AT&W so ATZ brings it back.

Troubleshooting

Symptoms and likely causes
SymptomLikely cause
No reply to ATWrong COM port or IRQ, speed mismatch, or the modem is off or unplugged
Replies are garbageThe terminal speed and the modem's locked speed do not match. Try 9,600 then 19,200 and see which one makes sense
OK, but it never dialsNo dial tone, ATX settings hide the error, or the line cord is in the wrong jack
Dials, then NO CARRIERThe other side did not answer with a modem, the line is noisy or the speed is not supported on both ends
Connects, then dropsA noisy line, call waiting, an old phone on the same line, or a poor connection. Try locking the modem to a lower speed (the command varies by maker)
Hangs up when you type +++Guard time too short. Pause a full second before and after, or set S12 higher
Mouse freezes when the modem is busyThe mouse and modem share an IRQ. Move one to a free IRQ

Dial a telnet BBS with a modem that is really a network gadget

Modern serial modem emulators (the small boards often sold as Wi-Fi modems or Zimodem builds) speak the same Hayes language, but instead of a phone number they dial a host name and a port. The vintage machine thinks it is on the telephone, while the board opens a TCP connection.

A typical session looks like this. Connect the board to a serial port, set your terminal to the speed it expects, type AT, wait for OK, then ask it to join your network with the board's own commands (they vary by firmware, so check its documentation) and dial with ATDT bbs.example.com:23. You should see CONNECT and the board's banner. Expect to use a null modem adapter and, for a true RS-232 port, make sure the board has the right voltage levels.

If you really are using a phone line

  • Plug into an analog line (POTS). Digital office phone systems can carry voltages that damage a modem.
  • A VoIP adapter can carry a modem call, but slower connections such as 9,600 or 14,400 bps are far more reliable than 33,600 or 56,000.
  • Turn off call waiting with *70, in front of the number, or the call may drop when someone else rings.
  • Pulse dialing (ATDP) is no longer supported on many lines, so use ATDT.

Get a modem talking

An old modem, a serial adapter and a phone line you control are all you need to try the commands.

US Robotics 56K modem

Modem

The external USRobotics modems are the ones hobbyists reach for when they want dial-up to work.

StarTech FTDI USB to serial adapter

Modern PC to old serial port

Connects an external serial modem to a modern PC. Avoid unbranded adapters with fake chips.

Telephone line simulator

Test gear

Gives two modems a dial tone and a ring without a phone company. Handy for testing a BBS at home.

Skip these

  • Typing commands one letter at a time. Some modems need the whole line sent at once.
  • Plugging the wall line into the modem's PHONE jack. The wall goes in the LINE jack, and a telephone goes in the PHONE jack.
  • Leaving auto-answer on a machine you are not watching.

Questions people ask

What does ATZ do?

It resets the modem and loads the stored profile. Use it before every call to start from a known state. AT&F loads the factory defaults instead.

How do I dial a number with a Hayes modem?

Type ATDT followed by the number, for example ATDT5551212, then press Enter. Use ATDP for pulse dialing.

What does +++ do?

It switches an online modem from data mode back to command mode so you can type AT commands. You need a pause of about one second before and after, with nothing typed. ATO takes you back online.

What does NO CARRIER mean?

The modem did not detect a carrier tone from the other end. The call did not connect, or it dropped.

Can I use a dial-up modem on a modern phone line?

Only on an analog line. VoIP adapters can carry slow modem speeds, but results vary, and digital office phone systems can damage a modem.

Sources

From the timeline

Read next

More to explore

Visit the museum