Can't read Gatt characteristic (gatt error 15)

老子叫甜甜 提交于 2019-12-12 18:52:03

问题


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:


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.



来源:https://stackoverflow.com/questions/22561100/cant-read-gatt-characteristic-gatt-error-15

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!