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

# Serial transports

> Choose UART, SEGGER RTT, ITM/SWO, XMOS xSCOPE, or CAN for firmware output in the Monitor, then filter, record, and reuse what a tab captured.

Use this page to choose how the Monitor reads firmware output and sends input. Pick the transport that matches how your firmware talks to the host, then follow its guide for setup. Every transport runs in a **Serial Monitor** tab, and Inlay can read what a tab already captured or wait for a specific message.

## Choose a transport

| Transport | Use it for | You need | Sending |
| - | - | - | - |
| [UART](/docs/debug-mode/uart.md) | Boot logs, application logs, or a command console | A USB serial interface or UART adapter | Yes |
| [SEGGER RTT](/docs/debug-mode/rtt.md) | Logging through the debug probe, without a UART wire | Firmware with RTT, a J-Link, and the SEGGER J-Link software | Down channels only |
| [ITM and SWO](/docs/debug-mode/itm-swo.md) | Cortex-M stimulus output over the SWO pin | OpenOCD, a supported SWO probe, and SWO wiring | No, read-only |
| [XMOS xSCOPE](/docs/debug-mode/xscope.md) | Output from an XMOS `.xe` application on an xTAG or in the simulator | XMOS XTC Tools | Through Inlay, on a realtime connection |
| [CAN](/docs/debug-mode/can.md) | CAN or CAN-FD traffic | An SLCAN-compatible adapter or an mjbots fdcanusb | Test frames |

For Bluetooth Low Energy peripherals, use the Monitor's [Bluetooth](/docs/debug-mode/bluetooth.md) tab instead.

Before you connect, check what the transport needs and what connecting does to the target:

* **UART:** opening the port can restart a board that wires DTR or RTS to reset.
* **RTT:** the Monitor reads RTT through a J-Link connected to your computer. For a board on a bench, Inlay takes a time-limited RTT capture instead, and only after it has flashed the firmware in the same session.
* **ITM and SWO:** you need the target's CPU clock and SWO rate to connect.
* **xSCOPE:** a new connection loads and runs the selected `.xe`, replacing the running program, unless a debugger session already holds the xTAG.
* **CAN:** follow the [SLCAN](/docs/debug-mode/slcan.md) or [fdcanusb](/docs/debug-mode/fdcanusb.md) guide for your adapter before you connect.

## Open a Serial Monitor tab

1. Run **Inlay: Open Inlay Monitor** from the Command Palette.
2. Select **+** to open a new tab, then choose **Serial Monitor** under **Views**.
3. Select the port chip at the start of the toolbar. It shows the selected port and its settings.
4. Choose a port under **Port**, then fill in the settings that appear below the list.
5. Select **Connect**.

The **Port** list shows each transport's entries:

| Port entry | Transport |
| - | - |
| The operating system's port name and the device name, such as `COM3` and `USB Serial Device` | UART, or CAN when you set **Mode** to **CAN** |
| **RTT ↑ All channels**, **RTT ↑ Ch.0**, **RTT ↓ Ch.0** | SEGGER RTT |
| The probe name followed by **ITM**, such as **ST-Link/V2-1 ITM** | ITM and SWO |
| **XMOS xTAG** with the adapter ID, **XMOS xSCOPE**, or **XMOS xsim (simulator)** | XMOS xSCOPE |

Ports on a [bench](/docs/integrations/benches.md) start with `bridge:`, followed by a short name for the bench and the device path.

The settings below the **Port** list change with the port. A UART port shows **Mode**, **Baud**, and **Line ending**, and RTT, ITM, and xSCOPE ports show their own settings. **Connect** stays unavailable until the required settings are filled in, such as an RTT **Device**, or an ITM **Target**, **CPU**, and **SWO**.

In the terminal UI, use the browser Monitor or the serial sidebar instead. See [Use the terminal UI](#use-the-terminal-ui).

## Work with the output

The tab's toolbar works the same way for every transport:

| Control | What it does |
| - | - |
| Filter box | Shows only matching lines. The filter is a case-insensitive regular expression, and the box shows how many lines match out of the total. |
| **Clear serial monitor** (trash icon) | Empties the tab's output, including the history Inlay can read. |
| **Timestamps** (clock icon) | Shows or hides timestamps. It appears once the output contains timestamped log lines, such as ESP-IDF or Zephyr logs. |
| **Record** | Saves the tab's new output to a log file in the project. See [Record output to a file](#record-output-to-a-file). |

When the Monitor is narrow, the filter box collapses to a search icon, **Record** shows only its dot, and **Timestamps** and **Clear serial monitor** move into the **⋯** (**Serial actions**) menu.

## Record output to a file

Use **Record** to keep a log of one run, such as a boot sequence or a soak test, as a file you can open, share, or hand to Inlay.

1. Connect the tab, then select **Record** in its toolbar. The button shows the elapsed time while it records.
2. Reproduce the behavior you want to keep.
3. Select the button again to stop. Closing the tab also stops the recording.

A recording holds the lines the tab receives between start and stop, on any transport. Output that was already in the tab isn't included.

Inlay saves each recording in its own folder under `.inlay/captures/` in your project, grouped by chat session:

| File | Contains |
| - | - |
| `serial.log` | The recorded lines as plain text |
| `metadata.json` | The start and stop times, the line count, and the tab's port settings |

When you stop, the Monitor sends the recording to your chat as **Monitor capture completed**, and Inlay replies with what it finds in the output. From a long recording, Inlay receives the most recent 50,000 characters. The complete log stays in `serial.log`. If no chat is available, the Monitor shows **Capture saved, but no active chat is available to analyze it.**

To use a recording later, open `serial.log` in the editor, or name it in a request:

```text theme={"theme":"css-variables"}
Read the newest serial.log under .inlay/captures and list every reset,
assert, and error line with the line before it.
```

The **Plot**, **Debug Output**, and **Bluetooth** tabs also have **Record**, but it works differently: it runs a recording script from `.inlay/hardware/captures/`. The first time you select it on one of those tabs, the Monitor sends **Set up Monitor capture** to your chat so Inlay can write the script. Select **Record** again when Inlay finishes.

## When Inlay uses a port

When Inlay opens a port to capture output, the Monitor connects a Serial Monitor tab to the same port so you can watch it. It reuses a tab that's already connected to that port, or opens a new tab if the active one is busy. The Monitor holds up to 10 tabs.

Before flashing, Inlay releases the serial ports so the flasher can use them. Affected tabs show **Paused** and reconnect when the port is free again.

## Read history without reconnecting

Ask Inlay to read what a tab already captured when the event may already have happened. Inlay doesn't reopen the port, reset the device, or wait for new output. History stays available after you disconnect. Each tab keeps its most recent 50,000 lines, and clearing or closing the tab discards them.

```text theme={"theme":"css-variables"}
Read the last 50 lines already captured on the active UART. Do not wait for
new output or reset the device.
```

For future output, ask for a live capture and give a stop string or a duration:

| Request | Default length |
| - | - |
| Wait for a stop string, such as `READY` | Up to 30 seconds |
| Capture without a stop string | 3 seconds |

A live capture starts with any output the tab collected since Inlay last read it, then adds new output. If the stop string is already in that collected output, Inlay reports it without waiting.

## Use the terminal UI

The terminal UI gives you two ways to watch a port:

* **The Monitor in a browser.** Run `/monitor` or press `Alt+M`. The Monitor opens in a browser on the computer that runs Inlay, and its **Serial Monitor** tab works as this page and the transport guides describe. The page is served on `127.0.0.1`, so it's reachable only from that computer.
* **The serial sidebar.** Run `/serial` to show or hide a sidebar beside the conversation. It shows live output and lets you choose the port and its settings. Use it when you can't open a browser on that computer.

You work the sidebar with the mouse:

| Control | What it does |
| - | - |
| `[ ▶ ]` and `[ ■ ]` | Connects and disconnects the selected tab. `[ ‖ ]` means another program has the port and the tab is paused. |
| `[ Filter ]` | Opens a filter box that shows only matching lines. |
| `[ Clear ]` | Empties the tab's output. |
| Tabs at the bottom, such as `[ttyUSB0]` | Select a tab to switch to it. Select the active tab again to open **Change Port**, then choose a port with the mouse, or with the arrow keys and `Enter`. |
| `[ + ]` | Lists the available ports. Choose one to open it in a new tab. |
| `Mode:` | Switches between **UART** and **CAN**. |
| `Baud:`, or `Bitrate:` in CAN mode | Each click steps to the next rate. |
| `NL:` | Each click steps to the next line ending. |

The settings row changes with the port. An RTT port shows `Device:`, which opens a searchable J-Link device list, `Debug IF:` for SWD or JTAG, and `Frequency MHz:`. An ITM port shows `Target:`, `CPU:`, and `SWO:`. The sidebar's title shows the transport in use.

The sidebar is a viewer. It has no send box, no baud **Detect**, no **Record**, no **Raw** / **Decoded** switch for CAN, and no RTT block setting for a map file or control block address. For those, open the Monitor with `/monitor`, or ask Inlay: it can send a command, detect the baud rate, and decode CAN frames from chat.

See [Use Inlay in the terminal](/docs/cli/overview.md) for the rest of the terminal UI.

## Troubleshoot

* **Port missing:** check the cable, driver, target power, and which machine the device is attached to. For a bench, check the bench machine.
* **Connect is unavailable:** select a port and fill in the required settings for it.
* **Connected but silent:** check the transport guide's firmware, channel, and clock requirements.
* **Target state matters:** keep the existing connection and read its history before you open another transport or reset the target.

See [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.