--ble-scan will crash

Offen
#860 2 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Maintainer antworten meist innerhalb von 1 Tag

Dieses Issue hat noch niemand übernommen.

Bewertung

Schwierigkeit
4/5
Geschätzter Aufwand
3-5 Tage
Anfängerfreundlichkeit
15/100
Issue-Typ
Bug
Klarheit
Größtenteils klar
Aktivitätsstatus
Veraltet
Tech-Stack
linux, python

Rechercherichtung

Start in meshtastic/ble_interface.py at find_device (around line 158), which raises BLEError when the address is not found, and at connect (around line 178) that calls it. The --ble-scan path is in meshtastic/main.py common() near line 1363. Reproducing needs a physical Meshtastic node and a Linux Bluetooth stack, so first check whether the scan returns any devices at all. Done means the scan or direct-address connect succeeds on Linux, or the error path explains the failure clearly.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Beschreibung

I'm running the Meshtastic CLI from source meshtastic_cli/bin/activate using Linux Mint. The user is in a Bluetooth group.

USB connection works fine. However, Bluetooth connection fails.
I'm sure the node is fine, as Bluetooth connection works fine on Android.
I've tried searching and specifying the MAC address, but it's still ineffective.

Does anyone know how to solve this problem?

Node: faketec v5
Version: 2.6.11.60ec05e
Distro: Linux Mint 22.2 cinnamon 6.4.8
Kernel version: Linux 6.14.0-35-generic
Python version: 3.12.3
Meshtastic CLI Version 2.7.4


``` INFO file:ble_interface.py scan line:129 Scanning for BLE devices (takes 10 seconds)...
Traceback (most recent call last):
  File "/home/ghost/meshtastic_cli/bin/meshtastic", line 7, in <module>
    sys.exit(main())
             ^^^^^^
  File "/home/ghost/meshtastic_cli/lib/python3.12/site-packages/meshtastic/__main__.py", line 2203, in main
    common()
  File "/home/ghost/meshtastic_cli/lib/python3.12/site-packages/meshtastic/__main__.py", line 1363, in common
    client = BLEInterface(
             ^^^^^^^^^^^^^
  File "/home/ghost/meshtastic_cli/lib/python3.12/site-packages/meshtastic/ble_interface.py", line 64, in __init__
    raise e
  File "/home/ghost/meshtastic_cli/lib/python3.12/site-packages/meshtastic/ble_interface.py", line 60, in __init__
    self.client = self.connect(address)
                  ^^^^^^^^^^^^^^^^^^^^^
  File "/home/ghost/meshtastic_cli/lib/python3.12/site-packages/meshtastic/ble_interface.py", line 178, in connect
    device = self.find_device(address)
             ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/ghost/meshtastic_cli/lib/python3.12/site-packages/meshtastic/ble_interface.py", line 158, in find_device
    raise BLEInterface.BLEError(
meshtastic.ble_interface.BLEInterface.BLEError: No Meshtastic BLE peripheral with identifier or address 'CF:94:E9:10:9F:50' found. Try --ble-scan to find it.
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.