Skip to main content
Version: 2.8

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, TCPTCP (Transmission Control Protocol). One of the three ways a client reaches a node, alongside serial and Bluetooth. Clients connect over TCP on port 4403., 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 ESP32ESP32A chipset of microcontroller made/designed by Espressif, used by a number of devices. Higher power usage than nRF52, but often cheaper and supports Wi-Fi if desired.).

TCP

TCPTCP (Transmission Control Protocol). One of the three ways a client reaches a node, alongside serial and Bluetooth. Clients connect over TCP on port 4403. 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.