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

Ouverte
#3,893 0 commentaires 0 réactions 0 personnes assignées Voir sur GitHub

Les mainteneurs répondent en général sous 2 jours

Personne n'a encore pris cette issue.

Évaluation

Difficulté
5/5
Temps estimé
Plus d'une semaine
Accessibilité débutants
12/100
Type d'issue
Fonctionnalité
Clarté
Plutôt claire
Activité
Active
Stack technique
c

Piste de recherche

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.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Description

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.

Langage dominant
C
Étoiles
3.9k
Forks
1.5k
Merge moyen
2 j 19 h
PR mergées (30 j)
61

Préparer son environnement

Ce projet ne fournit ni conteneur de développement, ni Dockerfile, ni guide de contribution : l'installation est à votre charge. Commencez par son README, et consultez notre guide de la première contribution pour les étapes générales.

Par où commencer

  1. Lisez l'issue en entier, puis le guide de contribution du projet.
  2. Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
  3. Forkez le dépôt et travaillez sur une branche.
  4. Ouvrez une pull request qui référence le numéro de l'issue.

Autres issues de meshcore-dev/MeshCore

Toutes les issues de meshcore-dev/MeshCore

Issues similaires

Plus d'issues C

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.