Serial Connections

Part of Networking

Point-to-point data links using serial transmission — one bit at a time.

Why This Matters

Serial communication — transmitting bits one after another over a single wire — is the foundation of most point-to-point data links. While parallel buses (multiple simultaneous bits) are used inside computers where wire length is tiny, serial links dominate for any distance beyond a few centimeters. RS-232 serial ports, USB, Ethernet (which uses serial signaling at the physical layer), fiber optic links, and wireless all use serial transmission.

Understanding serial connections matters for practical networking because serial interfaces remain the primary way to configure and access network equipment — routers, switches, and servers often have console serial ports that provide management access even when the network itself is not configured or is broken. Serial connections are also the simplest networking technology, making them the right starting point for understanding higher-level protocols.

In a reconstruction context, serial communication skills are valuable for interfacing microcontrollers with sensors and displays, for configuring network equipment, and for building simple point-to-point links where full Ethernet infrastructure is not available.

RS-232: The Classic Serial Standard

RS-232 (or V.24 in ITU terminology) is the original PC serial communication standard, introduced in 1969. Despite its age, RS-232 ports appear on laboratory instruments, industrial equipment, and network device console ports to this day. Understanding RS-232 means you can communicate with an enormous range of equipment.

RS-232 uses single-ended signaling: each signal is referenced to a common ground. Voltage levels are defined relative to ground: +3V to +15V represents logical 0 (SPACE); -3V to -15V represents logical 1 (MARK). The high voltages and relatively large noise margin make RS-232 tolerant of long cable runs and moderate interference, though maximum practical distance is about 15 meters at typical speeds.

The original RS-232 standard uses a 25-pin connector (DB-25), but most PC implementations use a 9-pin connector (DB-9 or DE-9). The key signals in the DB-9 connector are: pin 2 (RxD, receive data), pin 3 (TxD, transmit data), pin 5 (GND, ground), pin 7 (RTS, request to send), and pin 8 (CTS, clear to send). For simple communication without hardware flow control, only TxD, RxD, and GND are needed.

RS-232 is point-to-point: one transmitter and one receiver per wire. There is no built-in addressing — whatever is transmitted on TxD arrives directly at the other end’s RxD. For this reason, RS-232 does not need a network protocol layer — it is used for direct device-to-device communication.

Asynchronous Serial Communication

Most RS-232 communication is asynchronous — there is no separate clock signal, so the receiver must recover the timing from the data signal itself. This is done using a technique called start-stop framing.

Before communication begins, both sender and receiver agree on a bit rate (baud rate), number of data bits (typically 8), parity (none, even, or odd), and number of stop bits (typically 1). These settings must match exactly or communication fails.

When no data is being sent, the line is held at the MARK (logical 1) level. To send a byte, the sender:

  1. Drives the line to SPACE (logical 0) for one bit time — this is the start bit, which signals that a data byte is coming.
  2. Sends each data bit in order from least significant to most significant.
  3. Optionally sends a parity bit.
  4. Drives the line to MARK (logical 1) for one bit time — this is the stop bit.
  5. Returns to idle (MARK) until the next byte.

The receiver detects the falling edge of the start bit, waits 1.5 bit times to sample the middle of the first data bit, then samples one bit per bit time for the remaining data bits. By starting the sampling from the start bit’s edge, the receiver doesn’t need a separate clock.

The baud rate is the number of signal changes per second, which for simple two-level signaling equals the bit rate. Common baud rates are 9600, 19200, 38400, 57600, and 115200 bits per second. Higher baud rates are more susceptible to noise and clock accuracy requirements.

RS-422 and RS-485

RS-422 and RS-485 use differential signaling — each data signal is carried on a pair of wires, and the receiver responds to the difference between the two wires rather than the absolute voltage. This differential approach cancels common-mode noise, allowing much longer cable runs (up to 1200 meters at low speeds) and higher speeds than RS-232.

RS-422 is unidirectional point-to-point: one transmitter drives up to 10 receivers. RS-485 is multidrop: up to 32 devices can share the same pair of wires, with any device able to transmit. This bus architecture makes RS-485 suitable for industrial control networks where many sensors and actuators share a common wiring run.

RS-485 requires that only one device transmits at a time (half-duplex operation). Each device’s transmitter is normally in a high-impedance (tri-stated) state, enabled only when that device needs to transmit. Software or hardware arbitration ensures only one device transmits at a time. Protocols like Modbus RTU, DMX512, and many industrial automation protocols run over RS-485.

For a reconstruction context, RS-485 is particularly valuable for building sensor networks. A single pair of wires can connect temperature sensors, moisture sensors, flow meters, and actuators throughout a building or across a farm. The devices share the wire and take turns transmitting their measurements to a central controller.

UART and Microcontroller Serial

Modern microcontrollers include UART (Universal Asynchronous Receiver/Transmitter) hardware that handles the timing of serial communication in hardware. The CPU writes bytes to a transmit register; the UART hardware generates the start bit, data bits, parity, and stop bits automatically. Similarly, the UART captures received bits and assembles them into bytes that the CPU reads from a receive register.

Most microcontrollers use 3.3V or 5V logic levels for their UART interfaces, not RS-232’s ±12V. Connecting a microcontroller directly to an RS-232 port will not work — the voltage levels are incompatible. Level-shifting ICs (MAX232 and equivalents) convert between RS-232 voltages and TTL/CMOS logic levels.

USB-to-serial adapters are widely available and allow a computer without a physical serial port (which is most modern computers) to communicate with RS-232 equipment. The adapter appears as a virtual COM port or tty device. CH340, CP2102, and FTDI chips are common in these adapters; FTDI chips generally have better driver support.

Console Ports and Network Equipment

Network equipment (routers, switches, servers) typically has a console serial port that provides management access independent of the network interfaces. This is the interface used to initially configure the device and to recover from misconfiguration that makes the network interfaces inaccessible.

Cisco equipment traditionally uses an RJ-45 console port with a specific pinout (not the same as an Ethernet cable). A rollover cable (each pin connected to the mirrored pin at the other end) connects this port to a DB-9 serial port on a terminal or to a USB-serial adapter. The serial settings are typically 9600 baud, 8 data bits, no parity, 1 stop bit (9600 8N1).

The console port runs a command-line interface to the device. Being able to access this interface is essential for initial setup, troubleshooting, and recovery. A serial terminal program (PuTTY on Windows, minicom on Linux) provides access to the console port. The skills to use a serial console are fundamental to working with network equipment.