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

Aperta
#3,893 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 2 giorni

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
5/5
Tempo stimato
Più di una settimana
Idoneità per principianti
12/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
c

Direzione di ricerca

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.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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.

Lingua principale
C
Stelle
3.9k
Fork
1.5k
Merge medio
2g 7h
PR unite (30g)
56

Preparare l'ambiente

Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di meshcore-dev/MeshCore

Tutte le issue di meshcore-dev/MeshCore

Issue simili

Altre issue su C

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.