I'm trying to run a script that is using pybluez library for Ble, but when I'm running the script I got this error:
from gattlib import *
ImportError: No module named gattlib
So I tried to install the gattlib as super user with the command:
sudo pip install gattlib
on my Raspberry but I got this error:
/usr/bin/ld: cannot find -lboost_thread
collect2: error: ld returned 1 exit status
error:command 'c++' failed with exit status 1
(O.S Raspbian running on Raspberry Pi 3)
Script:
# bluetooth low energy scan
from bluetooth.ble import DiscoveryService
service = DiscoveryService()
devices = service.discover(2)
for address, name in devices.items():
print("name: {}, address: {}".format(name, address))
How can I solve my problem?