无法读取关贸总协定特性(GATT错误15) [英] Can't read Gatt characteristic (gatt error 15)

查看:395
本文介绍了无法读取关贸总协定特性(GATT错误15)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想读一个特点右关贸总协定连接服务发现成功后。但在 onCharacteristicRead 关贸总协定回调接收到错误15(为0x0F,GATT_INSUFFICIENT_ENCRYPTION),然后137(0x0089)。此错误后立即GATT断开。

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.

我的设备是三星S4,4.4.2。

My device is Samsung S4, 4.4.2.

推荐答案

据我所知这两个错误被发生GATT_INSUFFICIENT_ENCRYPTION和GATT_INSUFFICIENT_AUTHENTICATION当您尝试这样做需要加密的关贸总协定操作。这意味着你需要尝试做任何GATT操作,例如读取特征或写入特性等之前与远程设备BLE进行配对。

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.

看一看下面的<一个href=\"http://stackoverflow.com/questions/24645519/android-how-can-i-make-ble-device-to-paired-device-bonded/24740344#24740344\">SO链接看到了不同的方式来配搭BLE设备。

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

这篇关于无法读取关贸总协定特性(GATT错误15)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆