如何使用gatttool非交互模式 [英] How to use gatttool non-interactive mode
本文介绍了如何使用gatttool非交互模式的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想写在非交互模式 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
我改变了使用蓝牙的光的颜色。
I'm changing color of light that is using bluetooth.
这是相当于利用非交互模式?
我想这样的,但它不会改变光的颜色,并停止它,我必须使用 CTRL + C
。没有任何消息都没有。
What is the equivalent by using non-interactive mode?
I tried like this, but it doesn't change the color of light and to stop it I must use ctrl+c
. There is no message at all.
sudo gatttool -i hci0 -b 78:A5:04:44:0A:57 --char-write -a 0x0025 -n ff
我怎么能写命令?
How can I write the command?
我用树莓派
和 Rasbian
。
推荐答案
选项不是 - 焦炭 - 写
但 - 焦-write-REQ
。
总命令必须是:
sudo gatttool -i hci0 -b 78:A5:04:44:0A:57 --char-write-req -a 0x0025 -n ff
这篇关于如何使用gatttool非交互模式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文