BluezV5.42 DBUS C API是否适用于BLE? [英] BluezV5.42 DBUS C API for BLE?
问题描述
我已经使用BLUEZV5.30
为openwrt
开发了BLE应用程序.我能够通过提取源代码gatttool
和hcitool
来创建应用程序.我还添加了这些工具所提供的其他功能(例如阅读rssi
).
I have developed BLE application for openwrt
using BLUEZV5.30
. I was able to create the application by extracting source code gatttool
and hcitool
. I have also added few more functionality then provided by these tools (like reading rssi
).
但是,我已经将我的bluez
堆栈升级到了5.42
,并且我打算对所有BLE相关操作使用DBUS
接口.我想要的功能:
However, i have upgraded my bluez
stack to 5.42
and i am planning to use DBUS
interface for all BLE related operations. The functionality i want:
- 阅读RSSI
- 连接和断开连接
- 绑定
- 配对
- 删除绑定信息
- 发现
- 扫描
- 广告
- 写/读特征
- 通知和指示
- Reading RSSI
- Connecting and Disconnecting
- Bonding
- Pairing
- Deleting Bonding information
- Discovery
- Scanning
- Advertising
- Write/Reading to Characteristics
- Notifications and Indications
我能够使用C ++编写的代码执行上述所有操作(绑定和配对除外).但是,由于我现有代码的某些问题以及无法配对/绑定,我想迁移到dbus接口.但是,我不确定BLUEZ DBUS API
中的错误以及API提供的功能.我已经阅读过 API文档,但是没有不能清楚地看到DBUS接口.
I was able to perform all the above operations (except bonding and pairing) using my code written in C++. However, due to some issues with my existing code and inability to pair/bond, i want to migrate to dbus interface. However, i am not sure about the bugs in BLUEZ DBUS API
and functionality provided by the APIs. I have read this API Doc but it didn't give any clear picture of DBUS interface.
我的问题是我不确定我是否可以使用dbus api
获得所有必需的功能?我已经阅读了文档(bluez dbus api),但是我仍然不确定.
My question is I am not sure if i can get all of the required functionality with dbus api
? I have read the documentation (bluez dbus api) but i am still not sure.
推荐答案
正如您在其他 gattlib 以支持Bluez DBUS API.
gattlib
用C编写.如果您不想使用它,请查看其代码应可帮助您继续前进.
As you mention in the other post I updated gattlib to support Bluez DBUS API.
gattlib
is written in C. If you do not want to use it looking at its code should help you to progress.
Sinve Bluez v5.42, GATT D-BUS API不再可用标记为实验性.
Sinve Bluez v5.42, GATT D-BUS API is not longer mark as experimental.
此处描述了DBUS API: https://git.kernel.org/pub/scm/bluetooth/bluez.git/tree/doc .还有(python)示例展示了API.
The DBUS API is described here: https://git.kernel.org/pub/scm/bluetooth/bluez.git/tree/doc. There are also (python) examples that demonstrate the API.
- Reading RSSI
- Connecting and Disconnecting
- Pairing
- Discovery
- Scanning
- Advertising
- Write/Reading to Characteristics
- Notifications and Indications
- Bonding and Deleting Bonding information: it looks it is transparent when using DBUS API.
这篇关于BluezV5.42 DBUS C API是否适用于BLE?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!