Multi-Protocol: Adding MeshCore Support

Today we started building MeshCore support. Socialmesh will speak two mesh protocols: Meshtastic and MeshCore. This is the biggest architectural change since day one. MeshCore support is still in beta — not yet shipped publicly.

The constraint

MeshCore and Meshtastic are fundamentally different protocols. Different packet formats, different connection sequences, different capabilities. The temptation is to abstract them behind a common interface. We rejected that.

Protocol isolation is absolute. Meshtastic screens never import MeshCore code. MeshCore screens never import Meshtastic code. There is no MeshProtocol base class, no if (protocol == meshcore) branches, no shared state providers.

Why? Because abstraction lies. The protocols do not have the same capabilities. Abstracting them would mean either dumbing down Meshtastic to MeshCore’s feature set, or building MeshCore features that do not exist in the firmware. Both are wrong.

Architecture

Protocol selection happens at the root shell. Once you enter a protocol’s shell, only that protocol exists:

App Root
  ├─ Meshtastic Shell (full Meshtastic UI)
  │   ├─ Dashboard
  │   ├─ Nodes
  │   ├─ Channels
  │   ├─ Messages
  │   └─ Settings
  └─ MeshCore Shell (full MeshCore UI)
      ├─ Console
      ├─ Nodes
      └─ Settings

The transport layer is shared — both protocols use the same BLE and USB transports. But above the transport, everything forks. Different protocol services, different providers, different screens.

What we share

Two things are shared, and only two:

  1. Transport layer — BLE scanning, connection, byte streams
  2. Design language — theme, glass aesthetic, animation patterns

The design language sharing is intentional. Both shells should feel like the same app. But they use the same theme tokens and widget primitives, not the same business logic widgets.

Detection

Protocol detection happens at connection time. Meshtastic devices advertise a specific BLE service UUID. MeshCore devices advertise a different one. The scanner detects which protocol a device speaks and routes to the correct shell.

For serial/USB connections, we probe with each protocol’s handshake sequence and use whichever responds.

Looking ahead

This is the right call. MeshCore is younger firmware with a different philosophy. Trying to unify the protocols would slow both implementations. Instead, each protocol gets its own dedicated UI that can evolve independently. When MeshCore support leaves beta, both shells will feel like the same app — but share nothing underneath.