So I was digging around AlternativeTo.net and Meshtastic-related Android apps called Bitmesh came across. And buried in the doc in the GitLab repo is a protocol spec the author seems to have wroten called MAM: Micro Apps over Meshtastic. It’s not really talked about anywhere I could find, which seems like a shame as I think it deserves way more attention than it’s getting.

The core idea is simple but kind of elegant: right now if you want to build a third-party app on top of Meshtastic, you’re basically stuck fighting over the radio with everyone else, with no clean way to share the channel between multiple independent apps. MAM is a small framing layer that sits on top of Meshtastic’s PRIVATE_APP portnum and lets completely different apps coexist on the same channel without stepping on each other.

Concretely, here’s what it does:

  • A 4-byte header + MessagePack payload per packet
  • App multiplexing via a 16-bit message ID (so multiple apps share one channel cleanly)
  • Reassembly for messages that span multiple packets (up to 16 chunks × 236 bytes = ~3.7 KB)
  • A defined handshake with the local node over BLE (ToRadio / FromRadio)
  • Honest, explicit security posture: the PSK is public, it’s a namespace token, not actual security, that’s each app’s problem to solve

What struck me reading it is how general-purpose it feels. The spec is very deliberate about what it does and doesn’t cover things like reliability, encryption, and app-level schemas are explicitly left to each app to figure out. It’s just the transport plumbing, nothing more. There’s even a registered vs experimental app ID split built in, which reads like the author was thinking about other people building on top of it, not just their own use case.

I’ll be honest, some of the finer technical details go a bit over my head. But the overall design feels solid and the spec is short enough to read in one sitting. I’d be curious what people who’ve actually built things on Meshtastic think. Does this solve a real problem? Is there something else already doing this that I missed? Does the spec have obvious holes? Is anyone aware of other apps implementing it?

  • sobchak@programming.dev
    link
    fedilink
    arrow-up
    1
    ·
    5 hours ago

    Would talking directly to the device would require some custom firmware?

    No, there are libraries to talk to the Meshtastic firmware for quite a few programming languages. The messages it expects are defined as protobufs, so it wouldn’t be too hard to write your own library if one didn’t exist either.

    Also if I did understood correctly I think that MAM, despite having Meshtastic in its name, could easily be adapted to any other LoRa based mesh network.

    I don’t think so. I think only Meshtastic uses portnums. Reticulum uses destination addresses, where each app would have its own address.