BluezV5.42 DBUS C API是否适用于BLE? [英] BluezV5.42 DBUS C API for BLE?

查看:300
本文介绍了BluezV5.42 DBUS C API是否适用于BLE?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经使用BLUEZV5.30openwrt开发了BLE应用程序.我能够通过提取源代码gatttoolhcitool来创建应用程序.我还添加了这些工具所提供的其他功能(例如阅读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:

  1. 阅读RSSI
  2. 连接和断开连接
  3. 绑定
  4. 配对
  5. 删除绑定信息
  6. 发现
  7. 扫描
  8. 广告
  9. 写/读特征
  10. 通知和指示
  1. Reading RSSI
  2. Connecting and Disconnecting
  3. Bonding
  4. Pairing
  5. Deleting Bonding information
  6. Discovery
  7. Scanning
  8. Advertising
  9. Write/Reading to Characteristics
  10. 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.

推荐答案

正如您在其他

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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆