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
| Command | What it does |
|---|---|
| AT | Attention. The modem answers OK if it is alive and talking |
| ATZ | Reset the modem and load the stored profile |
| AT&F | Load the factory defaults |
| AT&W | Write the current settings to non-volatile memory |
| AT&V | View the current settings (many modems) |
| ATE0 / ATE1 | Echo off / on. Off is useful for scripts |
| ATV0 / ATV1 | Numeric result codes / words |
| ATQ0 / ATQ1 | Result codes shown / hidden |
| ATM0 / ATM1 / ATM2 | Speaker off / on until carrier / always on |
| ATL0 to ATL3 | Speaker volume low to high |
| ATX0 to ATX4 | Which result codes are reported. X4 is the most complete and shows BUSY and NO DIALTONE |
| ATDT 5551212 | Dial by tone |
| ATDP 5551212 | Dial by pulse |
| ATA | Answer the phone now |
| ATH0 | Hang up |
| ATO | Return 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 ATI7 | Product code, checksum and other information |
| AT&C1 | DCD follows the real carrier signal |
| AT&D2 | Hang up and return to command mode when the computer drops DTR |
| AT&K3 | Hardware (RTS/CTS) flow control. Other makers use &H1 or &R2 |
| ATS0=1 | Answer after 1 ring (set 0 to turn off auto answer) |
Dial string modifiers
| Character | Meaning |
|---|---|
| , (comma) | Pause two seconds (set by S8). Use to wait for an outside line: ATDT9,5551212 |
| W | Wait 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
| Number | Word | Meaning |
|---|---|---|
| 0 | OK | Command accepted |
| 1 | CONNECT | Connected at the basic speed |
| 2 | RING | The line is ringing |
| 3 | NO CARRIER | Carrier was lost, or nothing answered with a modem tone |
| 4 | ERROR | Unknown command or bad syntax |
| 5 | CONNECT 1200 | Connected at 1,200 bps |
| 6 | NO DIALTONE | No dial tone. Check the line cord and the line |
| 7 | BUSY | The number is busy |
| 8 | NO ANSWER | No 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.
| Register | Default | What it controls |
|---|---|---|
| S0 | 0 | Rings before auto-answer. 0 means never answer |
| S1 | 0 | Counts rings as they arrive |
| S2 | 43 | Escape character code (43 is the plus sign) |
| S3 | 13 | Carriage return character |
| S4 | 10 | Line feed character |
| S5 | 8 | Backspace character |
| S6 | 2 | Seconds to wait for a dial tone |
| S7 | 50 | Seconds to wait for carrier after dialing. Raise it for long distance |
| S8 | 2 | Length of the comma pause in seconds |
| S10 | 14 | How long carrier can be lost before hangup, in tenths of a second |
| S11 | 95 | Tone dialing speed in milliseconds |
| S12 | 50 | Escape 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=0Break 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
| Symptom | Likely cause |
|---|---|
| No reply to AT | Wrong COM port or IRQ, speed mismatch, or the modem is off or unplugged |
| Replies are garbage | The 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 dials | No dial tone, ATX settings hide the error, or the line cord is in the wrong jack |
| Dials, then NO CARRIER | The other side did not answer with a modem, the line is noisy or the speed is not supported on both ends |
| Connects, then drops | A 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 busy | The 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
- Hayes Smartmodem 1981
- Hayes Smartmodem 1200 1982
- Hayes Smartmodem 2400 1985
Read next
- Serial and parallel port pinouts and null modem cablesRS-232 DB9 and DB25 pinouts, how to wire a null modem cable and a loopback plug, parallel port pin assignments, UART chips and the DOS MODE command.
- IRQ, DMA and I/O address cheat sheet for ISA PCsStandard IRQ, DMA channel and I/O port assignments for 286, 386 and 486 PCs, common sound card, modem and network defaults, and how to untangle a hardware conflict.
- BIOS beep codes for vintage PCsWhat the beeps mean when an old PC will not start: IBM, AMI and Award beep code tables, how to count them and the first things to try for each.
More to explore
- Retro PC starter kit: the gear worth buying
- How to fix a dead vintage computer
- How to play old PC games today
- Buying a vintage computer: what to check before you pay
- How to connect retro consoles to a modern TV
- How to run DOS games on Windows, Mac and Linux
- Floppy disk sizes and capacities explained
- How to replace a dead CMOS battery in a vintage PC
- Yellowed retro plastic: what works and what to skip
- How to store vintage computers and games
- The DOS memory map, explained
- CONFIG.SYS and AUTOEXEC.BAT: free up conventional memory
- IDE hard drive size limits explained
- CGA, EGA and VGA video modes and monitor pinouts
- Sound Blaster IRQ, DMA and the BLASTER variable
- MS-DOS version history, from 1.0 to 8.0
- Intel PC processors, from 8088 to Pentium 4
- Game console release dates in Japan, North America and Europe
- How to make a DOS boot floppy disk
- Best soldering station for vintage computer repair
- Best multimeter for retro electronics and vintage computer repair
- Replace a dying hard drive in a retro PC
- Gotek vs USB floppy drive vs Greaseweazle
- The retro bench kit
- How to buy a vintage computer on eBay without getting burned
- RetroTINK vs OSSC vs Framemeister: which retro scaler to buy
- Best capacitor kits and tools for recapping retro computers
- How to clean and test retro game cartridges
- Best sound card and MIDI setup for DOS games
- Game Boy IPS screen and battery upgrades: what to buy
- The holiday gift guide for retro fans
- The retro computing glossary
- The Bookshelf: books on computer and game history