Files
meshtastic-web/packages/transport-web-serial
Henri BergiusandGitHub bcdda8b751 Connection robustness improvements (#813)
* Clear heartbeat and queue when disconnected

* Give clearer error in case configure fails due to a lost connection. Used to throw 'Packet does not exist'

* If the queue processing error is due to a lost connection, throw it instead of looping endlessly

* In case we send a disconnection event we don't need to also throw

* Catch heartbeat errors

* Also handle invalid state errors

* Handle socket timeouts

* Log heartbeat failures

* Make linter happy

* Transform stream being a singleton prevented reconnection attempts

* Adapt tests to not using singleton

* Aborting already ends the connection
2025-09-04 13:08:05 -04:00
..
2025-06-26 11:52:57 -04:00
2025-08-31 16:04:34 -04:00
2025-07-10 12:28:23 -04:00
2025-08-31 16:04:34 -04:00

@meshtastic/transport-web-serial

JSR CI CLA assistant Fiscal Contributors Vercel

Overview

@meshtastic/transport-web-serial Provides Web Serial transport for Meshtastic devices. Installation instructions are avaliable at JSR NPM

Usage

import { MeshDevice } from "@meshtastic/core";
import { TransportWebSerial } from "@meshtastic/transport-web-serial";

const transport = await TransportWebSerial.create();
const device = new MeshDevice(transport);

Stats

Alt

Compatibility

The Web Serial API's have limited support in browsers, compatibility is represented in the matrix below.

Web Serial compatability matrix