1777254562

This commit is contained in:
2026-04-26 19:49:22 -06:00
parent fe6e64d6db
commit 358275a882
4 changed files with 18 additions and 144 deletions
+16
View File
@@ -0,0 +1,16 @@
import asyncio
from bleak import BleakScanner, BleakError
async def main():
print("Scanning for BLE devices...")
try:
devices = await BleakScanner.discover()
print(f"Found {len(devices)} devices:")
for device in devices:
print(f"MAC Address: {device.address}, Name: {device.name}")
except BleakError as e:
print(f"Error: {e}")
print("Make sure Bluetooth is enabled and a Bluetooth adapter is present.")
if __name__ == "__main__":
asyncio.run(main())