pybluez未检测到任何设备

问题描述 投票:3回答:1

我有以下Python代码:

import bluetooth
print(bluetooth.discover_devices())

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

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

如何解决/解决这个问题?

python bluetooth bluez pybluez
1个回答
0
投票

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

© www.soinside.com 2019 - 2024. All rights reserved.