-
Notifications
You must be signed in to change notification settings - Fork 362
Description
Describe the bug
I have two devices and when I try to connect one of them I can see that the Bluetooth Gatt is called and instead of waiting for it to connect on, I close the connection. Then I went to connect to another device and found that the gatt connection was abnormal and there was no response at all.
Then I tried to connect the previous device and found that bluetooth gatt was back to normal. I repeated the previous operation and bluetooth gatt became abnormal again.
This phenomenon occurs when the connection is forcibly terminated during the connection process.
To Reproduce
Steps to reproduce the behavior:
- Connect to one device using
connectToDevice - Use
_connStream.cancel()to terminate process - Connect to another device using
connectToDevice
Log
2025-03-21 11:50:29.404 16720 BluetoothGatt com...elocks.thorlock D connect() - device: CC:45:A5:84:A9:D8, auto: false
2025-03-21 11:50:29.404 16720 BluetoothGatt com...elocks.thorlock D registerApp()
2025-03-21 11:50:29.404 16720 BluetoothGatt com...elocks.thorlock D registerApp() - UUID=373f8656-e333-48bc-bb86-c2c989f7404b
2025-03-21 11:50:29.407 16720 BluetoothGatt com...elocks.thorlock D onClientRegistered() - status=0 clientIf=5
2025-03-21 11:50:29.441 16720 flutter com...elocks.thorlock I ConnectionStateUpdate(deviceId: CC:45:A5:84:A9:D8, connectionState: DeviceConnectionState.connecting, failure: null)
2025-03-21 11:50:29.442 16720 Flutte...ocator com...elocks.thorlock E Geolocator position updates started
2025-03-21 11:50:29.522 16720 flutter com...elocks.thorlock I 24.581386135657063
2025-03-21 11:50:29.523 16720 flutter com...elocks.thorlock I 117.97516352905168
2025-03-21 11:50:29.776 16720 flutter com...elocks.thorlock I Widget [<'TIEGyXzuxF'>] is 0.0% visible
2025-03-21 11:50:29.777 16720 flutter com...elocks.thorlock I Widget [<'m1MmYcWzjt'>] is 100.0% visible
2025-03-21 11:50:35.422 16720 flutter com...elocks.thorlock I BleConnEvent>>>connected: false, lockName: TL25000044
2025-03-21 11:50:35.423 16720 Blueto...anager com...elocks.thorlock D getConnectionState()
2025-03-21 11:50:35.423 16720 Blueto...anager com...elocks.thorlock D getConnectedDevices
2025-03-21 11:50:35.423 16720 CheckPermission com...elocks.thorlock E _bluetooth code = 10
2025-03-21 11:50:35.427 16720 BluetoothGatt com...elocks.thorlock D close()
2025-03-21 11:50:35.427 16720 BluetoothGatt com...elocks.thorlock D unregisterApp() - mClientIf=5
2025-03-21 11:50:42.767 16720 Flutte...ocator com...elocks.thorlock E Geolocator position updates stopped
2025-03-21 11:50:42.768 16720 Flutte...ocator com...elocks.thorlock E There is still another flutter engine connected, not stopping location service
2025-03-21 11:50:42.776 16720 flutter com...elocks.thorlock I BleConnEvent>>>connected: false, lockName: TL25000044
2025-03-21 11:50:42.805 16720 flutter com...elocks.thorlock I Widget [<'m1MmYcWzjt'>] is 0.0% visible
2025-03-21 11:50:42.806 16720 flutter com...elocks.thorlock I Widget [<'TIEGyXzuxF'>] is 100.0% visible
2025-03-21 11:50:43.194 16720 flutter com...elocks.thorlock I here CC:45:A5:84:AF:48
2025-03-21 11:50:43.194 16720 Google...esUtil com...elocks.thorlock W com.makelocks.thorlock requires the Google Play Store, but it is missing.
2025-03-21 11:50:43.280 16720 flutter com...elocks.thorlock I ConnectionStateUpdate(deviceId: CC:45:A5:84:AF:48, connectionState: DeviceConnectionState.connecting, failure: null)
2025-03-21 11:50:43.281 16720 Flutte...ocator com...elocks.thorlock E Geolocator position updates started
2025-03-21 11:50:43.381 16720 flutter com...elocks.thorlock I 24.581386135657063
2025-03-21 11:50:43.381 16720 flutter com...elocks.thorlock I 117.97516352905168
2025-03-21 11:50:43.637 16720 flutter com...elocks.thorlock I Widget [<'TIEGyXzuxF'>] is 0.0% visible
2025-03-21 11:50:43.637 16720 flutter com...elocks.thorlock I Widget [<'YBOC9r8tJe'>] is 100.0% visible
Expected behavior
Smartphone / tablet
- Device: Xiaomi
Peripheral device
Additional context