Skip to content

Instantly share code, notes, and snippets.

@geowa4
Created March 14, 2016 04:05
Show Gist options
  • Save geowa4/d9faa5263799ec61a23b to your computer and use it in GitHub Desktop.
Save geowa4/d9faa5263799ec61a23b to your computer and use it in GitHub Desktop.
Discover Bluetooth addresses.
import bluetooth
nearby_devices = bluetooth.discover_devices(
duration=8, lookup_names=True, flush_cache=True, lookup_class=False
)
for addr, name in nearby_devices:
print("%s - %s" % (addr, name))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment