fix
This commit is contained in:
9
test.py
9
test.py
@@ -4,6 +4,15 @@ import asyncio
|
|||||||
|
|
||||||
async def main():
|
async def main():
|
||||||
devices = await bleak.BleakScanner.discover()
|
devices = await bleak.BleakScanner.discover()
|
||||||
|
for device in devices:
|
||||||
|
print()
|
||||||
|
print(f"Name: {device.name}")
|
||||||
|
print(f"Address: {device.address}")
|
||||||
|
print(f"Details: {device.details}")
|
||||||
|
print(f"Metadata: {device.metadata}")
|
||||||
|
print(f"RSSI: {device.rssi}")
|
||||||
|
|
||||||
|
for device in devices:
|
||||||
try:
|
try:
|
||||||
this_device = await BleakScanner.find_device_by_address(device.address, timeout=20)
|
this_device = await BleakScanner.find_device_by_address(device.address, timeout=20)
|
||||||
async with BleakClient(this_device) as client:
|
async with BleakClient(this_device) as client:
|
||||||
|
|||||||
Reference in New Issue
Block a user