Bluetooth 如何使用gatttool非交互模式
我想在非交互模式下编写Bluetooth 如何使用gatttool非交互模式,bluetooth,raspberry-pi,Bluetooth,Raspberry Pi,我想在非交互模式下编写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 我正在更改使用蓝牙的灯光颜色 使用非交互模式的等价物是
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
如何编写命令
环境:
我使用的是树莓皮和树莓皮,选项不是--char write
,而是--char write req
命令总数必须为:
sudo gatttool -i hci0 -b 78:A5:04:44:0A:57 --char-write-req -a 0x0025 -n ff