我有以下Python代码:

import bluetooth
print(bluetooth.discover_devices())

这总是要等待几秒钟,并打印出一个空列表。

我的蓝牙适配器似乎正在工作,因为我可以通过键入bluetoothctl轻松发现带有scan on的设备。

我该如何解决/排除故障?

最佳答案

尝试使用:print(bluetooth.discover_devices(duration=8, lookup_names=True, flush_cache=True, lookup_class=False))this示例所示

10-04 15:08