【发布时间】: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 堆栈在笔记本电脑和手机之间传输文件。
-
我收到了与您发布的相同的错误,但前提是没有发现任何设备。当有设备发现它可以工作并且我没有收到错误消息时。