【问题标题】:PyBluez does not detect the built-in bluetooth adapterPyBluez 未检测到内置蓝牙适配器
【发布时间】:2013-09-23 05:45:59
【问题描述】:

我想开始开发一些工具,让我通过蓝牙在手机和计算机之间进行通信,我想使用 Python 来实现它。我安装了 python 蓝牙模块 (PyBluez),但它没有检测到我的内置 BT 适配器(我在东芝 Satellite A300 上)。

import bluetooth
nearby_devices = bluetooth.discover_devices()

print(nearby_devices)

返回以下错误:

Traceback (most recent call last):
  File "C:/Python26/bt.py", line 3, in <module>
    nearby_devices = bluetooth.discover_devices()
  File "C:\Python26\lib\site-packages\bluetooth\msbt.py", line 9, in discover_devices
    return bt.discover_devices (flush_cache, lookup_names)
IOError: No Bluetooth adapter detected

有什么帮助吗?

【问题讨论】:

  • 是的,绝对开启,我可以通过东芝自己的 BT 堆栈在笔记本电脑和手机之间传输文件。
  • 我收到了与您发布的相同的错误,但前提是没有发现任何设备。当有设备发现它可以工作并且我没有收到错误消息时。

标签: python bluetooth


【解决方案1】:

PyBluez 在 Windows 上使用 MS 蓝牙驱动程序堆栈和 Widcom,在 Linux 上使用 BlueZ。如果您的笔记本电脑有不同的堆栈,则无法正常工作。

【讨论】:

    【解决方案2】:

    您可以卸载驱动程序(如果可能的话),然后重新启动 Windows 并让它安装默认驱动程序。 如果你管理它,PyBluez 会更好地工作。

    【讨论】:

      猜你喜欢
      • 2016-09-26
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2021-12-26
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多