Modem Handshake

Bell 103 Modem Handshake Simulator

Phone: 555-0725

Introduction

Welcome to the Modem Handshake educational simulator---your chance to witness the invisible magic that happens every time two modems connect.

Have you ever wondered what those strange whistles, chirps, and static bursts actually mean when your modem dials out? In the seconds between "ATDT" and "CONNECT," an intricate electronic conversation takes place. Two machines, speaking only in carefully crafted tones, negotiate everything needed for reliable communication. This utility pulls back the curtain on that process.

In the early 1960s, when the first modems emerged from Bell Telephone Laboratories, engineers performed something remarkable: they transformed ordinary telephone lines---designed only for the human voice---into pathways for digital data. The Bell 103 modem, introduced in 1962, established the standard for full-duplex communication at 300 baud using frequency-shift keying (FSK). Every time two modems connect, they perform an intricate dance of tones and signals that has fascinated telecommunications engineers for decades.

The sounds themselves tell a story. That initial warble? One modem announcing its presence with a 2225 Hz tone. The answering chirp? The remote modem responding with 1270 Hz. The brief static burst? Both modems testing the line quality. Then silence---but not really silence. Data is flowing, encoded as subtle frequency shifts too rapid for human ears to distinguish.

Modem Handshake brings this process to life. Rather than treating the modem handshake as an invisible black box, this utility illuminates each step: the Hayes AT commands that control your modem, the RS-232 signals that coordinate between your terminal and the modem, and the precise timing that makes reliable data communication possible. Whether you are troubleshooting a stubborn connection, configuring new equipment, or simply curious about the technology that powers your BBS sessions, Modem Handshake provides the insight you need.

The Bell 103 standard revolutionized personal computing. Before affordable modems, computer users were isolated. The Bell 103---and its successors---created the connected world of bulletin boards, online services, and remote computing that we enjoy today.

Key Features

Quick Start

Ready to see a modem handshake in action? Follow these steps:

  1. From the EC-TTY main menu, dial 555-0725
  2. When you see the welcome screen, press N to advance to the first step
  3. Watch as the utility displays each AT command and RS-232 signal transition
  4. Press N again to advance through each phase, or press A for auto-play mode
  5. Press Q at any time to exit
ATZ
OK
ATDT555-0725
CONNECT 300

    Modem Handshake EDUCATIONAL SIMULATOR     

Learn how modems establish connections!

[N]ext step  [A]uto-play  [Q]uit: _

Within moments, you will understand the elegant sequence that occurs every time two modems connect.

Understanding the handshake is more than academic curiosity. When connections fail, when characters are garbled, when modems refuse to negotiate---this knowledge helps you diagnose the problem. You will know which signal to check, which setting to adjust, which step went wrong.

Getting Connected

Dialing In

To access Modem Handshake, dial 555-0725 from the main terminal. Upon carrier detection, the utility immediately asserts DTR (Data Terminal Ready) and RTS (Request to Send) signals to establish proper RS-232 handshaking with your terminal.

CODE_FENCE_0

Modem Requirements

Parameter Value
Baud Rate 300 baud (Bell 103)
Protocol 8N1 (8 data bits, no parity, 1 stop bit)
Flow Control Hardware (RTS/CTS)
Carrier Detect Required
DTR Assertion Automatic on connect

Ensure your terminal emulator is configured for hardware flow control. Software flow control (XON/XOFF) may interfere with the handshake demonstration.

RS-232 Signal Tests

The RS-232 standard defines multiple control signals essential for proper modem communication. Understanding these signals is important for diagnosing connection failures and configuring your equipment correctly.

DTR (Data Terminal Ready) - Pin 20

DTR is asserted by the DTE (your terminal) to indicate it is powered on and ready to communicate. The utility automatically asserts DTR upon connection, signaling to the modem that the terminal is operational.

State: ASSERTED (+12V) - Terminal is ready
State: DEASSERTED (-12V) - Terminal not ready, may cause disconnect

RTS (Request to Send) - Pin 4

RTS is asserted when the terminal wishes to transmit data. The modem responds with CTS when it is ready to receive. This handshake prevents data loss during transmission.

DTE asserts RTS -> DCE responds with CTS -> Data transmission begins

CTS (Clear to Send) - Pin 5

CTS is the modem's response to RTS, indicating the modem is ready to accept data for transmission. If CTS is not asserted, the terminal must wait before sending data.

DCD (Data Carrier Detect) - Pin 8

DCD indicates that the modem has detected a valid carrier signal from the remote modem. This is the primary indicator that a connection has been established.

DCD HIGH: Carrier present - Connection active
DCD LOW: No carrier - Connection lost or not established

DSR (Data Set Ready) - Pin 6

DSR indicates the modem is powered on and ready. This signal should be asserted before attempting to dial or answer calls.

Signal Summary

Signal Pin Direction Purpose
DTR 20 DTE -> DCE Terminal ready
RTS 4 DTE -> DCE Request to transmit
CTS 5 DCE -> DTE Clear to transmit
DCD 8 DCE -> DTE Carrier detected
DSR 6 DCE -> DTE Modem ready
RI 22 DCE -> DTE Ring indicator

Handshake Sequences

The modem handshake follows a precise sequence of commands and signal transitions. The utility demonstrates each step of this process.

Step 1: Enable Command Echo

CODE_FENCE_0

The ATE1 command enables local echo, allowing you to see the characters you type. ATE0 disables echo. This is essential for debugging command sequences.

Step 2: Configure Speaker

CODE_FENCE_0

ATM0 disables the modem speaker. ATM1 enables sound during dialing only, ATM2 keeps the speaker on always. The characteristic modem negotiation sounds occur during carrier establishment.

Step 3: Dial Remote Number

CODE_FENCE_0

The ATD command initiates dialing. ATDT uses tone dialing (DTMF), while ATDP uses pulse dialing for older exchanges. The modem reports RINGING when it detects ringback tone from the remote end.

Step 4: Incoming Call Detection

CODE_FENCE_0

When receiving a call, the modem asserts the RI (Ring Indicator) signal and sends "RING" to the terminal for each ring cycle detected on the telephone line.

Step 5: Answer Call

CODE_FENCE_0

ATA commands the modem to go off-hook and begin carrier negotiation. Upon successful carrier detection, the modem reports the connection speed. CONNECT 300 indicates a Bell 103 connection.

Step 6: RS-232 Signal Assertion

CODE_FENCE_0

Upon carrier establishment, the following signal sequence occurs:

  1. DCD asserts - Carrier detected from remote modem
  2. DTR confirmed - Terminal acknowledges readiness
  3. RTS asserts - Terminal requests to send data
  4. CTS asserts - Modem clears terminal for transmission

Step 7: Connection Established

CODE_FENCE_0

The handshake is complete. Data can now flow bidirectionally at 300 baud using frequency-shift keying modulation.

Understanding What You Have Witnessed

In just seven steps, two machines that had never communicated before established a reliable data channel. Consider what was accomplished:

This sequence---variations of which occur billions of times daily around the world---is the foundation of all modem communication. Every BBS call, every file transfer, every remote login begins with this dance of signals and tones.

Interpreting Results

Understanding handshake success and failure indicators is important for effective troubleshooting.

Successful Handshake Indicators

This simulator demonstrates the Bell 103 handshake at 300 baud. Upon completion, you will see the "HANDSHAKE COMPLETE" banner confirming the connection was established. The following table lists the result codes your modem would report in a real-world session:

Indicator Meaning
CONNECT 300 Bell 103 connection at 300 baud established
DCD LED ON Carrier detected, connection active
CTS LED ON Modem ready for data

Failure Result Codes

Result Meaning Action
NO CARRIER Carrier negotiation failed Check line quality, try again
NO DIALTONE No dial tone detected Check phone line connection
BUSY Remote line busy Retry after delay
NO ANSWER Remote didn't answer Verify number, check hours
ERROR Invalid AT command Check command syntax

Repeated "NO CARRIER" results may indicate line noise exceeding the modem's tolerance. Consider reducing baud rate or checking physical cable connections.

Troubleshooting Modem Issues

Common handshake problems and their solutions.

Problem: DTR Not Asserting

Symptoms: Modem won't dial, ignores commands after CONNECT

Solutions:

Problem: RTS/CTS Flow Control Failure

Symptoms: Data corruption, dropped characters

Solutions:

Problem: No Carrier After Dial

Symptoms: Modem dials, hears tones, then NO CARRIER

Solutions:

Problem: Frequent Disconnections

Symptoms: Connection drops during session

Solutions:

Problem: Garbled Characters

Symptoms: Random wrong characters, checksums fail

Solutions:

Use ATI4 to display modem's current configuration. ATI6 shows link diagnostics after disconnection.

Cable Checklist

Before assuming a modem problem, verify your cabling:

  1. Is the cable a modem cable or null-modem cable? They are not interchangeable.
  2. Are all required pins connected? Some cheap cables omit control signals.
  3. Is the gender correct? DB-25 connections must match (male-to-female for DTE-DCE).
  4. Is the cable too long? RS-232 signals degrade beyond 50 feet.

A cable tester or breakout box is invaluable for diagnosing these issues.

RS-232 Signal Reference

Complete reference for RS-232C (EIA-232-D) signals used in modem communication on DB-25 connectors.

Pin Signal Name Direction Description
1 FG Frame Ground - Chassis ground reference
2 TxD Transmit Data DTE->DCE Data from terminal to modem
3 RxD Receive Data DCE->DTE Data from modem to terminal
4 RTS Request to Send DTE->DCE Terminal wants to transmit
5 CTS Clear to Send DCE->DTE Modem ready for data
6 DSR Data Set Ready DCE->DTE Modem is operational
7 SG Signal Ground - Common signal reference
8 DCD Data Carrier Detect DCE->DTE Carrier signal present
20 DTR Data Terminal Ready DTE->DCE Terminal is ready
22 RI Ring Indicator DCE->DTE Incoming call detected

Signal Voltage Levels

Logic 1 (Mark/OFF):   -3V to -15V
Logic 0 (Space/ON):   +3V to +15V
Undefined:            -3V to +3V

Note: Control signals use inverted logic:
  Asserted/ON:  +3V to +15V
  Deasserted/OFF: -3V to -15V

Null Modem Configuration

For direct DTE-to-DTE connections without modems, a null modem cable crosses the appropriate signals:

DTE-1     DTE-2
     
TxD (2) -> RxD (3)
RxD (3) <- TxD (2)
RTS (4) -> CTS (5)
CTS (5) <- RTS (4)
DTR (20)-> DCD (8) + DSR (6)
DCD (8) <- DTR (20)
GND (7)  GND (7)

Appendix A: Command Reference

Interactive commands available within Modem Handshake.

Utility Commands

Key Command Description
N Next Advance to next handshake step
A Auto-play Automatically cycle through all steps
Q Quit Exit the utility and disconnect

Hayes AT Command Reference

Command Description
ATZ Reset modem to stored profile
ATE0/ATE1 Disable/Enable command echo
ATM0/ATM1 Speaker off/on during dial
ATD[n] Dial number n
ATDT[n] Tone dial number n
ATDP[n] Pulse dial number n
ATA Answer incoming call
ATH Hang up (go on-hook)
AT&D0 Ignore DTR signal
AT&D2 Hang up on DTR drop
ATI Display modem identification
AT&V View current configuration
AT&W Write configuration to NVRAM

S-Register Reference

Register Default Description
S0 0 Rings before auto-answer (0=disabled)
S1 0 Ring count (read-only)
S2 43 Escape character (43 = +)
S7 30 Carrier wait time (seconds)
S10 14 Carrier loss delay (1/10 seconds)
S12 50 Escape guard time (1/50 seconds)

Appendix B: Quick Reference Card

+---------------------------------------------------------------+
|                   Modem Handshake QUICK REFERENCE                |
+---------------------------------------------------------------+
|  DIAL: 555-0725                                               |
|                                                               |
|  UTILITY COMMANDS:                                            |
|    N = Next step       A = Auto-play       Q = Quit           |
|                                                               |
|  HANDSHAKE SEQUENCE:                                          |
|    1. ATE1 - Enable echo                                      |
|    2. ATM0 - Speaker off                                      |
|    3. ATDT - Dial number                                      |
|    4. RING - Incoming call                                    |
|    5. ATA  - Answer call                                      |
|    6. DCD/RTS/CTS/DTR - Signal assertion                      |
|    7. CONNECT 300 - Ready for data                            |
|                                                               |
|  RS-232 SIGNALS (DB-25):                                      |
|    Pin 2  TxD  Transmit     Pin 5  CTS  Clear to Send         |
|    Pin 3  RxD  Receive      Pin 6  DSR  Data Set Ready        |
|    Pin 4  RTS  Request      Pin 8  DCD  Carrier Detect        |
|    Pin 7  GND  Ground       Pin 20 DTR  Terminal Ready        |
+---------------------------------------------------------------+

Appendix C: Glossary

Baud - Unit of signaling speed; at 300 baud, the modem transmits 300 signal changes per second.

Bell 103 - AT&T standard for 300 baud full-duplex modem communication using FSK modulation.

Carrier - The continuous tone signal that modems use to carry data; loss of carrier ends the connection.

CTS (Clear to Send) - RS-232 signal from modem indicating it is ready to accept data for transmission.

DCD (Data Carrier Detect) - RS-232 signal indicating the modem has detected a valid carrier from the remote modem.

DCE (Data Communications Equipment) - The modem; the device that connects to the telephone line.

DSR (Data Set Ready) - RS-232 signal indicating the modem is powered on and operational.

DTE (Data Terminal Equipment) - Your terminal or computer; the device that sends and receives data.

DTR (Data Terminal Ready) - RS-232 signal from terminal indicating it is powered and ready to communicate.

FSK (Frequency-Shift Keying) - Modulation technique where different frequencies represent 0 and 1 bits.

Full-Duplex - Simultaneous two-way communication; both ends can transmit and receive at the same time.

Hayes AT Commands - Industry-standard command set for controlling modems, beginning with "AT" (attention).

Handshake - The negotiation process between two modems to establish communication parameters.

RS-232 - Standard defining electrical characteristics and pinouts for serial communication.

RTS (Request to Send) - RS-232 signal from terminal requesting permission to transmit data.

Where to Go From Here

You now understand what happens in those few seconds between dialing and "CONNECT." This knowledge is power: when connections fail, you can diagnose the problem systematically. When configuring new equipment, you know which signals must be present and when.

The modem handshake is a beautiful piece of engineering---a solution developed decades ago that still works reliably today. Every time you dial into a BBS, your modem and the remote modem perform this same intricate dance. Now you know the steps.

See Also


Modem Handshake is a product of Emulator.ca Systems. For technical support, consult your EC-TTY documentation or contact your system operator.