# Module 9: Serial Communication Basics

> Baud, parity, stop bits, timing — the fundamentals every RTU integrator must own.

**Phase:** Physical Network & Transport  
**Estimated time:** 8 min  
**Release status:** Published  
**Content version:** 1.0.0  
**Source:** https://learnmodbus.studioseventeen.io/lesson/serial-communication-basics

## What you'll be able to do
- Configure baud, parity, and stop bits to match a Modbus RTU server.
- Calculate the 3.5-character silent interval at a given baud rate.
- Recognize timing-related failures from a capture.

## Three things people get wrong
1. **Mixing parity and stop-bit defaults.** Default is 8-E-1 (even parity, 1 stop). If no parity, use 8-N-2.
2. **Ignoring the 3.5-char silent interval.** At 19200 baud and below, calculate the 1.5- and 3.5-character intervals. Above 19200 baud, the official guide recommends fixed 750 µs and 1.750 ms intervals.
3. **Treating timeout as 'wrong address'.** A timeout only proves that no valid response arrived before the client deadline. Check reachability, settings, address or Unit Identifier, framing, timing, gateway routing, and physical evidence.

## From the field
**Two stop bits, one bad cable**

An integrator could read at 9600 but timed out at 38400. The cable had marginal capacitance — fine at low baud, sloppy at high. Adding a second stop bit hid the symptom for a week until traffic doubled. The fix was the cable, not the settings.

## References
- [Modbus over Serial Line V1.02](https://www.modbus.org/file/secure/modbusoverserial.pdf) — Section 2.4 — character framing and timing

## Lesson

# Module 9 Lesson: Serial Communication Basics
## Learner Outcome

By the end of this module, learners can identify the serial settings that must match on a Modbus serial link, separate Modbus PDU, serial ADU, and electrical-layer concerns, and classify common timeout symptoms before changing register addresses or data types.

## Key Concepts

- Serial communication sends data as character frames over an electrical interface.
- Baud rate, parity, data bits, and stop bits must match across the serial link.
- The client must address the intended serial server ID, and server IDs should be unique on a multidrop segment.
- Modbus RTU and Modbus ASCII are serial transmission modes. RS-232, RS-422, and RS-485 are electrical layers that can carry serial bytes.
- A malformed serial frame, parity error, framing error, CRC/LRC error, wrong serial address, or timing problem usually appears as a timeout, not as a Modbus exception response.
- Half-duplex links share transmit direction; full-duplex links have separate transmit and receive paths.
- Many field symptoms are transport problems first, not register-map problems.

## Key Terms

- Baud rate: the serial bit rate used by both ends of the link.
- Parity: an error-detection setting that must match between client and server.
- Stop bit: the bit or bits that mark the end of a serial character.
- Timeout: the client-side deadline for receiving a valid response.
- Serial server address: the serial address of the responding Modbus server.
- One-change test: a troubleshooting step that changes only one likely cause before observing the result.

## Source-Grounded Explanation

Teach serial Modbus in layers:

```text
Modbus PDU:        Function Code | Data
Serial Modbus ADU: Address | Function Code | Data | CRC or LRC
Electrical layer:  RS-232, RS-422, RS-485, or another serial interface carrying bytes
```

The PDU is the Modbus operation. The serial ADU wraps that operation with a serial server address and an error-check field. Modbus RTU uses binary bytes and a CRC. Modbus ASCII uses ASCII hex characters and an LRC. The physical layer carries the serial characters but does not change the Modbus PDU.

This layer diagram is shorthand. Modbus RTU uses silent intervals plus CRC framing; Modbus ASCII uses a colon start, ASCII hex characters, LRC, and CRLF ending.

The project wiki summarizes official serial-line guidance this way:

- Devices should support 9600 bps and 19.2 kbps, with 19.2 kbps as the required default.
- Even parity is the default parity mode.
- If no parity is used, two stop bits are used to keep character length consistent.
- RTU frames are separated by silent intervals; an excessive silent gap inside a frame means the receiver should treat the frame as incomplete.

Course reference:

| Serial mode | Data representation | Default course setting | If parity is disabled | Source boundary |
|---|---|---|---|---|
| Modbus RTU | 8-bit binary bytes | `8-E-1` | `8-N-2` | Official serial-line guide basis; verify device manuals for deviations. |
| Modbus ASCII | ASCII hex characters | `7-E-1` | `7-N-2` | Official serial-line guide basis; verify client-tool wording before release labs. |

Field note: `8-N-1` is common in real devices and tools. Teach it as a device/tool setting to verify, not as the official default.

### Timeout Does Not Mean Exception

A Modbus exception response is a valid Modbus response that reports a protocol-level problem, such as illegal function or illegal data address. A serial timeout is different. It means the client did not receive a valid response in time.

Common serial timeout causes include:

| Symptom Source | What Happens |
|---|---|
| Wrong baud rate | Receiver cannot decode the character stream correctly. |
| Wrong parity or stop bits | UART framing/parity checks fail before Modbus can parse the frame. |
| Wrong serial server address | The requested server does not answer. |
| CRC or LRC failure | Receiver discards the frame silently. |
| Timing gap inside RTU frame | Receiver treats the frame as incomplete. |
| Half-duplex direction-control problem | Client or adapter transmits/receives at the wrong time. |
| Noise or weak wiring | Bytes are corrupted before Modbus parsing. |

The troubleshooting habit is to classify the failure first:

```text
No valid response -> check transport/settings/address/timing/error check
Exception response -> check function, PDU address, quantity, access, or device state
Wrong value -> check map, type, word order, scale, unit, quality
```

## Practical Example: Before Changing The Register Map

Scenario: A technician is trying to read a temperature value from a serial controller.

| Field | Example |
|---|---|
| Variant | Modbus RTU |
| Electrical layer | Serial physical layer, type to be confirmed from device manual |
| Serial settings | `19200`, even parity, 8 data bits, 1 stop bit |
| Serial server address | `7` |
| Function code | `03` Read Holding Registers |
| Documented address | `40010` |
| Actual PDU address | `9` if the map uses one-based `40001` notation |
| Quantity | `1` register |
| Data type/scale | signed 16-bit, `/10 deg C` |
| Expected normal response | server address `7`, function `03`, byte count `02`, one register, valid CRC |
| Likely no-response causes | wrong serial settings, wrong server address, CRC/framing failure, direction-control issue, wiring/noise |

If the client times out, do not start by changing `40010` to `40009` or changing word order. First prove the link can exchange valid serial frames with the expected server address and serial settings.

## Common Pitfalls

- Treating "serial" and "RS-485" as synonyms.
- Treating Modbus RTU, Modbus ASCII, and Modbus TCP as interchangeable because they can carry similar PDUs.
- Expecting a Modbus exception response for bad parity, wrong baud, or bad CRC.
- Changing register addresses before confirming serial settings and server address.
- Assuming `8-N-1` is official default because it is common in field tools.
- Ignoring half-duplex direction control when using USB-to-RS-485 adapters.
- Calling a silent serial discard a device bug without checking timing, framing, address, and error check evidence.

## Instructor Flow

1. Draw the three layers: PDU, serial ADU, electrical layer.
2. Compare timeout, exception response, and wrong value as separate diagnostic buckets — the three failure categories (no response, exception response, wrong value) that Module 14 develops into a full troubleshooting method.
3. Walk through the serial settings table.
4. Use simulated log cards to classify wrong baud, wrong parity, wrong server address, and illegal data address.
5. End with a checklist that requires serial evidence before register-map edits.

## Check-Your-Understanding

1. Name three transport-layer causes that can produce a timeout without a Modbus exception response.
2. What fields does a serial Modbus ADU add around the Modbus PDU?
3. Why should a troubleshooting worksheet ask for baud rate, parity, data bits, stop bits, and serial server address before changing function code?
4. Why is `8-N-1` a field/device setting to verify rather than the official default taught in this course?

## Source Notes

- Official serial basis: Modbus over Serial Line Specification and Implementation Guide V1.02 for serial settings, RTU/ASCII framing, silent interval behavior, serial addressing, and default parity guidance.
- Official protocol basis: Modbus Application Protocol Specification V1.1b3 for PDU and exception-response concepts.
- Official citation targets: [official-citation-map.md](https://learnmodbus.studioseventeen.io/resource/official-citation-map) rows for serial client/server legacy terminology, serial server address range and broadcast address, serial implementation defaults and character formats, RTU/ASCII frame fields, RTU timing and ASCII framing, CRC/LRC checking, PDU vs ADU and general frame structure, and normal response vs exception response.
- Field-note basis: timeout triage and adapter direction-control symptoms come from project troubleshooting notes and must be tied to tool/hardware evidence before release labs.
- Needs verification: final screenshots, client-tool wording, and adapter-specific behavior require selected tools and versions.

## Completion Checkpoint

Before moving on, learners should classify a serial failure as likely baud, parity, stop-bit, server-address, timeout-window, or map-related evidence, then choose one safe next test.

## Reusable Assets

- [Serial settings triage checklist](https://learnmodbus.studioseventeen.io/resource/serial-settings-triage-checklist)
- [Serial settings triage lab](https://learnmodbus.studioseventeen.io/lesson/serial-communication-basics?page=lab-1)
- [Module 9 quiz](https://learnmodbus.studioseventeen.io/lesson/serial-communication-basics?page=quiz)

## Labs

### Lab 1

# Lab 37: Serial Settings Triage Without Hardware
## Learner Outcome

Learners can classify serial Modbus failures as no response, exception response, or wrong value, then choose the next evidence to gather without changing register-map assumptions prematurely.

## Prerequisites

- Module 2: PDU and ADU.
- Module 4: normal and exception responses.
- Module 5: documented address versus PDU address.
- Module 9 lesson through timeout triage.

## Safety And Scope

This is a no-hardware paper lab. It uses simulated log cards, not a real serial port. Do not connect to production equipment or change device serial settings during this lab.

Optional hardware tracks should be added only after a specific adapter, client tool, simulator/device, operating system, and expected output are verified.

## Scenario

A technician is trying to read holding register `40010` from a serial controller at server address `7`. The map says `40010`, signed 16-bit, `/10 deg C`. The first request to try is function `03`, PDU address `9`, quantity `1`.

The expected working setup is:

| Field | Expected |
|---|---|
| Variant | Modbus RTU |
| Serial server address | `7` |
| Baud rate | `19200` |
| Parity | even |
| Data bits | `8` |
| Stop bits | `1` |
| Function | `03` |
| PDU address | `9` |
| Quantity | `1` |

## Log Cards

| Card | Observed Evidence |
|---|---|
| F | Client sends to server `7`, function `03`, PDU address `9`, quantity `1`. Response is normal: server `7`, function `03`, byte count `02`, data `00 FA`, valid error check. |
| A | Client sends to server `7`, function `03`, PDU address `9`, quantity `1`. No bytes are received before timeout. Local notes show client set to `9600 8-E-1`; device label says `19200 8-E-1`. |
| B | Client sends to server `7`, function `03`, PDU address `9`, quantity `1`. Serial analyzer shows bytes returned, but client marks framing/parity error. Client is `19200 8-N-1`; device label says `19200 8-E-1`. |
| C | Client sends to server `1`, function `03`, PDU address `9`, quantity `1`. No response. Device label says serial address `7`. |
| D | Client sends to server `7`, function `03`, PDU address `9`, quantity `1`. Response from server `7`: function `83`, exception code `02`, valid error check. |
| E | Client sends to server `7`, function `03`, PDU address `10`, quantity `1`. Response is normal with raw value `0000`, but nearby register `9` is known to contain `00FA`. |

## Procedure

1. For each card, classify the symptom as `No valid response`, `Exception response`, or `Wrong value`.
2. Identify the first evidence to check next.
3. Decide whether the learner should change serial settings, serial server address, function/PDU address, or data decoding.
4. Record which layer is implicated: PDU, serial ADU, serial settings, physical/electrical layer, or source map.
5. Fill the answer table.

## Worksheet

| Card | Bucket | Most Likely Cause | Layer | Next Check | What Not To Change Yet |
|---|---|---|---|---|---|
| F |  |  |  |  |  |
| A |  |  |  |  |  |
| B |  |  |  |  |  |
| C |  |  |  |  |  |
| D |  |  |  |  |  |
| E |  |  |  |  |  |

## Answer Key

| Card | Bucket | Most Likely Cause | Layer | Next Check | What Not To Change Yet |
|---|---|---|---|---|---|
| F | Normal response | Baseline working case | Serial ADU and PDU both plausible | Decode raw `00 FA` using the source map and record evidence | Do not change any settings without a symptom |
| A | No valid response | Baud mismatch | Serial settings | Match client to `19200 8-E-1` or confirm device setting | Register address, word order, scale |
| B | No valid response | Parity/stop-bit mismatch or tool setting mismatch | Serial settings | Confirm `8-E-1` versus `8-N-1`; inspect tool parity error | Register address, data type |
| C | No valid response | Wrong serial server address | Serial ADU | Send to server address `7`; confirm no duplicate IDs | Baud and register map if other evidence is absent |
| D | Exception response | Function `03` returned exception code `02` Illegal Data Address | PDU/source map | Recheck documented address, PDU address, table, quantity, access | Serial settings, because a valid response arrived |
| E | Wrong value | Off-by-one PDU address | Source map/addressing | Try PDU address `9` with documented-address evidence | Baud, parity, CRC, word order |

## Expected Observations

- Bad serial settings usually create no valid Modbus response, not a Modbus exception.
- A valid exception response proves that at least some serial transport path is working.
- Wrong value is a different diagnostic path from timeout.
- Changing several assumptions at once destroys evidence.

## Troubleshooting Notes

- A client timeout is not enough evidence to change register addresses.
- If a serial analyzer reports framing or parity errors, stay in the serial-settings layer.
- If the device is silent only for one server address, check serial server address before wiring.
- If the response function code has the exception bit set, move to function/address/quantity/access evidence.

## Check Questions

1. Which card proves the serial path returned a valid Modbus response?
2. Which cards should not lead to register-map changes yet?
3. Why does card E belong to the wrong-value bucket rather than the no-response bucket?
4. What real tool evidence would you need before turning this into a runnable hardware lab?

## Instructor Notes

- Ask learners to explain why each wrong answer is tempting.
- Keep the three buckets visible: no valid response, exception response, wrong value.
- Do not let learners change address, baud, parity, and scale in one step.
- Optional extension: add a real serial client log after tool versions are selected.

## Source Notes

- Official serial source: Modbus over Serial Line Specification and Implementation Guide V1.02 for serial settings, RTU framing, server address, and silent discard behavior.
- Official protocol source: Modbus Application Protocol Specification V1.1b3 for exception-response shape and exception code `02`.
- Synthetic source: all log cards are course-authored teaching fixtures.

## Knowledge check

# Module 9 Quiz: Serial Communication Basics
## Questions

### Multiple Choice

1. A Modbus RTU client receives no valid bytes before timeout. Which cause is most likely to produce this symptom without a Modbus exception response?
   - A. Wrong parity setting.
   - B. Illegal data address returned by the server.
   - C. Unsupported function code returned as exception `01`.
   - D. Valid read response with byte count `02`.

2. Which layer adds the serial server address and CRC/LRC around the Modbus PDU?
   - A. Modbus TCP MBAP header.
   - B. Serial Modbus ADU.
   - C. Vendor register map.
   - D. Engineering-unit scale.

3. Which statement is safest about `8-N-1`?
   - A. It is the official default for all Modbus RTU devices.
   - B. It is common in field devices and tools, but must be verified against the device and client settings.
   - C. It is a Modbus TCP setting.
   - D. It changes the PDU address.

4. A client sends to serial server `1`, but the device label says address `7`. No response is received. What should be checked before changing `40010` to another register?
   - A. Serial server address.
   - B. Floating-point word order.
   - C. Scale factor.
   - D. Unit label.

5. A response contains exception function `83` and exception code `02`. What does this prove?
   - A. The serial path returned a valid Modbus exception response.
   - B. The baud rate must be wrong.
   - C. The server never heard the request.
   - D. The value should be byte-swapped.

6. According to the official serial-line guidance, which parity mode is the default for Modbus serial devices, and what stop-bit rule applies if parity is disabled?
   - A. No parity is the default, with one stop bit.
   - B. Even parity is the default, and if parity is disabled two stop bits are used.
   - C. Odd parity is the default, with one stop bit.
   - D. Parity is not defined by the serial-line guidance and is vendor-specific.

7. A client reads holding register `40010` from serial server `7`. The device label says `19200 8-E-1` but the client is set to `9600 8-E-1`, and the client times out. What is the first setting to fix?
   - A. The floating-point word order.
   - B. The scale factor.
   - C. The baud rate mismatch between client and device.
   - D. The engineering unit label.

### Short Answer

1. List four serial settings or identifiers that should be recorded before changing register-map assumptions.
2. Why do bad CRC, parity, framing, or timing problems usually look like timeouts?
3. Explain the difference between a Modbus exception response and a serial timeout.
4. Name one reason half-duplex direction control matters on many RS-485 Modbus RTU links.

### Applied Scenario

A technician is reading documented holding register `40010` from serial server `7`.

| Field | Current Setting |
|---|---|
| Device label | `19200 8-E-1`, server address `7` |
| Client setting | `9600 8-E-1`, server address `7` |
| Function | `03` |
| PDU address | `9` |
| Quantity | `1` |
| Client result | Timeout |

Tasks:

1. Classify the symptom bucket.
2. Identify the first setting to fix or verify.
3. State why changing data type, word order, or scale is premature.
4. State what evidence would move the problem from serial settings to function/address troubleshooting.

## Answer Key

1. Multiple choice: A. Wrong parity can prevent the receiver from accepting a valid serial frame. B and C are valid exception responses, not silent serial timeouts. D is a normal response.
2. Multiple choice: B. The serial Modbus ADU wraps the PDU with serial address and error check. MBAP is for Modbus TCP, and scale/register-map meanings are not transport fields.
3. Multiple choice: B. `8-N-1` appears often in real tools and devices, but the course should teach it as a setting to verify, not as the official default.
4. Multiple choice: A. A request sent to the wrong serial server address can be ignored by the intended server.
5. Multiple choice: A. Exception function `83` and code `02` mean a valid Modbus exception response was received, so the next check is function/address/quantity/access evidence, not baud rate.
6. Multiple choice: B. The official serial-line guidance sets even parity as the default; when parity is disabled, two stop bits are used to keep character length consistent (`8-N-2`). `8-N-1` is common in field tools but is not the official default.
7. Multiple choice: C. The client `9600` does not match the device `19200`, so the baud rate is the first thing to fix. Word order, scale, and unit are data-interpretation fields that only matter after valid response bytes are received.

## Distractor Review Notes

| Question | Correct | Why The Distractors Are Wrong |
|---:|---|---|
| 1 | A | B/C are valid exception-response cases, and D is a valid normal read response rather than a silent timeout cause. |
| 2 | B | A is TCP framing, C is source meaning, and D is an engineering interpretation rule. |
| 3 | B | A invents a universal default, C moves the setting to TCP, and D confuses serial format with register addressing. |
| 4 | A | B/C/D are data-interpretation fields that come after a valid response from the intended serial server. |
| 5 | A | B/C contradict the received valid frame, and D jumps to data decoding instead of acting on exception evidence. |
| 6 | B | A/C name the wrong default parity mode, and D denies that the serial-line guidance defines a default at all. |
| 7 | C | A/B/D are data-interpretation fields that only apply after a valid response; the mismatched baud rate blocks any valid frame first. |

Short answer:

1. Good answers include baud rate, parity, data bits, stop bits, serial server address, Modbus variant, client timeout, and adapter/tool setting.
2. Those errors prevent a valid Modbus frame from being accepted. Receivers normally discard malformed frames rather than returning a Modbus exception.
3. A Modbus exception response is a valid Modbus response with an exception function and code. A serial timeout means the client did not receive a valid response in time.
4. On a half-duplex link, only one side should transmit at a time. Poor adapter direction control or two devices transmitting together can corrupt bytes before Modbus parsing.

Applied scenario:

1. No valid response.
2. Baud rate mismatch: the client is `9600`, while the device label says `19200`.
3. Data type, word order, and scale apply after valid response bytes are received. The current evidence says the client has not received a valid response.
4. A valid normal response or exception response from server `7` would prove the serial path is at least partly working and move the next check to function, PDU address, quantity, table, access, or map evidence.

## Source Notes

- Official citation targets: [official-citation-map.md](https://learnmodbus.studioseventeen.io/resource/official-citation-map) rows for serial client/server legacy terminology, serial server address range and broadcast address, serial implementation defaults and character formats (SER-2.5-DEFAULTS: default parity is even, 8-N-2 when parity is disabled), RTU/ASCII frame fields, RTU timing and ASCII framing, CRC/LRC checking, PDU vs ADU and general frame structure, and normal response vs exception response.
- Adapter direction control, tool timeout wording, and field symptom patterns remain tool/hardware evidence gates.

---
_Learn Modbus · learnmodbus.studioseventeen.io · Module 9/16 · v1.0.0 · Exported for offline / agent use._
