我有以下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示例表示