Skip to content

Instantly share code, notes, and snippets.

@DanielTimLee
Created March 5, 2017 07:51
Show Gist options
  • Save DanielTimLee/dee489e64853c2cfb7d61845686ab38a to your computer and use it in GitHub Desktop.
Save DanielTimLee/dee489e64853c2cfb7d61845686ab38a to your computer and use it in GitHub Desktop.
ble_scan.py
# 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))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment