【问题标题】:How to use gatttool non-interactive mode如何使用 gatttool 非交互模式
【发布时间】:2015-03-29 07:10:11
【问题描述】:

我想在非交互模式下写gatttool。

$ sudo gatttool -i hci0 -b 78:A5:04:44:0A:57 -I
[78:A5:04:44:0A:57][LE]> connect
Attempting to connect to 78:A5:04:44:0A:57
Connection successful
[78:A5:04:44:0A:57][LE]> char-write-cmd 0x0025 ff

我正在改变使用蓝牙的灯光颜色。

使用非交互模式的等价物是什么? 我试过这样,但它不会改变光的颜色,为了阻止它,我必须使用ctrl+c。根本没有消息。

sudo gatttool -i hci0 -b 78:A5:04:44:0A:57 --char-write -a 0x0025 -n ff

如何编写命令?

环境:

我正在使用Raspberry Pi 和Rasbian。

【问题讨论】:

    标签: bluetooth raspberry-pi


    【解决方案1】:

    选项不是--char-write,而是--char-write-req。

    总命令必须是:

    sudo gatttool -i hci0 -b 78:A5:04:44:0A:57 --char-write-req -a 0x0025 -n ff
    

    【讨论】:

      猜你喜欢
      • 2017-03-11
      • 1970-01-01
      • 2023-03-31
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2012-11-11
      • 2017-06-05
      相关资源
      最近更新 更多