function · Browser and Node

# webSerialPort

A Web Serial port (Chrome and Edge, after a user gesture) as a SerialPortLike.

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

Import:

```ts
import { webSerialPort } from "@toip-tools/mesh-transport/serial";
```

## Declaration

Signature:

```ts
webSerialPort(port: WebSerialPortLike, baud?: number): SerialPortLike;
```

### Parameters

**`port` (required)**

`WebSerialPortLike`

**`baud` (optional)**

`number`

Default: `115200`

### Returns

`SerialPortLike`

[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/serial/)

---

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