Qt是否支持Windows蓝牙API?

Qt是否支持Windows蓝牙API?

问题描述:

谁能告诉我Qt是否支持Windows蓝牙API? 如果可以的话,请您分享一些使用方法的信息吗?

Can anyone tell me whether or not Qt supports the windows Bluetooth API? If so could you please share some information on how to use it?

自从上次回答以来,这个问题的答案已经有所改变. Qt 5.2版为Linux/BlueZ和BlackBerry设备实现了蓝牙API. Qt 5.3包括对Android的蓝牙支持. Linux设备可以使用RFCOMM或L2CAP协议进行连接. Android和Blackberry仅具有RFCOMM.

The answer to this question has changed a bit since the last response was given. Qt version 5.2 implemented a Bluetooth API for Linux/BlueZ and BlackBerry devices. Qt 5.3 includes Bluetooth support for Android. Linux devices can connect with RFCOMM or L2CAP protocols. Android and Blackberry only have RFCOMM.

仍然不支持Windows上的蓝牙,但是很难找到这个事实.当前,如果您在Windows上创建 QBluetoothSocket 并告诉它连接到一个地址,即使有内置的错误报告机制,它也会静默失败.如果您使用 QBluetoothLocalDevice 接口来检索设备,则会返回一个空白列表.尽管类文档没有提到这一事实,但蓝牙概述阐明

Bluetooth on Windows is still not supported, but that fact is hard to find. Currently, if you create a QBluetoothSocket on Windows and tell it to connect to an address, it fails silently even though there is a built-in error-reporting mechanism. If you use the QBluetoothLocalDevice interface to retrieve devices, you get back an empty list. Although the class documentations don't mention the fact, the Bluetooth Overview clarifies that

当前,该API在Android,BlackBerry 10和Linux(Bluez 4.x)上受支持.

Currently the API is supported on Android, BlackBerry 10 and Linux (Bluez 4.x).