# Serial consoles

Connect to network gear, single-board computers, microcontrollers and servers over a **serial console** — a USB-to-serial adapter, a USB console port or a built-in COM port.

## Opening a console

1. In the **Hosts** view, click **Serial** in the toolbar.
2. **Choose a port** from the list — USB adapters show their vendor and product — or **enter a device path** such as `/dev/ttyUSB0`, `/dev/tty.usbserial-1410` or `COM3`. On Android, pick the adapter from the list.
3. Set the line parameters and connect.

| Setting      | Typical value  | Options                                       |
| ------------ | -------------- | --------------------------------------------- |
| Baud rate    | 9600 or 115200 | 300 to 921600 (115200 preselected)            |
| Data bits    | 8              | 5, 6, 7, 8                                    |
| Parity       | None           | None, Odd, Even                               |
| Stop bits    | 1              | 1, 2                                          |
| Flow control | None           | None, hardware (RTS/CTS), software (XON/XOFF) |

Most Cisco, Juniper and Aruba consoles use **9600 8N1** without flow control; many Linux boards and Raspberry Pis use **115200 8N1**.

## Platforms and permissions

Serial consoles are available in the **desktop** apps (Windows, macOS, Linux) and on **Android**.

- **Linux:** add yourself to the `dialout` group (Debian, Ubuntu, Fedora) or `uucp` (Arch), then log in again.
- **macOS:** most adapters work out of the box; some need the vendor's driver (for example for older Prolific or CH340 chips).
- **Windows:** the adapter appears as `COMn` in Device Manager.
- **Android:** see [below](#android).
- **iOS and iPadOS:** not possible. Apple lets apps talk only to accessories certified for its MFi program (through the External Accessory framework), and USB serial adapters are not among them, so Vaultport reports serial consoles as unavailable there.

## Android

Android phones and tablets with USB host support (nearly all of them; you may need a USB-C or USB OTG adapter) can open serial consoles over USB. Vaultport talks to the adapter directly through Android's USB host API, with its own drivers:

| Adapter      | Chips                                                    | Flow control                                      |
| ------------ | -------------------------------------------------------- | ------------------------------------------------- |
| USB CDC-ACM  | Native USB consoles, many microcontroller boards, CH9102 | None                                              |
| FTDI         | FT232R, FT2232C/D/H, FT4232H, FT232H, FT-X series        | None, hardware, software                          |
| Silicon Labs | CP2102/CP2102N, CP2104, CP2105, CP2108, CP2109           | None, hardware, software                          |
| WCH          | CH340, CH341                                             | None                                              |
| Prolific     | PL2303 (HX, TA, TB, HXD and the G series)                | None, hardware, software (oldest chips: hardware) |

- **Choosing the port:** attached adapters are listed by their USB device name, for example `/dev/bus/usb/001/002`. Adapters with several ports (FT2232, FT4232H, CP2105, CP2108) list each port with a `#n` suffix, counting from `#0`. Tap the refresh button after plugging an adapter in.
- **Permission:** the first time you connect, Android asks whether Vaultport may use the USB device. The permission lasts until the adapter is unplugged.
- **Settings an adapter cannot do** (for example flow control on a CH340, or 5 data bits on an FTDI chip) are refused when you connect, with a message saying why, instead of being silently ignored. Older PL2303 chips round non-standard baud rates to the nearest standard one.
- **Unplugging** the adapter ends the session.
- As for other sessions, keep the app open or turn off **Lock when the app is in the background** — see [Phones & tablets](http://vaultport.niessen.dev/guide/mobile.md#staying-connected-in-the-background).

> **New on Android**
>
> USB serial on Android is new and has not yet been tested with many adapters and devices. Please [report problems](https://github.com/DavidNiessen/vaultport/issues) with the adapter's chip and your device model.

## Logging

Serial sessions are recorded to [encrypted session logs](http://vaultport.niessen.dev/guide/session-logs.md), which is useful for keeping a record of console work on network equipment.
