扫描树莓派的信标
我尝试使用pybluez包发现错误的gatlib错误。当在RPI3中安装的gatlib再次显示相同的错误
from bluetooth.ble import DiscoveryService
service = DiscoveryService()
devices = service.discover(2)
for address, name in devices.items():
print("name: {}, address: {}".format(name, address))
程序中未找到gatlib模块。
答案 0 :(得分:0)
pip install gattlib
应该可以工作
对于python3,请使用pip3
确保已安装诸如libbluetooth-dev,pkg-config,glib-2.0,lib-boost-python-dev,libboost-thread-dev之类的依赖项。
gattlib模块中必需的依赖项:Link