doc: поправил зависимости и расписание
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
import asyncio
|
||||
|
||||
from bleak import BleakScanner
|
||||
|
||||
|
||||
async def main():
|
||||
print("Scanning for 20 seconds...")
|
||||
|
||||
devices = await BleakScanner.discover(
|
||||
timeout=20.0,
|
||||
return_adv=True,
|
||||
)
|
||||
|
||||
print()
|
||||
print(f"Found: {len(devices)} devices")
|
||||
print()
|
||||
|
||||
for address, (device, adv) in devices.items():
|
||||
print("ADDRESS:", address)
|
||||
print("NAME:", device.name)
|
||||
print("RSSI:", adv.rssi)
|
||||
print("UUIDS:", adv.service_uuids)
|
||||
print("SERVICE DATA:", adv.service_data)
|
||||
print("-" * 60)
|
||||
|
||||
|
||||
asyncio.run(main())
|
||||
Reference in New Issue
Block a user