I am using Marshmallow device to develop my BLE application. Many times I am getting status code 129 in the onServicesDiscovered() method. I have tested on 3 different devices, In all the devices I found the same issue. This is a random issue. I searched on many forums but didn't found any solutions yet.
Following are the things that I have tried: 1. Refreshing Gatt cache using reflection. 2. Reinstalling application. 3. Unpairing and pairing the BLE device. 4. Turning On/Off Bluetooth and wifi. Only restarting the phone is resolving this issue. But I can't ask a user to restart phone if the application is unable to make a connection to BLE device.
What is the root cause of this issue? Is there any the solution for this?
I have checked the Android open source code also for this. I found following URL for status codes.
Please anyone provide me some hint or solution for this.