Hello!
I have an issue regarding Android BLE. It is the following: This issue occurs on Samsung Galaxy S10e, Android 10, OneUI 2.5. It comes up when the Smartphone is connected to some Wifi. If the Smartphone is connected to Wifi, onCharacteristic Changed is not called. If Wifi is turned off, everything works as expected and onCharacteristicChanged is called. It was also tested on a Google Pixel 3XL. With this smartphone everything works as expected, no matter if connected to Wifi or not. This seems to occur since the new OneUI Version 2.5. It worked as expected on OneUI 2.1. SetCharacteristicNotification on BluetoothGatt and writeDescriptor work fine and writeDescriptor(descriptor) returns true. So I don’t think there is something wrong about this code, since it works as intended when Wifi is turned off. Just for the case, here my code for enabling notifications on Android BLE:
val CHARACTERISTIC_UPDATE_NOTIFICATION_DESCRIPTOR_UUID = UUID.fromString(“00002902-0000-1000-8000-00805f9b34fb”);
characteristic?.writeType = BluetoothGattCharacteristic.WRITE_TYPE_NO_RESPONSE
bg?.setCharacteristicNotification(characteristic, true)
val descriptor = characteristic?.getDescriptor(CHARACTERISTIC_UPDATE_NOTIFICATION_DESCRIPTOR_UUID)
descriptor?.value = if (enabled) BluetoothGattDescriptor.ENABLE_NOTIFICATION_VALUE else byteArrayOf(0x00, 0x00)
descriptor?.setValue(BluetoothGattDescriptor.ENABLE_INDICATION_VALUE)
bg?.writeDescriptor(descriptor) ?: false
I already tried it without the line descriptor?.setValue(BluetoothGattDescriptor.ENABLE_INDICATION_VALUE)
. It doesn’t change anything. Is there something I am missing? Why could a Wifi connection block onCharacteristicChanged? If the Smartphone has turned on Wifi and is NOT connected, then it works. It only doesn’t work when Wifi is turned on and IS connected.
writeCharacterstic and readCharacterstic are working fine and the callbacks trigger, no matter if Wifi is connected or not. So the BluetoothGattCallback is set just fine.
Can someone help me out here? Thanks!
Best, Markus
Hi,
This situation is similar to a case that I posted a month ago.
https://forum.developer.samsung.com/t/bluetooth-le-issue-after-security-patch-update-level-2020-11-01/9595
You may try to see if this works:
Settings -> Connections -> Wifi -> (3 dots on the top right) Advanced
Try turn off the “Hotspot 2.0”. Then it should be good to go.
Or you can try if “Reset Network Settings” helps or not.
Cheers,
Alvin
Hello Alvin,
Thank you for your response. Indeed, this seems to be the same problem. Turning off Hotspot 2.0 fixes this one, but this is not a satisfying solution. We get many requests that our app does not work because of this issue and responding that they have to turn off Hotspot 2.0 or Wifi isn’t a solution we are targeting.
Did you have any further discussions with the developer support of Samsung or any other solution? Right now, Samsung Android 10 OneUI 2.5 is not usable with our BLE device.
Best,
Markus
Good to see that it helps fix the issue.
Unfortunately, I did not have further discussions with the developer support regarding this issue, or say, cannot.
I am working overseas now and I purchased my S9+ in my home country. When I used the Galaxy Members App to file the error report, the response is that they cannot handle overseas products. I need to contact Samsung Customer Support in my home country. But to me, this is an OS problem, products in different regions are most likely using the same security patch/ system update. Therefore it seems like they are not trying to help to find out the reason.
But from experience, it is not uncommon that the OS has some weird problems after OS updates. For example, I had some customers reported that their iPhone’s Location Service became inactive after updating the iOS. After resetting the “Location and Privacy”, the issue is gone.
So I suspect that the OS update process has some bugs that do not clear the cache/data properly from the previous version. And this data conflicts with each other hence causing weird behavior. So a “soft reset” after OS upgrade is recommended to customers if issues happen after OS update.