我想開始開發一些工具,讓我通過藍牙在手機和計算機之間進行通信,並且我想使用Python。我安裝了python藍牙模塊(PyBluez),但它沒有檢測到我內置的BT適配器(我在東芝Satellite A300上)。PyBluez沒有檢測到內置的藍牙適配器
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堆棧將文件傳輸到我的筆記本電腦和手機。 – pdowling 2010-11-16 20:09:54
我發佈了同樣的錯誤,但只有在沒有設備可被發現的情況下。當有設備發現它有效時,我不會收到錯誤。 – 2011-05-03 03:59:08