GATT_INTERNAL_ERROR (0x81) and GATT_ERROR (0x85) Android Marshmallow

A

AC Question

Hi,

I am doing development on Android platform. I am using Marshmallow device to develop my BLE application. Many times I am getting status code 133 and 129 in onConnectionStateChange()method. I have tested on 4 different devices, In all the devices I found same 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 applicaiton.
3. Unpairing and pairing the BLE device.
4. Turning On/Off Bluetooth and wifi.

Only restarting the phone is resolving this issue sometime. But I can't ask application user to restart phone if application is unable to make connection to BLE device.

What is the root cause of this issue? Is there any sure shot solution for this?

I have checked the Android open source code also for this and found gatt_api.h file where all the error codes are defined, but didn't found any solution.

Please anyone provide me some hint or solution for this.

Thank you
 

Trending Posts

Forum statistics

Threads
943,011
Messages
6,916,881
Members
3,158,773
Latest member
Chelsea rae