being a tumor and vibbe coding this shit 😔

This commit is contained in:
2026-04-26 19:53:04 -06:00
parent 358275a882
commit e24fa2b811
2 changed files with 8 additions and 2 deletions
+8 -2
View File
@@ -1,13 +1,19 @@
import asyncio
from bleak import BleakScanner, BleakError
VENDOR_PREFIXES = ['00:25:DF', '00:58:28', '00:C0:D4', '84:70:03']
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}")
filtered_devices = [device for device in devices if any(device.address.upper().startswith(prefix) for prefix in VENDOR_PREFIXES)]
if filtered_devices:
for device in filtered_devices:
print(f"MAC Address: {device.address}, Name: {device.name}")
else:
print("No devices found with the specified vendor prefixes.")
except BleakError as e:
print(f"Error: {e}")
print("Make sure Bluetooth is enabled and a Bluetooth adapter is present.")