PyBluez-Win10模块。
我只想获取当前 已连接的设备。我不需要以前连接的设备。
from bluetooth import *
nearby_devices = discover_devices(lookup_names = True)
print ("found %d devices" % len(nearby_devices))
for name, addr in nearby_devices:
print (" %s - %s" % (addr, name))
当前结果:
found 9 devices
- hidden
GT-I9300 - hidden
tadas - hidden
OBDII - hidden
Tadas Kuzma (GT-I9301I - hidden
Makeblock - hidden
JBL T450BT - hidden
Redmi Aivaras - hidden
EDIFIER Exclaim Connect - hidden
我隐藏了MAC地址。