是什么让 QBluetoothDeviceDiscoveryAgent::finished() 被调用?

What makes QBluetoothDeviceDiscoveryAgent::finished() be called?

我正在使用 QBluetoothDeviceDiscoveryAgent 在 Android phone 上搜索 BLE 设备。

我请求通过调用 QBluetoothDeviceDiscoveryAgent::start(). After a few seconds, QBluetoothDeviceDiscoveryAgent::finished() is emitted, but I did not call QBluetoothDeviceDiscoveryAgent::stop() 开始设备搜索。

此时,我的 BLE 设备还没有找到(它很慢......我知道),并且它不会因为系统自行决定停止搜索......所以我需要手动重新启动搜索。

为什么系统停止搜索? Qt 文档说 QBluetoothDeviceDiscoveryAgent::finished():

This signal is emitted when Bluetooth device discovery completes.

这是什么意思?谁能决定发现已经完成?它来自BLE标准吗?作为最终用户,我是唯一知道它何时完成的人,即何时找到我正在寻找的设备....

正如 Frank Osterfeld 评论的那样,QBluetoothDeviceDiscoveryAgent (see line 273) 的 android 实现默默地创建了一个 10 秒的超时自动停止搜索。

对于想要搜索超过10秒的用户来说是一种痛苦...

在此处填写错误报告:https://bugreports.qt.io/browse/QTBUG-53012