Embedded and IoT

ESP32 mesh options compared: ESP-WIFI-MESH, ESP-BLE-MESH, ESP-NOW, painlessMesh and more

You can build a mesh with ESP32 boards over Wi-Fi with ESP-WIFI-MESH or painlessMesh, over Bluetooth LE with ESP-BLE-MESH, over Espressif's own ESP-NOW frames with the esp-now component, over IEEE 802.15.4 with Thread or Zigbee on the ESP32-C6, ESP32-H2 and ESP32-C5, or over LoRa with Meshtastic or MeshCore on boards that add a LoRa radio. The right one depends on which ESP32 chip you have, whether a phone must join, how the devices are powered, and whether you need to interoperate with other vendors' products.

TL;DR

Start from the chip, since it decides your radios, then ask whether a phone must join and how nodes are powered. ESP-WIFI-MESH suits mains-powered IP nodes, ESP-BLE-MESH suits phone-commissioned Bluetooth Mesh products, ESP-NOW suits low-power control between Espressif boards, and Thread or Zigbee suits smart home products. For kilometres, switch to LoRa with Meshtastic or MeshCore.

Learning objectives

After reading this article you will be able to:

  • Match each ESP32 mesh option to the chips and radios that can run it
  • Compare ESP-WIFI-MESH, ESP-BLE-MESH, ESP-NOW and painlessMesh on phone access, power and security
  • Choose a mesh option for a project from its power source, phone needs and interoperability needs

ESP32 mesh options

Eight families of mesh run on Espressif chips today: ESP-WIFI-MESH, ESP-BLE-MESH, ESP-NOW with the esp-now component, painlessMesh, Thread (with Matter on top), Zigbee, the LoRa meshes Meshtastic and MeshCore, and Offline Protocol, both as relay firmware on its IntelligenceMesh Relay and as the leaf crate for firmware teams. They differ in the radio they use, so the first filter is always which ESP32 chip you have.

How the list was chosen. An option is included if it runs on a current ESP32-family chip, is maintained (code changes in 2025 or 2026), and is documented by whoever owns it. Each entry is judged on the same fields: what it is, which chips it runs on, its radio, whether a phone can join, its encryption, its licence, what it is best for, and its limits. Forks of these projects and abandoned libraries were left out. The order follows the radio, from Wi-Fi to LoRa, and is not a ranking.

The table summarises the entries as of October 2026, from each owner’s documentation and repository.

OptionESP32 chipsRadioCan a phone join?EncryptionLicenceBest for
ESP-WIFI-MESHESP32, S2, S3, C3, C5, C6, C612.4 GHz Wi-FiNo, a phone reaches it through the routerWPA2-PSK per link, AES on mesh control dataApache-2.0 (ESP-IDF)Mains-powered nodes spread across a building
ESP-BLE-MESHESP32, S3, C3, C5, C6, C61, H2Bluetooth LEYes, as provisioner or through a GATT proxyBluetooth Mesh network and application keysApache-2.0 (ESP-IDF)Lighting, switches and sensors that interoperate with Bluetooth Mesh
ESP-NOW and the esp-now componentEspressif chips with Wi-Fi2.4 GHz Wi-Fi frames, no connectionNoCCMP per peer; the component adds ECDH and AES-128-CCMApache-2.0Fast, low-power control between Espressif boards
painlessMeshESP32 and ESP8266, through Arduino2.4 GHz Wi-FiNot documentedShared Wi-Fi password per linkGPL-3.0Hobby and prototype meshes with JSON messages
Thread, and Matter through esp-matterStandalone on H2, C6, C5; host mode on Wi-Fi chipsIEEE 802.15.4Through a border router, no Thread radio needed in the phoneThread link security, plus Matter’s own sessionsApache-2.0 (Espressif SDKs)Smart home products that must work with Matter ecosystems
Zigbee through esp-zigbee-sdkH2, C6, C5 in Espressif’s reference hardwareIEEE 802.15.4Through a hub or gatewayZigbee network security (AES-128)Apache-2.0 SDK; the core stack ships as a pre-built libraryProducts for existing Zigbee hubs
Meshtastic and MeshCoreESP32-family LoRa boards, among other microcontrollersLoRaYes, by pairing with its own radioAES with per-channel keys and public-key direct messagesGPL-3.0 (Meshtastic), MIT (MeshCore)Kilometre-scale text and telemetry off grid
Offline Protocol relay firmware (IntelligenceMesh)ESP32-PICO-V3-02 in the IntelligenceMesh RelayBluetooth LE, central and peripheral at onceYes, phones running Offline Protocol apps relay through it directlyCarries Offline Protocol’s end-to-end encrypted mesh trafficShipped on the deviceA pocket or desk relay that extends a phone mesh with no setup
Offline Protocol leaf crateBuilds for ESP32-C6, H2, C3 and C2, Cortex-M and WASIThe firmware’s own linkYes, a phone or Linux host creates the sessionMLS (RFC 9420), end to endAGPL-3.0-only or commercialA device that must be an end-to-end encrypted peer of a phone app

ESP-WIFI-MESH for building-wide Wi-Fi

ESP-WIFI-MESH is Espressif’s Wi-Fi mesh, built into ESP-IDF, that links many nodes into one WLAN as a tree. Each node is a station to its parent and a softAP to its children, and the root node is the only interface between the mesh and an outside IP network.

  • Chips: ESP-IDF publishes the guide for the ESP32, ESP32-S2, S3, C3, C5, C6 and C61. The ESP32-H2 has no Wi-Fi.
  • Radio: 2.4 GHz Wi-Fi.
  • Can a phone join? Not as a mesh node; the guide describes only Espressif nodes. A phone talks to devices through the router the root connects to.
  • Encryption: Espressif states that data uses Wi-Fi WPA2-PSK encryption and that the mesh’s networking information element uses AES. Both protect one link at a time.
  • Licence: Apache-2.0, as part of ESP-IDF.
  • Best for: mains-powered devices across a large area, such as lights or controllers in a building, that need IP access through one router connection.
  • Limits: the tree has one root, re-elected by router signal strength if it fails. Nodes on the deepest permitted layer cannot accept children, and the guide warns that switching parents can lose packets in flight.

Espressif also publishes ESP-Mesh-Lite, a SoftAP and station mesh in which, unlike ESP-WIFI-MESH, each node can reach the external network on its own.

ESP-BLE-MESH for Bluetooth Mesh products

ESP-BLE-MESH is Espressif’s implementation of the Bluetooth SIG mesh standard, part of ESP-IDF. Espressif says it is implemented and certified on Mesh Profile 1.0.1, and its feature list includes Mesh Protocol 1.1 features such as remote provisioning, directed forwarding and subnet bridging.

  • Chips: ESP-IDF publishes the guide for the ESP32, S3, C3, C5, C6, C61 and H2. The ESP32-S2 has no Bluetooth.
  • Radio: Bluetooth LE.
  • Can a phone join? Yes. ESP-IDF’s examples provision nodes from a phone app over GATT, and the Proxy Server feature lets a phone exchange mesh messages over a GATT connection.
  • Encryption: Bluetooth Mesh secures relaying with a network key and application data with application keys, given out during provisioning.
  • Licence: Apache-2.0, as part of ESP-IDF.
  • Best for: lighting, switches and sensors that should interoperate with other Bluetooth Mesh products and be commissioned from a phone.
  • Limits: Bluetooth Mesh is built for small control and monitoring messages, not bulk data. Device firmware update models are marked as a preview in the feature list.

ESP-NOW and mesh networking

ESP-NOW on its own is not a mesh. It is Espressif’s connectionless protocol that sends short frames directly between radios in range, and multi-hop delivery comes from a layer on top, such as Espressif’s esp-now component, which lists multi-hop control among its features.

  • Chips: Espressif chips with Wi-Fi, which excludes the ESP32-H2. The component recommends the ESP32, C2, C3, C6, S2 and S3.
  • Radio: 2.4 GHz Wi-Fi, as vendor-specific action frames with no access point. It coexists with Wi-Fi and Bluetooth LE.
  • Can a phone join? No. Espressif’s documentation describes ESP-NOW only between its own chips.
  • Encryption: unicast frames can use CCMP for a limited number of peers, 7 by default. The component adds a handshake that uses ECDH and a proof-of-possession string to derive a shared key, then AES-128-CCM for data.
  • Licence: Apache-2.0 for both ESP-IDF and the component.
  • Best for: switches, remotes and sensors that wake, send and sleep. Espressif’s solution page gives 200 metres in open space and a coin-cell switch example.
  • Limits: frames are small, 250 bytes in version 1.0 and 1,470 bytes in version 2.0, it works only between Espressif parts, and ESP-IDF allows 20 paired peers in total.

painlessMesh Arduino library

painlessMesh is a community Arduino library that forms a self-organising Wi-Fi mesh of ESP32 and ESP8266 boards with no router or central controller. It uses JSON messages, keeps time in sync across nodes, and is not IP networking: nodes are addressed by a 32-bit ID derived from the chip.

  • Chips: ESP32 and ESP8266. The README does not list which ESP32 variants are tested.
  • Radio: 2.4 GHz Wi-Fi; each node runs as both access point and station.
  • Can a phone join? Not documented. A node can connect to an outside access point to bridge the mesh to another network.
  • Encryption: nodes share one Wi-Fi password, with WPA2-PSK as the default. The README describes no end-to-end encryption of messages.
  • Licence: GPL-3.0. The latest tag is v1.5.7, from October 2025.
  • Best for: hobby and prototype projects, such as synchronised light displays or sensors reporting to a central node.
  • Limits: the README warns that messages can be dropped under heavy traffic, that sending rates should be kept low, and that blocking calls such as delay() can destabilise the mesh.

Thread and Matter on ESP32

An ESP32 can run Thread and Matter on chips with an IEEE 802.15.4 radio. ESP-IDF runs OpenThread as a standalone node on the ESP32-H2, ESP32-C6 and ESP32-C5, and Espressif’s esp-matter SDK builds Matter devices on top of the open-source Matter SDK.

  • Chips: H2, C6 and C5 as Thread nodes. Wi-Fi chips such as the ESP32, S2, S3 and C3 run OpenThread in host mode with a separate radio co-processor, which is how Espressif’s Thread Border Router SDK is built.
  • Radio: IEEE 802.15.4 for Thread; Matter can also run over Wi-Fi or Ethernet.
  • Can a phone join? Not over Thread, and it does not need to. A phone reaches Thread devices over the home IP network through a Thread border router, and Matter uses Bluetooth LE only to set devices up.
  • Encryption: Thread secures the network at the link layer, and Matter adds its own encrypted, signed messages between devices.
  • Licence: Apache-2.0 for esp-matter and esp-thread-br. esp-matter lists support for Matter 1.4 through 1.6.1, with 1.7 in progress, as of October 2026.
  • Best for: smart home products that must work with Apple, Google, Amazon, SmartThings or Home Assistant.
  • Limits: a Thread network needs a border router to reach anything else, and a Matter product needs Connectivity Standards Alliance certification before it ships as Matter.

Zigbee on ESP32

An ESP32 can run Zigbee on the 802.15.4 chips. Espressif’s ESP-Zigbee-SDK is its official Zigbee framework, with the ESP32-H2, C6 and C5 among its reference hardware.

  • Chips: H2, C6 and C5 in Espressif’s reference hardware.
  • Radio: IEEE 802.15.4.
  • Can a phone join? Through a Zigbee hub or gateway, which bridges to IP.
  • Encryption: Zigbee’s own network security, which the Connectivity Standards Alliance describes as AES-128.
  • Licence: the SDK repository is Apache-2.0, but the core stack ships as a pre-built library. Version 2.x uses an Espressif proprietary Zigbee stack, and the 1.x LTS line used ZBOSS.
  • Best for: devices that must pair with existing Zigbee hubs.
  • Limits: you depend on a coordinator or hub for anything beyond the Zigbee network. Matter vs Zigbee vs Z-Wave vs Thread compares the standards themselves.

Meshtastic and MeshCore on ESP32

Meshtastic and MeshCore run on boards that pair an ESP32 with a LoRa transceiver. Both are firmware projects that turn LoRa boards into an off-grid text mesh, and both also run on other microcontrollers such as Nordic’s nRF52840.

  • Chips: Meshtastic lists ESP32-family boards, including ESP32-S3, C3 and C6 parts, beside nRF52840 and RP2040. MeshCore’s repository has variants for ESP32, S3, C3 and C6 boards, nRF52, RP2040 and STM32, and an ESP-NOW variant for a generic ESP32-C3 that uses Wi-Fi frames instead of LoRa.
  • Radio: LoRa, in licence-exempt sub-GHz bands.
  • Can a phone join? Yes, by pairing with its own radio over Bluetooth LE, USB or Wi-Fi. The phone is a client, not a mesh node.
  • Encryption: both use AES with keys shared per channel and public-key cryptography for direct messages. Meshtastic vs MeshCore vs Reticulum covers the details.
  • Licence: GPL-3.0 for Meshtastic, MIT for MeshCore.
  • Best for: text, positions and small telemetry over kilometres with no infrastructure.
  • Limits: low data rates and duty-cycle rules. Meshtastic notes that nRF52-based devices use less power than ESP32-based ones, so it prefers them for solar and handheld use.

Offline Protocol relay firmware on the IntelligenceMesh Relay

The IntelligenceMesh Relay is Offline Protocol’s own ESP32 mesh node: an M5StickC Plus2 with an ESP32-PICO-V3-02, pre-flashed with firmware that relays encrypted Offline Protocol mesh traffic over Bluetooth LE. It starts advertising and scanning as soon as it is switched on, works with every Offline Protocol app and SDK-based project, and relays Bitchat traffic at the same time.

  • Chip: ESP32-PICO-V3-02, dual-core, with Wi-Fi and Bluetooth 4.2.
  • Radio: Bluetooth LE GATT in both roles at once, peripheral and central.
  • Can a phone join? Yes. Phones running Offline Protocol apps reach it directly, and the IntelligenceMesh companion app on iOS and Android pairs with it for stats, themes and firmware updates.
  • Encryption: it carries the mesh’s end-to-end encrypted traffic between phones.
  • Best for: extending the range of a phone mesh with a relay that needs no Wi-Fi, account or setup.
  • For developers: a JSON module API lets a React Native app push layouts and data over Bluetooth LE for the relay’s screen to render.

Offline Protocol leaf crate

offline-protocol-leaf is a Rust no_std component that lets a constrained device take part in an MLS-encrypted session with a phone or Linux host. It is not a mesh by itself: two leaves cannot set up a session with each other, and a full peer creates the group and issues every membership change.

  • Chips: CI builds it for the ESP32-C6, ESP32-H2, ESP32-C3 and ESP32-C2 (RISC-V), Cortex-M33, Cortex-M0 and WASI. Inside an esp-hal firmware, the C6 and H2 are the parts to start with.
  • Radio: none of its own. The firmware supplies the radio link, storage, entropy and a time source at pairing.
  • Can a phone join? Yes, a phone or Linux host is required: it creates the group, and the device joins with a key package.
  • Encryption: MLS (RFC 9420), end to end between the device and its peers.
  • Licence: AGPL-3.0-only, or a commercial licence.
  • Best for: a device whose messages must be end-to-end encrypted and authenticated to a phone app, not only protected on one link.
  • What the firmware brings: the radio link, durable storage, a hardware entropy source and the time at pairing, sized for flash, RAM and power on its own part.

ESP32 chips with Thread and Zigbee support

The ESP32-H2, ESP32-C6 and ESP32-C5 are the ESP32 chips with an IEEE 802.15.4 radio, which Thread and Zigbee need. ESP-IDF names those three as able to run Thread as a standalone node, and ESP-Zigbee-SDK lists them among its reference hardware.

The other chips can still take part in a Thread network as a host. ESP-IDF’s OpenThread guide describes running the OpenThread stack on a Wi-Fi chip such as the ESP32, ESP32-S2, ESP32-S3 or ESP32-C3, connected over SPI or UART to a separate chip acting as a radio co-processor. That pairing is how Espressif builds a Thread border router.

Two practical notes. The ESP32-H2 has Bluetooth LE and 802.15.4 but no Wi-Fi, so it cannot run ESP-WIFI-MESH or ESP-NOW. The ESP32-C6 and C5 have Wi-Fi, Bluetooth LE and 802.15.4 on one chip, which is why they appear in almost every column of the table.

ESP-WIFI-MESH vs ESP-BLE-MESH vs ESP-NOW

ESP-WIFI-MESH, ESP-BLE-MESH and ESP-NOW use different radios and solve different problems: ESP-WIFI-MESH builds an IP-capable Wi-Fi tree, ESP-BLE-MESH builds a standard Bluetooth Mesh that phones and other vendors’ products can join, and ESP-NOW sends short connectionless frames between Espressif boards.

ESP-WIFI-MESHESP-BLE-MESHESP-NOW
Radio2.4 GHz Wi-FiBluetooth LE2.4 GHz Wi-Fi action frames
ShapeTree with one rootMany-to-many, relayed by managed flooding or directed forwardingDirect between radios; multi-hop needs the esp-now component
StandardEspressif protocolBluetooth SIG meshEspressif protocol
Phone accessThrough the routerProvisioning and GATT proxyNone
PayloadIP packets over Wi-FiSmall control and monitoring messages250 or 1,470 bytes per frame
PowerNodes keep a softAP runningLow power nodes sleep and poll a friendWake, send and sleep

A useful rule of thumb follows from the table. If the data is large or must reach the internet, use Wi-Fi. If phones or third-party devices must join, use Bluetooth Mesh. If it is a switch or sensor talking to another Espressif board, use ESP-NOW.

painlessMesh vs ESP-WIFI-MESH

ESP-WIFI-MESH is the better fit for a product, and painlessMesh is the faster start for an Arduino prototype. ESP-WIFI-MESH is maintained by Espressif inside ESP-IDF, documents its topology, root election and security, and carries IP traffic to the outside world through its root. painlessMesh is a GPL-3.0 community library with an Arduino-friendly API and JSON messages, and its README is candid that messages can be lost under load and that nodes are not IP hosts.

The licence matters too. Shipping firmware that links a GPL-3.0 library carries GPL obligations for that firmware, while ESP-IDF is Apache-2.0.

ESP32 mesh to phone connections

An ESP32 mesh can talk to a phone, but how depends on the mesh. A phone can be a real participant in ESP-BLE-MESH, through provisioning and a GATT proxy, and it reaches Thread, Zigbee and ESP-WIFI-MESH devices over Wi-Fi through a border router, hub or the mesh’s root. A phone cannot send or receive ESP-NOW frames, so an ESP-NOW network needs one board that also speaks Bluetooth LE or Wi-Fi to the phone. With Meshtastic and MeshCore, the phone pairs with its own LoRa radio and acts as that radio’s screen and keyboard.

How can an ESP32 send data to a phone without Wi-Fi? covers the single-hop links in detail, and on Android the app also has to live with the background rules for Bluetooth LE.

Lowest-power ESP32 mesh options

The options built for sleeping devices use the least power: ESP-NOW for devices that wake only to send, Thread sleepy end devices on the ESP32-H2 or C6, and Bluetooth Mesh low power nodes. In OpenThread’s terms, a sleepy end device keeps its radio off and wakes on occasion to poll its parent for messages. In Bluetooth Mesh, a low power node sleeps and asks a mains-powered friend node for messages held on its behalf. Espressif’s ESP-NOW page gives the example of a CR2032 coin cell lasting up to 5 years in a switch flipped about 10 times a day.

The Wi-Fi meshes cost the most. In ESP-WIFI-MESH and painlessMesh, every node that has children runs an access point for them, so those nodes stay awake and suit mains power. For LoRa boards, Meshtastic’s advice is that nRF52-based devices use less power than ESP32-based ones.

ESP32 mesh security

Secure an ESP32 mesh at three levels: the mesh’s own keys, end-to-end protection for data that crosses several hops, and the chip itself.

  1. Change every default key. Set a strong mesh password for ESP-WIFI-MESH or painlessMesh, use ESP-NOW encryption or the esp-now component’s handshake, and replace the public default channel key on Meshtastic before relying on privacy.
  2. Know what each key protects. Wi-Fi passwords and ESP-NOW CCMP protect one link. Bluetooth Mesh separates the network key used to relay from the application keys used to read. If a reading travels through several nodes or onwards to a backend, encrypt it end to end so a relaying node cannot read or alter it.
  3. Protect keys on the device. Enable secure boot and flash encryption before production, because their eFuses are one-time programmable, and use the hardware random number generator under the conditions ESP-IDF documents.
  4. Decide who may pair. Any radio in range can attempt to join. Use out-of-band authentication where the mesh offers it, such as Bluetooth Mesh OOB provisioning, and accept new peers only during a window the owner opens.

Can a microcontroller run end-to-end encrypted mesh messaging? covers entropy, constant-time code and power-safe key storage.

Choosing an ESP32 mesh for a project

Answer four questions in order, and the list usually narrows to one or two options.

  1. Which chip, and which radios? No Wi-Fi rules out ESP-WIFI-MESH and ESP-NOW; no 802.15.4 rules out native Thread and Zigbee; no LoRa transceiver rules out Meshtastic and MeshCore.
  2. Must a phone or another vendor’s device join? Then pick a standard: Bluetooth Mesh for phones directly, Thread or Zigbee for smart home hubs, Matter for multi-ecosystem control.
  3. How are the nodes powered? Battery nodes point to ESP-NOW, Thread sleepy end devices or Bluetooth Mesh low power nodes; mains-powered nodes can run any option.
  4. How far apart are they? Building-scale distances suit 2.4 GHz and 802.15.4. Kilometres need LoRa.

Then build a two-node test before buying hardware for a fleet, and measure range, latency and current draw on the boards you will ship.

Offline Protocol and ESP32 meshes

Offline Protocol puts ESP32 hardware into the same mesh as phones. Its mesh SDK runs in apps on phones and computers, which relay for each other over Bluetooth LE and the local network, and the IntelligenceMesh Relay, an ESP32-PICO-V3-02 node, relays that encrypted traffic to extend a mesh’s range with no setup. For a team building its own device, the offline-protocol-leaf crate lets a microcontroller join an end-to-end encrypted MLS session that a phone or Linux host creates, over the radio link the firmware already has; CI builds it for the ESP32-C6, H2, C3 and C2. The embedded overview explains the model.

Frequently asked questions

Can ESP32 boards form a mesh with no router?

Yes. ESP-NOW, painlessMesh, ESP-BLE-MESH, Thread, Zigbee and the LoRa meshes need no Wi-Fi router to pass messages between nodes. ESP-WIFI-MESH can also run without a router, but its root node is the only way the mesh reaches an outside IP network.

How many ESP32 nodes can ESP-WIFI-MESH have?

Espressif does not give one fixed number. The size depends on the maximum number of layers and the downstream connections each node allows, and the guide's own test conditions used 100 devices across 6 layers with up to 6 downstream connections each.

Does the original ESP32 support Thread or Zigbee?

Not on its own. Only chips with an IEEE 802.15.4 radio, such as the ESP32-H2, ESP32-C6 and ESP32-C5, can run Thread as a standalone node. A Wi-Fi chip such as the ESP32 or ESP32-S3 can run OpenThread in host mode with a separate 802.15.4 radio co-processor, which is how Espressif builds a Thread border router.

Can an ESP32 mesh reach the internet?

Yes, through one or more nodes that also have an internet path. In ESP-WIFI-MESH the root node connects to the router, ESP-Mesh-Lite lets each node reach the external network itself, painlessMesh nodes can connect to an outside access point, and Thread and Zigbee use a border router or gateway.

Is ESP-NOW faster than Wi-Fi for ESP32 control?

For short control messages, often yes, because there is no association or connection to set up. Espressif describes millisecond-level control and a response within 150 ms for its switch application, while larger transfers still suit a normal Wi-Fi connection.

Which ESP32 mesh works with Home Assistant?

Thread, Zigbee and Matter devices built with Espressif's SDKs can work with any hub that supports those standards, and Home Assistant has Matter, Thread and Zigbee Home Automation integrations. ESP-WIFI-MESH, painlessMesh and ESP-NOW are Espressif or community protocols, so they need your own bridge into a home hub.

Sources

Build it with Offline Protocol

The Rust and constrained devices page describes offline-protocol-leaf, the firmware component that lets a device join an encrypted session a phone or Linux host creates. It lists the chips it builds for and what the firmware brings.

Read the Rust and constrained devices docs