I am using an onCharacteristicChange listener to get notifications from a BLE device.
This is the code:
bleService.setCharacteristicNotification(characteristicResponse, true);
GattDescriptor descriptor =
characteristicResponse.getDescriptor(BleConstants.DES_CLIENT_CHR_CONFIG);
descriptor.setValue(BluetoothGattDescriptor.ENABLE_NOTIFICATION_VALUE);
queue.add(new GattTransaction(descriptor, BluetoothGattDescriptor.ENABLE_NOTIFICATION_VALUE));
However, after writing the descriptor the LG starts to have problems with the connection. It disconnects a few seconds after the descriptor is written. After reconnect - the same thing happens, so the connection is active only few seconds.
If I skip this step of enabling notifications - it does not disconnect any more, so obviously the enabling the notifications causes the problem.
I have tested the same code and it is working very well on many other phones except the LG K10 LTE.
The android version is 6.0
The Kernel version is 3.18.19
Any help would be appreciated. Thanks.
This is the code:
bleService.setCharacteristicNotification(characteristicResponse, true);
GattDescriptor descriptor =
characteristicResponse.getDescriptor(BleConstants.DES_CLIENT_CHR_CONFIG);
descriptor.setValue(BluetoothGattDescriptor.ENABLE_NOTIFICATION_VALUE);
queue.add(new GattTransaction(descriptor, BluetoothGattDescriptor.ENABLE_NOTIFICATION_VALUE));
However, after writing the descriptor the LG starts to have problems with the connection. It disconnects a few seconds after the descriptor is written. After reconnect - the same thing happens, so the connection is active only few seconds.
If I skip this step of enabling notifications - it does not disconnect any more, so obviously the enabling the notifications causes the problem.
I have tested the same code and it is working very well on many other phones except the LG K10 LTE.
The android version is 6.0
The Kernel version is 3.18.19
Any help would be appreciated. Thanks.
Last edited:
