属性需要读取之前认证/写 [英] Attribute requires authentication before read/write

查看:295
本文介绍了属性需要读取之前认证/写的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用的是Linux计算机的bluez版本4.101。我在从模式BLE设备进行通信。我试图从BLE设备读取数据。但是,当我这样做,读取失败,出现以下错误:属性要求的读/写之前进行身份验证。我可以读许多其他特性的数据,但我不能在这一个。我使用的命令是

I am using a Linux computer with bluez version 4.101. I am communicating with a BLE device in slave mode. I am trying to read data from the BLE device. But when I do that the read fails with the following error: "Attribute requires authentication before read/write". I can read data from many other characteristics but I fail on this one. The commands I am using are

-gatttool -b 11:22:33:44:55:66 --char阅读

什么我需要做的读取该数据?

What do I need to do to read this data?

注:我可以阅读我的​​iPhone这个数据。但我需要配对,所以也许这是一个配对的问题。

Note: I can read this data from my iPhone. But I need to pair, so maybe it is a pairing issue.

推荐答案

尝试使用 - 秒级=中等 - 仲与gatttool级=高。我不知道如何将这些工作,但本质上没有安全的适当水平读取属性。 UPS配对您的安全级别,这就是为什么它可以在你的iPhone。

Try using --sec-level=medium or --sec-level=high with gatttool. I'm not sure how those work, but essentially you don't have the right level of security to read that attribute. Pairing ups your security level, and that's why it works on your iPhone.

您也可以尝试 -I 与gatttool一个交互式提示。

You may also want to try -I for an interactive prompt with gatttool.

这篇关于属性需要读取之前认证/写的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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