我正在使用 BlueZ 库 gatttool,但当我运行下面提到的 gatttool 命令时,它开始无休止地向我发出通知。有没有办法让它发出一次通知然后退出命令?
命令:
gatttool -b BC:6A:29:AC:02:57 –char-write-req -a 0x2E -n 0100 –listen;
输出为:
Characteristic value/descriptor: 00
Characteristic value/descriptor: 01
Characteristic value was written successfully
Notification handle = 0x002d value: 01 06 40
Notification handle = 0x002d value: 01 05 40
Notification handle = 0x002d value: 01 06 40
Notification handle = 0x002d value: 01 06 44
Notification handle = 0x002d value: 01 05 41
Notification handle = 0x002d value: 01 06 41
....endless notifications..... I just need once
答案1
--listen
无需选择,直接运行即可。
gatttool -b BC:6A:29:AC:02:57 –char-write-req -a 0x2E -n 0100