flutter_blue_plus icon indicating copy to clipboard operation
flutter_blue_plus copied to clipboard

[Help]: Android: `disconnect` says `already disconnected` instead of canceling autoconnect

Open samnbd opened this issue 5 months ago • 13 comments

Requirements

  • [X] I've looked at the README 'Common Problems' section

Have you checked this problem on the example app?

Yes

FlutterBluePlus Version

1.32.12

Flutter Version

3.22.3

What OS?

Android

OS Version

13

Bluetooth Module

BLE watch

What is your problem?

The issue reported previously here was marked as resolved but I still have the same issue on the latest plugin version 1.32.12 Note that this issue happens when trying to connect a device after disconnecting it.

Logs

D/BluetoothGatt(27345): connect() - device: CA:26:03:F6:2E:90, auto: true
D/BluetoothGatt(27345): registerApp()
D/BluetoothGatt(27345): registerApp() - UUID=1e39eef6-9cce-466d-bbb6-be3308119f24
D/BluetoothGatt(27345): onClientRegistered() - status=0 clientIf=8
I/flutter (27345): [FBP] <connect> result: true
12
E/gralloc4(27345): Empty SMPTE 2094-40 data
D/TrafficStats(27345): tagSocket(313) with statsTag=0xffffffff, statsUid=-1
47
E/gralloc4(27345): Empty SMPTE 2094-40 data

I/flutter (27345): [FBP] <disconnect> args: 
D/[FBP-Android](27345): [FBP] onMethodCall: disconnect
D/[FBP-Android](27345): [FBP] already disconnected
I/flutter (27345): [FBP] <disconnect> result: false
E/gralloc4(27345): Empty SMPTE 2094-40 data

I/flutter (27345): [FBP] <connect> args: {remote_id: CA:26:03:F6:2E:90, auto_connect: 1}
D/[FBP-Android](27345): [FBP] onMethodCall: connect
D/[FBP-Android](27345): [FBP] already connecting
I/flutter (27345): [FBP] <connect> result: true
21
E/gralloc4(27345): Empty SMPTE 2094-40 data
D/BluetoothGatt(27345): onClientConnectionState() - status=0 clientIf=8 device=CA:26:03:F6:2E:90
D/[FBP-Android](27345): [FBP] onConnectionStateChange:connected
D/[FBP-Android](27345): [FBP]   status: SUCCESS
I/flutter (27345): [FBP] [[ OnConnectionStateChanged ]] result: {disconnect_reason_code: 0, disconnect_reason_string: SUCCESS, remote_id: CA:26:03:F6:2E:90, connection_state: 1}
31
E/gralloc4(27345): Empty SMPTE 2094-40 data
I/flutter (27345): [FBP] <discoverServices> args: CA:26:03:F6:2E:90
D/[FBP-Android](27345): [FBP] onMethodCall: discoverServices
D/BluetoothGatt(27345): discoverServices() - device: CA:26:03:F6:2E:90
D/BluetoothGatt(27345): onSearchComplete() = Device=CA:26:03:F6:2E:90 Status=0
D/[FBP-Android](27345): [FBP] onServicesDiscovered:
D/[FBP-Android](27345): [FBP]   count: 11
D/[FBP-Android](27345): [FBP]   status: 0GATT_SUCCESS
I/flutter (27345): [FBP] <discoverServices> result: true
E/gralloc4(27345): Empty SMPTE 2094-40 data
I/flutter (27345): [FBP] [[ OnDiscoveredServices ]] result: {error_string: GATT_SUCCESS, success: 1, remote_id: CA:26:03:F6:2E:90, error_code: 0, services: [{included_services: [], characteristics: [{descriptors: [], service_uuid: 1800, remote_id: CA:26:03:F6:2E:90, characteristic_uuid: 2a00, properties: {broadcast: 0, write_without_response: 0, notify_encryption_required: 0, read: 1, authenticated_signed_writes: 0, extended_properties: 0, indicate: 0, indicate_encryption_required: 0, write: 0, notify: 0}}, {descriptors: [], service_uuid: 1800, remote_id: CA:26:03:F6:2E:90, characteristic_uuid: 2a01, properties: {broadcast: 0, write_without_response: 0, notify_encryption_required: 0, read: 1, authenticated_signed_writes: 0, extended_properties: 0, indicate: 0, indicate_encryption_required: 0, write: 0, notify: 0}}, {descriptors: [], service_uuid: 1800, remote_id: CA:26:03:F6:2E:90, characteristic_uuid: 2a04, properties: {broadcast: 0, write_without_response: 0, notify_encryption_required: 0, read: 1, authenticated_signed_write
I/flutter (27345): [FBP] <setNotifyValue> args: {remote_id: CA:26:03:F6:2E:90, service_uuid: 1801, secondary_service_uuid: null, characteristic_uuid: 2a05, force_indications: false, enable: true}
D/[FBP-Android](27345): [FBP] onMethodCall: setNotifyValue
D/BluetoothGatt(27345): setCharacteristicNotification() - uuid: 00002a05-0000-1000-8000-00805f9b34fb enable: true
E/gralloc4(27345): Empty SMPTE 2094-40 data
I/flutter (27345): [FBP] <setNotifyValue> result: true
2
E/gralloc4(27345): Empty SMPTE 2094-40 data
D/[FBP-Android](27345): [FBP] onDescriptorWrite:
D/[FBP-Android](27345): [FBP]   chr: 2a05
D/[FBP-Android](27345): [FBP]   desc: 2902
D/[FBP-Android](27345): [FBP]   status: GATT_SUCCESS (0)
I/flutter (27345): [FBP] [[ OnDescriptorWritten ]] result: {error_string: GATT_SUCCESS, service_uuid: 1801, success: 1, remote_id: CA:26:03:F6:2E:90, descriptor_uuid: 2902, error_code: 0, characteristic_uuid: 2a05, value: 0200}
I/flutter (27345): [FBP] <readCharacteristic> args: {remote_id: CA:26:03:F6:2E:90, service_uuid: 180a, secondary_service_uuid: null, characteristic_uuid: 2a26}
D/[FBP-Android](27345): [FBP] onMethodCall: readCharacteristic
E/gralloc4(27345): Empty SMPTE 2094-40 data
I/flutter (27345): [FBP] <readCharacteristic> result: true
2
E/gralloc4(27345): Empty SMPTE 2094-40 data
D/[FBP-Android](27345): [FBP] onCharacteristicRead:
D/[FBP-Android](27345): [FBP]   chr: 2a26
D/[FBP-Android](27345): [FBP]   status: GATT_SUCCESS (0)
I/flutter (27345): [FBP] [[ OnCharacteristicReceived ]] result: {error_string: GATT_SUCCESS, service_uuid: 180a, success: 1, remote_id: CA:26:03:F6:2E:90, error_code: 0, characteristic_uuid: 2a26, value: 362e31302e30}
E/gralloc4(27345): Empty SMPTE 2094-40 data
I/flutter (27345): [FBP] <writeCharacteristic> args: {remote_id: CA:26:03:F6:2E:90, service_uuid: 156e7000-a300-4fea-897b-86f698d74461, secondary_service_uuid: null, characteristic_uuid: 7001, write_type: 0, allow_long_write: 0, value: 120d0000000000}
D/[FBP-Android](27345): [FBP] onMethodCall: writeCharacteristic
I/flutter (27345): [FBP] <writeCharacteristic> result: true
7
E/gralloc4(27345): Empty SMPTE 2094-40 data
D/[FBP-Android](27345): [FBP] onCharacteristicWrite:
D/[FBP-Android](27345): [FBP]   chr: 7001
D/[FBP-Android](27345): [FBP]   status: GATT_SUCCESS (0)
E/gralloc4(27345): Empty SMPTE 2094-40 data
I/flutter (27345): [FBP] [[ OnCharacteristicWritten ]] result: {error_string: GATT_SUCCESS, service_uuid: 156e7000-a300-4fea-897b-86f698d74461, success: 1, remote_id: CA:26:03:F6:2E:90, error_code: 0, characteristic_uuid: 7001, value: 120d0000000000}
I/flutter (27345): [FBP] <writeCharacteristic> args: {remote_id: CA:26:03:F6:2E:90, service_uuid: 156e1000-a300-4fea-897b-86f698d74461, secondary_service_uuid: null, characteristic_uuid: 1005, write_type: 0, allow_long_write: 0, value: 3052221002092404}
D/[FBP-Android](27345): [FBP] onMethodCall: writeCharacteristic
I/flutter (27345): [FBP] <writeCharacteristic> result: true
2
E/gralloc4(27345): Empty SMPTE 2094-40 data

samnbd avatar Sep 10 '24 21:09 samnbd