--ble no address provided

Offen
#877 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Maintainer antworten meist innerhalb von 1 Tag

Dieses Issue hat noch niemand übernommen.

Bewertung

Schwierigkeit
3/5
Geschätzter Aufwand
Ein halber Tag
Anfängerfreundlichkeit
55/100
Issue-Typ
Bug
Klarheit
Klar beschrieben
Aktivitätsstatus
Veraltet
Tech-Stack
python
Bereich
cli

Rechercherichtung

The debug output shows the BLE address reaching BleInterface.__init__ in ble_interface.py (lines 49-59) but then hitting the if not address: early return at line 267-268, so the value is lost before that check. Trace where the --ble argument is parsed and passed to the interface constructor, likely in __main__.py. Done means --ble <address> --info connects to the device and no longer logs 'No address provided'. There are no tests or comments in the payload, so verify by running the command against a device or a mocked BleakClient.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Beschreibung

With firmware 2.17.5 with RAK4631, XIAO NRF KIT and HELTEC V3, V4:

meshtastic --ble '650FE00F-0AC1-844B-5F4C-54F0AC37AAAA' --info --debuglib
DEBUG file:main.py common line:1352 Not logging serial output
DEBUG file:ble_interface.py init line:49 Threads starting
DEBUG file:ble_interface.py init line:55 Threads running
DEBUG file:ble_interface.py init line:59 BLE connecting to: 650FE00F-0AC1-844B-5F4C-54F0AC37AAAA
DEBUG file:ble_interface.py init line:268 No address provided - only discover method will work.
INFO file:ble_interface.py scan line:129 Scanning for BLE devices (takes 10 seconds)...

No --info, no --nodes etc. possible. Seems as if the string after --ble is not targeted in the code.

ble_interface.py at line 267 -->

    if not address:
        logger.debug("No address provided - only discover method will work.")
        return

    self.bleak_client = BleakClient(address, **kwargs)
Vorherrschende Sprache
Python
Sterne
855
Forks
355
Ø Merge
3 T. 3 Std.
Gemergte PRs (30 T.)
12

Entwicklungsumgebung

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

Alle Issues in meshtastic/python

Ähnliche Issues

Weitere Issues zu Python

Neue Issues direkt in Ihr Postfach

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