Can't read Gatt characteristic (gatt error 15)

2019-07-20 09:20发布

I'm trying to read a characteristic right after gatt connected and services discovered successfully. But receives error 15 (0x0f, GATT_INSUFFICIENT_ENCRYPTION) and then 137 (0x0089) in onCharacteristicRead gatt callback. After this error gatt disconnecting immediately.

My device is Samsung S4, 4.4.2.

1条回答
够拽才男人
2楼-- · 2019-07-20 09:49

As far as i know both errors, "GATT_INSUFFICIENT_ENCRYPTION" and "GATT_INSUFFICIENT_AUTHENTICATION" gets occurred when you try to do a GATT operation that requires encryption. This means that you need to pair with the remote BLE device before trying to do any GATT operations, for example reading a characteristic or writing to a characteristic etc.

Have a look at the following SO link to see the different ways to pair with a BLE device.

查看更多
登录 后发表回答