Я пытаюсь подключиться к монитору артериального давления AnD UA-651BLE и получить значения в приложении для Android. Приложение может найти устройство, но я получаю Type_Gatt_Error в 'onConnectionStateChange'.
Это нормально работает для определенных устройств, таких как Samsung Galaxy S5, Moto G4 и т. Д., Но не для некоторых телефонов, таких как Redmi 3s Prime и т. Д.
Это работает хорошо, и я могу читать данные, когда я отключаю устройство и заново подключаю его каждый раз. Я не могу ничего понять, так как я новичок в интеграции Android. Я попытался изменить целевые версии SDK на 21 и 23, так как я в основном использую устройства Android 5.0.1 и выше. но не повезло
Я обнаружил, что подобные проблемы были подняты многими на портале, но не нашел никакого решения, работающего на меня.
Может ли кто-нибудь, пожалуйста, дать мне понять, почему это происходит и каково возможное решение?
Ниже приведены журналы, которые я получаю в Android-студии:
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