[英]Scanning for Nearby BLE Devices python program
scanning a beacon for raspberry pi 扫描覆盆子pi的灯塔
i have tried with pybluez package it found error that gatlib missing.when gatlib installed in RPI3 it again shows same error 我试过用pybluez包它发现gatlib丢失的错误。当gatlib安装在RPI3中时它再次显示同样的错误
from bluetooth.ble import DiscoveryService
service = DiscoveryService()
devices = service.discover(2)
for address, name in devices.items():
print("name: {}, address: {}".format(name, address))
No gatlib module found in the program.
程序中找不到gatlib模块。
pip install gattlib
should work pip install gattlib
应该工作
For python3, use pip3 对于python3,请使用pip3
Make sure dependencies such as libbluetooth-dev,pkg-config,glib-2.0,lib-boost-python-dev,libboost-thread-dev are installed. 确保安装了依赖项,例如libbluetooth-dev,pkg-config,glib-2.0,lib-boost-python-dev,libboost-thread-dev。
Required dependencies in gattlib module: Link gattlib模块中所需的依赖项: 链接
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.