Skip to content

Instantly share code, notes, and snippets.

@yasudacloud
Created July 8, 2025 08:35
Show Gist options
  • Select an option

  • Save yasudacloud/9aa5206c65e49fb461cad53f2319b3ba to your computer and use it in GitHub Desktop.

Select an option

Save yasudacloud/9aa5206c65e49fb461cad53f2319b3ba to your computer and use it in GitHub Desktop.
import asyncio
from bleak import BleakScanner
service_uuid = "0000fd81-0000-1000-8000-00805f9b34fb"
async def main():
devices = await BleakScanner.discover(
return_adv=True,
service_uuids=[service_uuid],
)
for device, ad in devices.values():
m_data = ad.manufacturer_data.get(0x055A)
if m_data is None:
raise RuntimeError("Manufacturer data for device not found.")
print("-- Manufacturer data --")
print(m_data)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment