Ana içeriğe geç

Meshtastic JavaScript Development

Intro

Meshtastic provides a JavaScript library that provides an interface to Meshtastic devices. It can be used to build web, Node.js, or Deno applications to interface with a Meshtastic network. Currently, TCP, HTTP(S), Serial, and Bluetooth connections are supported, depending on the target platform.

If you wish to view the code or contribute to development of the library, please visit the JavaScript code GitHub page.

Connection methods

HTTP(S)

HTTP(S) is the easiest transport option for web clients connecting to a network-capable Meshtastic node (for example ESP32).

TCP

TCP is the preferred option for connecting to network-capable Meshtastic nodes from Node.js. It is faster than the HTTP transport.

Bluetooth

Bluetooth transport works with most Meshtastic nodes but is currently only available for web clients using Web Bluetooth API.

Serial

Serial transport also works with most Meshtastic nodes but requires a serial cable connection between the client computer and the node.

Serial transport is available for both web (using Web Serial API) and for Node.js.