Unable to receive messages but SDK works otherwise

Ouverte
#906 0 commentaires 1 réaction 0 personnes assignées Voir sur GitHub

Les mainteneurs répondent en général sous 1 jour

Personne n'a encore pris cette issue.

Évaluation

Difficulté
4/5
Temps estimé
3-5 jours
Accessibilité débutants
15/100
Type d'issue
Bug
Clarté
À clarifier
Activité
À l'abandon
Stack technique
python
Domaine
api

Piste de recherche

The report concerns the meshtastic.receive pypubsub topic in the Python SDK's serial interface, so start with how meshtastic.serial_interface.SerialInterface dispatches incoming packets. Reproducing needs a Meshtastic device connected over USB that receives direct text messages. The issue has no comments or assignee, and reproducing it depends on hardware, so a newcomer would need a maintainer's direction first. Done means text messages sent to the node reach the on_receive callback.

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

Description

Using the following dead simple code based on countless examples, fails for me when using the Meshtastic Python SDK and the Seeed Wio Tracker L1 Pro.

import time
import meshtastic
import meshtastic.serial_interface
from pubsub import pub


def on_receive(packet, interface):
    print(packet)

pub.subscribe(on_receive, "meshtastic.receive")

interface = meshtastic.serial_interface.SerialInterface()

print("Waiting for messages...")
while True:
    time.sleep(5)

This will report occasional telemetry and position messages from various nodes but never any messages sent to the node. Received messages appear on the node's screen and can be read there but are never reported via the receiver hook. The node is connected by USB.

Note that I can retrieve the node list, send messages and interact with the node config via the Python SDK - I just can't seem to receive messages.

Things I've tried:

  • Various meshtastic SDK versions in the 2.6.x and 2.7.x series
  • Python versions 3.11, 3.12 and 3.13.
  • Tried with both L1 Pros I have
  • Firmware versions 2.715 and 2.7.19 (no difference)
  • Usiing pypubsub's snoop feature to see all events - there are just none for incoming text messages.

I feel like I must be missing something. Any pointers on how to troubleshoot this?

Langage dominant
Python
Étoiles
855
Forks
355
Merge moyen
3 j 3 h
PR mergées (30 j)
12

Préparer son environnement

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 meshtastic/python

Toutes les issues de meshtastic/python

Issues similaires

Plus d'issues Python

Recevez les nouvelles issues par e-mail

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