LethalEthan/Bluetooth-Unlock

With Bluetooth OFF i am getting an error.

Opened this issue · 0 comments

Run sudo python3 Bluetooth-Unlock.py on GNOME Librem 5 phone Mobile, Phosh shell, Gnome v 1.3.38+3, blueooth v 5.55-3.1. This may be a feature request of sorts.

Turn off bluetooth device and select search for bluetooth device. Script fails:

`Would you like to activate debug mode? [Y/N] Y
DEBUG is active

Thank you for using Bluetooth-Unlock 9.1 root

Searching for nearby devices...

Traceback (most recent call last):
File "/home/purism/Bluetooth-Unlock/Bluetooth-Unlock.py", line 361, in
get_device_address()
File "/home/purism/Bluetooth-Unlock/Bluetooth-Unlock.py", line 257, in get_device_address
nearby = discover_devices(lookup_names = True)
File "/usr/lib/python3/dist-packages/bluetooth/bluez.py", line 19, in discover_devices
device_id = _bt.hci_get_route()
OSError: [Errno 19] No such device
`

What it should be doing is sit and wait until a bluetooth device becomes available and continue with process. Add device handling and bluetooth interruption management.