【发布时间】:2016-12-02 10:40:05
【问题描述】:
连接到蓝牙设备后,我尝试通过句柄或 uuid(我都尝试过)读取和写入请求,但均未成功。
我正在使用这个库 https://github.com/labapart/gattlib,它适用于 ble_scan 的示例,并且只需少量更改即可发现。
问题在于示例read_write: https://github.com/labapart/gattlib/blob/master/examples/read_write/read_write.c
从不填充两个函数中使用的缓冲区gattlib_read_char_by_uuid(connection, &g_uuid, buffer, sizeof(buffer));
和gattlib_write_char_by_handle(connection, handle, buffer, sizeof(buffer));
任何想法可能是问题所在? 如果没有,谁能告诉我在哪里可以找到 C/C++ 中 Bluez for Linux 的读/写示例?
提前致谢。
【问题讨论】:
-
我想知道你是否设法让它工作?
-
不,对不起@JohnSmith
标签: c linux bluetooth raspberry-pi bluez