> ## Documentation Index
> Fetch the complete documentation index at: /docs/llms.txt
> Use this file to discover all available pages before exploring further.

# UART

> Connect a USB serial port or UART adapter, read firmware output, send commands, and reset the board only when you intend to.

Use UART for boot logs, application messages, or a firmware command console. Connect the port in a Serial Monitor tab, then ask Inlay to read the output or wait for a specific message.

## Wire the board

1. Connect the board's USB serial interface, or a UART adapter your operating system supports. Install the adapter's driver if its port doesn't appear.
2. For a separate adapter, connect target TX to adapter RX and connect ground. Connect adapter TX to target RX only when you need to send input.
3. Match the adapter's signal voltage to the board.

Port names depend on the operating system. Use the port the Monitor lists for your device.

| Operating system | Example port |
| - | - |
| Linux | `/dev/ttyUSB0` or `/dev/ttyACM0` |
| macOS | `/dev/cu.usbserial-0001` |
| Windows | `COM3` |

For a [bench](/docs/integrations/benches.md), the port, driver, and device permissions belong to the bench machine. Bench ports start with `bridge:`.

## Connect in the Monitor

In the terminal UI, run `/monitor` to follow these steps in a browser, or use the serial sidebar. See [Use the terminal UI](/docs/debug-mode/serial-transports.md#use-the-terminal-ui).

1. Open a **Serial Monitor** tab. See [Open a Serial Monitor tab](/docs/debug-mode/serial-transports.md#open-a-serial-monitor-tab).
2. Select the port chip at the start of the toolbar, then choose the port under **Port**. Each entry shows the port and the device name.
3. Leave **Mode** set to **UART**.
4. Set **Baud** to the firmware's rate. The list runs from 300 to 921600 and includes 74880 for ESP bootloader output. The default is 115200.
5. Set **Line ending** to what your firmware expects at the end of a command: **LF**, **CR**, **CRLF**, or **None**.
6. Select **Connect**.

If you don't know the baud rate, select **Detect** beside **Baud** instead of **Connect**, while the firmware is printing. Inlay tries 115200, then the other common rates from 1200 to 921600, and connects at the first one that produces readable text. Detection needs output to work with: on a silent board it can't find the rate. It doesn't try 300 or 74880, and it does nothing on a tab that's already connected, so disconnect first.

> [!WARNING]
>
> Connecting asserts DTR and RTS, and disconnecting releases them. On a board that wires these lines to reset or boot selection, connecting or disconnecting can restart the firmware or change its boot mode. **Detect** opens and closes the port once for each rate it tries, so it toggles the lines several times. To preserve a fault, keep the existing connection open and read its history.

A port can be open at only one baud rate. Another tab on the same port uses the rate that's already open. If Inlay requests a different rate, its capture fails with a message such as `Port COM3 is already open at 115200 baud, cannot change to 9600 baud`. To change the rate, disconnect, set **Baud**, and connect again.

When another program opens the port, such as a flasher or a separate terminal, the tab shows **Paused** and sending is blocked. The tab reconnects when the port is free. Select **Paused** to disconnect instead.

## Read firmware output

Replace the example port with your board's port:

```text theme={"theme":"css-variables"}
Open /dev/ttyUSB0 at 115200 baud and wait up to 30 seconds for READY.
Do not reset the board. Report whether READY appeared and include any errors.
```

Inlay asks for approval before it opens the port, unless you've already allowed serial access. The approval shows the port's device name. It warns when the port looks like a Bluetooth device or isn't a recognized development board or serial adapter, so check the port before you approve.

While Inlay captures, the Serial Monitor tab marks the capture with `--- agent monitor capture started ---` and `--- agent monitor capture ended (N bytes) ---` lines. If you don't give a baud rate, Inlay detects it.

A successful connection doesn't show that the firmware is running correctly. Check that the expected message appeared. Output sent before any connection was open is lost. Reset the board deliberately, or wait for the next run.

To inspect output the tab already captured, ask Inlay to read its history instead of opening another connection. See [Read history without reconnecting](/docs/debug-mode/serial-transports.md#read-history-without-reconnecting). To keep a run as a log file, see [Record output to a file](/docs/debug-mode/serial-transports.md#record-output-to-a-file).

## Send a command

Type a command your firmware supports in the **Type command…** box and press `Enter`, or select the send button. The Monitor adds the **Line ending** you set, which the box shows beside the send button. Press the up and down arrow keys to recall earlier commands. Check the response before you send another command.

For example, if the firmware implements a `status` command terminated by LF, select **LF** under **Line ending**, send `status`, and confirm the expected response. Your firmware defines the command and its response.

When you ask Inlay to send a command, it asks for approval and sends the command through the Serial Monitor tab connected to that port, so the tab's **Line ending** setting applies. A new tab uses **LF**. Inlay reports about one second of response, up to 50 lines. For a longer response, ask Inlay to read the history afterward.

## Reset to capture boot output

Ask for a reset only when it matches the board's wiring and the test you intend to run. Name the reset method when you ask Inlay to capture boot output:

| Reset method | What it does | Use it when |
| - | - | - |
| DTR | Toggles DTR | The board wires DTR to reset, as many Arduino-style boards do |
| RTS | Toggles RTS | The board wires RTS to reset |
| DTR and RTS | Runs the ESP32 or ESP8266 auto-reset sequence | The board has an ESP auto-reset circuit |
| Reset command | Runs a probe reset command you provide, such as `st-flash reset`, `pyocd reset`, or `nrfjprog -f nrf52 --reset` | The board has no serial reset wiring |

```text theme={"theme":"css-variables"}
Reset the ESP32 on /dev/ttyUSB0 with the DTR and RTS sequence, then capture
boot output until "app_main" appears.
```

Inlay resets after the port opens, so the capture includes the boot log. A DTR or RTS reset gives no confirmation. If the output shows no boot messages, the reset likely didn't take effect. Try another method or a probe reset command.

## Troubleshoot

* **Port missing:** check the USB cable, power, driver, and which machine the device is attached to.
* **Access denied or port busy:** close other serial programs and check the host's serial-device permissions.
* **`Permission denied` on Linux:** add your user to the `dialout` group with `sudo usermod -a -G dialout $USER`, then log out and back in.
* **Garbled output:** the baud rate is wrong. Disconnect, then set **Baud** to the firmware's rate or select **Detect**. Check the board and adapter voltage levels.
* **Connected but silent:** check TX/RX wiring, firmware logging, and whether the output happened before you connected.
* **Command has no response:** check the command, the target RX connection, and the **Line ending** setting.
* **Tab shows Paused:** another program has the port open. Close it, or wait for the flash to finish.

Use a [hardware script](/docs/debug-mode/hardware-scripts.md#a-simple-uart-check) for a repeatable UART pass/fail check, or [Live plots](/docs/core-concepts/plot.md) for numeric output.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.