python icon indicating copy to clipboard operation
python copied to clipboard

--ble-scan will crash

Open MrGhost6666 opened this issue 1 month ago • 2 comments

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.

MrGhost6666 avatar Nov 12 '25 17:11 MrGhost6666

Does your MAC show up in bluetoothctl devices Paired or bluetoothctl devices Connected

It should be appearing in the first but not the second.

If it doesn't appear in the first, then you would need to pair the device. If it does appear in the second, then you'll need to run bluetoothctl disconnect 'CF:94:E9:10:9F:50' so that it's not already connected when the cli tries to connect to it.

Travis-L-R avatar Nov 12 '25 21:11 Travis-L-R

Does your MAC show up in bluetoothctl devices Paired or bluetoothctl devices Connected

It should be appearing in the first but not the second.

If it doesn't appear in the first, then you would need to pair the device. If it does appear in the second, then you'll need to run bluetoothctl disconnect 'CF:94:E9:10:9F:50' so that it's not already connected when the cli tries to connect to it.

Bluetooth was found, but no pairing was possible.

It did not display a PIN code pairing message, and the notification showed that the connection was immediately lost after it was established.

MrGhost6666 avatar Nov 13 '25 15:11 MrGhost6666