android - 低功耗蓝牙 : Reading the sensor in RedBearLab Arduino Shield from Raspberry Pi

标签 android arduino raspberry-pi bluetooth-lowenergy bluez

我正在尝试从 Raspberry Pi 读取附加到 RedBearLab Arduino Shield 的 FSR 传感器值。我正在使用 RedBearLab 示例 - simplecontrol .

要打开传感器读取功能,我需要写入值 A00100 来处理 0x000b。因此,在通过 gatttool 连接后,我在下面使用了启用传感器读取功能。

[xx:xx:xx:xx:xx:xx][LE]>char-write-cmd 0x000b A00100

我在 Arduino 串行监视器中看到了预期的输出。所以我知道这种支持是有效的。 Pi 正在读取传感器,但我看不到提示中的值。

然后我就关注了这个article ,找出 CCC 句柄(0x000e)并在下面尝试。

$gatttool -b xx:xx:xx:xx:xx:xx -t random --char-write-req --handle=0x000e --value=02 --listen

看到下面的错误

特征写入请求失败:内部应用程序错误:I/O

有人可以帮忙吗?

最佳答案

通过研究同一问题,这是当时蓝牙的一个已知错误,该问题在 5.28 之后的 Bluez 后续版本中得到解决。

关于android - 低功耗蓝牙 : Reading the sensor in RedBearLab Arduino Shield from Raspberry Pi,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21450441/

相关文章:

python - PySerial 不与 Arduino 交谈

c++ - 尝试用纯c语言对arduino进行编程,在 '='之前出现以下错误: expected ',' , ';'、 'asm'、 '__attribute__'或 'Print' |

javascript - 如何在webView的localStorage中设置值

shell - arduino yun与USB声卡获取文件数

java - 减少数组的大小(通过创建新数组) - arrayList 是如何做到的?

python - 在 Python 中通过 `subprocess.run` 调用 g++ 导致可执行文件中的 "exec format error"

java - Log4J 看起来不适合与 sudo 一起使用

c - 从 SPI(GPIO 总线)读取值并通过以太网发送值

java - 根据位置在ListView中膨胀自定义View

android ConstraintLayout 流程 : align items from right to left