Skip to content

Instantly share code, notes, and snippets.

@ochilab
Created June 17, 2021 05:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ochilab/bd294205f4f7a257b190ddbed519d70f to your computer and use it in GitHub Desktop.
Save ochilab/bd294205f4f7a257b190ddbed519d70f to your computer and use it in GitHub Desktop.
bleakライブラリでBLE端末を発見する
import asyncio
from bleak import discover
import time
async def run():
while True:
devices = await discover()
for d in devices:
print(d.address,d.metadata,d.name,d.rssi)
loop = asyncio.get_event_loop()
loop.run_until_complete(run3())
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment