代码如下:
import bluetooth # devices = bluetooth.discover_devices(lookup_names=True) # for address,name in devices: # print(address,name) bluetooth.BluetoothSocket(bluetooth.RFCOMM).connect(("C4:64:E3:E8;F4:CA",1))
运行后出现:
Traceback (most recent call last):
File "D:/Game/NAODIAN/test.py", line 7, in <module>
bluetooth.BluetoothSocket(bluetooth.RFCOMM).connect(("C4:64:E3:E8;F4:CA",1))
File "D:\anaconda\envs\tensorflow2.0\lib\site-packages\bluetooth\msbt.py", line 96, in connect
bt.connect (self._sockfd, addr, port)
OSError
求大佬解答