--ble-scan will crash

Aberta
#860 2 comentários 0 reações 0 responsáveis Ver no GitHub

Mantenedores costumam responder em até 1 dia

Ninguém assumiu esta issue ainda.

Avaliação

Dificuldade
4/5
Tempo estimado
3-5 dias
Facilidade para iniciantes
15/100
Tipo de issue
Bug
Clareza
Razoavelmente clara
Status de atividade
Estagnada
Stack de tecnologia
linux, python

Direção de pesquisa

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.

Escrita pelo modelo de indexação a partir do texto da issue.

Descrição

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.
Linguagem predominante
Python
Estrelas
855
Forks
355
Merge médio
3d 3h
PRs com merge (30d)
12

Preparar o ambiente

Primeiros passos

  1. Leia a issue inteira e depois o guia de contribuição do projeto.
  2. Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
  3. Faça um fork do repositório e trabalhe em uma branch.
  4. Abra um pull request que referencie o número da issue.

Mais de meshtastic/python

Todas as issues de meshtastic/python

Issues semelhantes

Mais issues de Python

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.