【发布时间】:2017-06-08 05:32:30
【问题描述】:
在 BlueZ 工具/btgatt-client.c
我正在使用此文件连接到设备并读取数据,并且我想禁用交互式命令提示符。
我可以连接,但要获取数据注册通知 0x00xx,我必须通过 cmd 窗口输入,然后调用 prompt_read_cb,我该如何自动执行此操作?
prompt_read_cb总是等待cmd窗口事件发生,如何绕过??
if (mainloop_add_fd(fileno(stdin),EPOLLIN | EPOLLRDHUP | EPOLLHUP |
EPOLLERR,prompt_read_cb, cli, NULL) < 0)`
{
fprintf(stderr, "Failed to initialize console\n");
return EXIT_FAILURE;
}
【问题讨论】:
-
欢迎来到 StackOverflow。请采取tour,学习提出好问题stackoverflow.com/help/how-to-ask,制作minimal reproducible example。尤其是寻找有关措辞、注释和降价格式的提示,以提高可读性。
标签: c linux bluetooth-lowenergy bluez