[Feature request] MeshCore app: let other apps on the phone share the radio (Local API)

Offen
#3,893 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Maintainer antworten meist innerhalb von 2 Tagen

Dieses Issue hat noch niemand übernommen.

Bewertung

Schwierigkeit
5/5
Geschätzter Aufwand
Über eine Woche
Anfängerfreundlichkeit
12/100
Issue-Typ
Feature
Klarheit
Größtenteils klar
Aktivitätsstatus
Aktiv
Tech-Stack
c

Rechercherichtung

This is a protocol design proposal, not a scoped code change, and it points to an external spec at jooray/meshcore-local-api plus a fork (zjs81/meshcore-open#628) that already implements it. Start by reading that specification and Appendix B, then decide whether the work belongs in the MeshCore app or in a separate client. Done would mean a maintainer decision on the design, not a patch from a newcomer.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Beschreibung

A companion radio has one BLE connection, and the MeshCore app holds it. Another app that wants to use the mesh (a tracker, a road-event beacon, a bridge to the internet, a bot) has to take the radio away from the chat app, or ask the user to disconnect. In practice MeshCore on a phone serves one app at a time.

Reticulum solves this with a local daemon. One app holds the interface, and other apps on the same device talk to it. I'd like the MeshCore app to offer the same thing, with a protocol that other MeshCore apps implement too. Then a client app doesn't care which MeshCore app the user runs.

There is a written specification, test vectors and client libraries (Kotlin, Python, JS):
https://github.com/jooray/meshcore-local-api

In short:

  • A WebSocket on 127.0.0.1 only. It is off by default and refused to browsers (any request with an Origin header).
  • Each app pairs once with a P-256 key. The user approves it in a dialog that shows the app's name and the key's fingerprint, and can revoke it later.
  • Apps subscribe to channel data by channel and dataType (for example 0x0150 Road Events), and send channel data and text. Sends go through the app's normal send path, flood scope and rate limits. The API can't change radio settings, contacts or keys. The only change it can ask for is adding a hashtag channel, and the user confirms that in a dialog.
  • Optional features are announced as capabilities, so an app can start with the core only. Examples: regions, zero-hop or direct paths, replay of data received while the client wasn't running, contacts and direct messages.

Where it runs today:

Appendix B of the spec is a short checklist for adding it to an app. I'd be glad to help, or to change the spec where it doesn't fit the MeshCore app.

Vorherrschende Sprache
C
Sterne
3.9k
Forks
1.5k
Ø Merge
2 T. 19 Std.
Gemergte PRs (30 T.)
61

Entwicklungsumgebung

Dieses Projekt bietet weder Dev-Container noch Dockerfile noch Beitragsleitfaden – die Einrichtung liegt bei Ihnen. Beginnen Sie mit der README; die allgemeinen Schritte stehen in unserem Leitfaden für den ersten Beitrag.

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus meshcore-dev/MeshCore

Alle Issues in meshcore-dev/MeshCore

Ähnliche Issues

Weitere Issues zu C

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.