function · Node only

# listSerialPorts

Serial ports, with a hint at the board family from the USB vendor id (never the firmware).

`@toip-tools/mesh-transport/node` · [View source](https://github.com/yourbuddyconner/toip-tools/blob/main/packages/mesh-transport/src/node.ts#L74)

Import:

```ts
import { listSerialPorts } from "@toip-tools/mesh-transport/node";
```

## Declaration

Signature:

```ts
listSerialPorts(list?: () => Promise<{
    path: string;
    vendorId?: string;
    productId?: string;
}[]>): Promise<{
    path: string;
    vendorId?: string | undefined;
    productId?: string | undefined;
    hint?: string | undefined;
}[]>;
```

### Parameters

**`list` (optional)**

`() => Promise<{ path: string; vendorId?: string; productId?: string; }[]>`

Default: `() => SerialPort.list()`

### Returns

`Promise<{ path: string; vendorId?: string | undefined; productId?: string | undefined; hint?: string | undefined; }[]>`

[Usage guide](https://toip.tools/toolkit/mesh-transport/#usage) · [Error handling](https://toip.tools/toolkit/mesh-transport/#errors) · [All exports](https://toip.tools/toolkit/mesh-transport/api/node/)

---

This is the Markdown version of https://toip.tools/toolkit/mesh-transport/api/node/listSerialPorts/. An index of the documentation for AI assistants is at https://toip.tools/llms.txt.
