简体   繁体   English

Qt C ++ BlueZ 5 QDbus库

[英]Qt C++ BlueZ 5 QDbus Library

In BlueZ 5 the DBus API has changed substantially. 在BlueZ 5中,DBus API发生了重大变化。 I previously had a working QDbus controller library for BlueZ 4 based on this: https://gitorious.org/qt-bluez-demos/ 我以前有一个基于BlueZ 4的有效QDbus控制器库,基于此: https ://gitorious.org/qt-bluez-demos/

I've been googling quite a bit and cannot find any existing starting point to convert my BlueZ 4 library to BlueZ 5. 我一直在搜索很多东西,找不到将BlueZ 4库转换为BlueZ 5的任何现有起点。

NOTE: I'm using Qt 4.8 but it seems Qt 5.0 has some QBluetooth namespace, however it has not been updated for BlueZ 5 yet either: 注意:我正在使用Qt 4.8,但似乎Qt 5.0具有一些QBluetooth命名空间,但是尚未针对BlueZ 5进行更新:

https://bugreports.qt-project.org/browse/QTBUG-32085?page=com.atlassian.streams.streams-jira-plugin:activity-stream-issue-tab

This library is also BlueZ 4 only: 该库也仅是BlueZ 4:

https://github.com/nemomobile/libbluez-qt/tree/master/bluez-qt

Can anybody point me to some existing code? 谁能指出我一些现有的代码? Thanks! 谢谢!

As the corresponding bug tracker entry writes: 正如相应的错误跟踪器条目所写:

The Bluez API has released a new major release which is incompatible to Bluez 4.x. Bluez API发布了一个新的主要版本,该版本与Bluez 4.x不兼容。 Currently QtBluetooth supports Bluez 4.x only. 当前,QtBluetooth仅支持Bluez4.x。

It means that, unfortunately. 不幸的是,这意味着。 The bugreport is still open, and this has not been fixed yet. 错误报告仍处于打开状态,并且尚未修复。 You will need patience or enough courage to step up and contribute to it. 您将需要耐心或足够的勇气来加倍努力并为此做出贡献。

BlueZ 5 support is now in Qt as of 5.4 . Qt 从5.4开始支持BlueZ 5。 I arrived at this question because I'm creating some software for BLE devices using Qt 5.5 and I want to know how I can know if my Qt instance is in fact using BlueZ 5 or BlueZ 4. 我遇到了这个问题,因为我正在使用Qt 5.5为BLE设备创建一些软件,并且我想知道如何知道我的Qt实例实际上是使用BlueZ 5还是BlueZ 4。

https://github.com/KDE/bluez-qt上的KDE bluez-qt项目是BlueZ 5的基于Qt的包装器。与Qt蓝牙模块不同,该API相当直接地映射到BlueZ 5 D-Bus API。它自己的API,因此取决于您的需求。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM