Skip to content
This repository was archived by the owner on Sep 20, 2024. It is now read-only.
This repository was archived by the owner on Sep 20, 2024. It is now read-only.

bluetoothgatt discoverServices takes so long #5

Description

@Jai-GAY

from this log it shows that from mBluetoothGatt.discoverServices() to public void onServicesDiscovered(BluetoothGatt gatt, int status) callback took about 6 seconds for android 6.0.1 & 5.x. for android 4.4.2 it takes about 10 seconds, for android 4.3 about 1 second.

i like to know is there way to control / improve it ?

12:02:41.642 D/BluetoothGatt: connect() - device: F7:73:DE:00:4D:DE, auto: false
12:02:41.642 D/BluetoothGatt: registerApp()
12:02:41.642 D/BluetoothGatt: registerApp() - UUID=8a45498c-dcdf-4987-970d-0395638f72c6
12:02:41.644 D/UartService: Trying to create a new connection.
12:02:41.644 D/BluetoothGatt: onClientRegistered() - status=0 clientIf=5
12:02:42.775 D/BluetoothGatt: onClientConnectionState() - status=0 clientIf=5 device=F7:73:DE:00:4D:DE
12:02:42.775 D/UartService: onConnectionStateChange state = 2
12:02:42.777 D/UartService: broadcastUpdate 1
12:02:42.777 I/UartService: Connected to GATT server.
12:02:42.796 D/BluetoothGatt: discoverServices() - device: F7:73:DE:00:4D:DE
12:02:42.801 I/UartService: Attempting to start service discovery:true
12:02:48.298 D/BluetoothGatt: onSearchComplete() = Device=F7:73:DE:00:4D:DE Status=0
12:02:48.298 W/UartService: mBluetoothGatt = android.bluetooth.BluetoothGatt@ace296b
12:02:48.299 D/UartService: broadcastUpdate 1
12:02:48.304 D/BLE_com: ACTION_GATT_SERVICES_DISCOVERED

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions