I am trying to connect to AnD UA-651BLE blood pressure monitor and get the values in an android app. The app is able to find the device but I am getting Type_Gatt_Error in 'onConnectionStateChange'.
This is working fine for certain devices like samsung galaxy S5, Moto G4 etc. but not for certain phones like redmi 3s prime, etc.
This works well and i am able to read data, when i unpair the device and re pair it everytime. I am not able to understand anything as i am new to android-ble integration. I tried to change the target SDK versions to 21 and 23 since i am mostly using android 5.0.1 and above devices. but no luck
I found similar issues has been raised by many in the portal, but didnt find any resolution working for me.
Can anyone please make me understand why this is happening and what is the possible resolution?
Below are the Logs i get in Android studio:
D/MYTAG: DashBoard UnBonded Device false true
D/MYTAG: Found device - =*******************A&D_UA-651BLE_459701
D/SN: RESU connectDevice device 6C:EC:EB:45:97:01
D/BluetoothManager: getConnectionState()
D/BluetoothManager: getConnectedDevices
W/SN: RESU Attempt to connect in state: 0
D/BluetoothGatt: connect() - device: 6C:EC:EB:45:97:01, auto: false
D/BluetoothGatt: registerApp()
D/BluetoothGatt: registerApp() - UUID=e7ed0993-f27a-4e2a-bc08-93b76d55a4d5
D/SN: RESU bluetoothGatt android.bluetooth.BluetoothGatt@47015f2
D/MYTAG: CAlling connectDevice from Dashboard REPLY= true
D/BluetoothAdapter: stopLeScan()
D/BluetoothGatt: onClientRegistered() - status=0 clientIf=10
D/BluetoothAdapter: STATE_ON
D/MYTAG: DashBoard UnBonded Device true true
D/BluetoothGatt: onClientConnectionState() - status=133 clientIf=10 device=6C:EC:EB:45:97:01
D/SN: RESU Inside bluetoothGattCallback : onConnectionStateChange
D/SN: MYTAG DashBoard onReceive TYPE_GATT_ERROR
D/SN: RESU onConnectionStateChange()6C:EC:EB:45:97:01, A&D_UA-651BLE_459701, status=133 newState=0
D/SN: MYTAG Disconnect Device
D/SN: MYTAG DashBoard onReceive TYPE_GATT_DISCONNECTED
D/BluetoothGatt: close()
D/BluetoothGatt: unregisterApp() - mClientIf=10
D/BluetoothGatt: cancelOpen() - device: 6C:EC:EB:45:97:01
D/MYTAG: *********** CAlling startLeScan
D/BluetoothAdapter: startLeScan(): null
D/BluetoothAdapter: STATE_ON
D/BluetoothLeScanner: onClientRegistered() - status=0 clientIf=9
I/Choreographer: Skipped 60 frames! The application may be doing too much work on its main thread.
D/MYTAG: Found device - =*******************A&D_UA-651BLE_459701
D/SN: RESU connectDevice device 6C:EC:EB:45:97:01
D/BluetoothManager: getConnectionState()
D/BluetoothManager: getConnectedDevices
W/SN: RESU Attempt to connect in state: 0
D/BluetoothGatt: connect() - device: 6C:EC:EB:45:97:01, auto: false
D/BluetoothGatt: registerApp()
D/BluetoothGatt: registerApp() - UUID=c9f450d6-a78e-4190-8c8c-89ce7c5bcb17
D/SN: RESU bluetoothGatt android.bluetooth.BluetoothGatt@a2caac0
D/MYTAG: CAlling connectDevice from Dashboard REPLY= true
D/BluetoothAdapter: stopLeScan()
D/BluetoothGatt: onClientRegistered() - status=0 clientIf=10
D/BluetoothAdapter: STATE_ON
D/MYTAG: DashBoard UnBonded Device true true
D/BluetoothGatt: onClientConnectionState() - status=133 clientIf=10 device=6C:EC:EB:45:97:01
D/SN: RESU Inside bluetoothGattCallback : onConnectionStateChange
D/SN: MYTAG DashBoard onReceive TYPE_GATT_ERROR
D/SN: RESU onConnectionStateChange()6C:EC:EB:45:97:01, A&D_UA-651BLE_459701, status=133 newState=0
D/SN: MYTAG Disconnect Device
D/SN: MYTAG DashBoard onReceive TYPE_GATT_DISCONNECTED
D/BluetoothGatt: close()
D/BluetoothGatt: unregisterApp() - mClientIf=10
D/BluetoothGatt: cancelOpen() - device: 6C:EC:EB:45:97:01
D/MYTAG: *********** CAlling startLeScan
D/BluetoothAdapter: startLeScan(): null
D/BluetoothAdapter: STATE_ON
D/BluetoothLeScanner: onClientRegistered() - status=0 clientIf=9
I/Choreographer: Skipped 60 frames! The application may be doing too much work on its main thread.
D/MYTAG: Found device - =*******************A&D_UA-651BLE_459701
D/SN: RESU connectDevice device 6C:EC:EB:45:97:01
D/BluetoothManager: getConnectionState()
D/BluetoothManager: getConnectedDevices
W/SN: RESU Attempt to connect in state: 0
D/BluetoothGatt: connect() - device: 6C:EC:EB:45:97:01, auto: false
D/BluetoothGatt: registerApp()
D/BluetoothGatt: registerApp() - UUID=04b0cc2e-ee24-4515-b41b-d93d1fb54aa3
D/SN: RESU bluetoothGatt android.bluetooth.BluetoothGatt@c659f3e
D/MYTAG: CAlling connectDevice from Dashboard REPLY= true
D/BluetoothAdapter: stopLeScan()
D/BluetoothGatt: onClientRegistered() - status=0 clientIf=10
D/BluetoothAdapter: STATE_ON
D/MYTAG: DashBoard UnBonded Device true true
D/BluetoothGatt: onClientConnectionState() - status=133 clientIf=10 device=6C:EC:EB:45:97:01
D/SN: RESU Inside bluetoothGattCallback : onConnectionStateChange
D/SN: MYTAG DashBoard onReceive TYPE_GATT_ERROR
D/SN: RESU onConnectionStateChange()6C:EC:EB:45:97:01, A&D_UA-651BLE_459701, status=133 newState=0
D/SN: MYTAG Disconnect Device
D/SN: MYTAG DashBoard onReceive TYPE_GATT_DISCONNECTED
D/BluetoothGatt: close()
D/BluetoothGatt: unregisterApp() - mClientIf=10
D/BluetoothGatt: cancelOpen() - device: 6C:EC:EB:45:97:01
D/MYTAG: *********** CAlling startLeScan
D/BluetoothAdapter: startLeScan(): null
D/BluetoothAdapter: STATE_ON
D/BluetoothLeScanner: onClientRegistered() - status=0 clientIf=9
I/Choreographer: Skipped 60 frames! The application may be doing too much work on its main thread.
D/MYTAG: Found device - =*******************Mi Band HRX
D/MYTAG: DashBoard UnBonded Device false true
D/MYTAG: Found device - =*******************null