tinyb
tinyb copied to clipboard
Major bug: Removing a bluetooth device causes tinyb crash
When a connected device (with enabled characteristic change notification) gets removed through an external tool (bluetoothctl or similar) then tinyb crashes and becomes unresponsive.
Steps to reproduce:
- BluetoothDevice.connect()
- BluetoothGattCharacteristic.enableValueNotifications(...)
- Remove device (e.g. bluetoothctl# remove XX:XX:XX:XX:XX)
- BluetoothGattCharacteristic.disableValueNotifications() (possibly other methods as well)
Results in:
tinyb.BluetoothException: GDBus.Error:org.freedesktop.DBus.Error.UnknownObject: Method "StopNotify" with signature "" on interface "org.bluez.GattCharacteristic1" doesn't exist
Also, there is not any way to detect whether a device is removed, e.g. it is not possible to have a condition before BluetoothGattCharacteristic.disableValueNotifications method call.