Skip to content

Instantly share code, notes, and snippets.

@dlech
Created October 26, 2025 01:27
Show Gist options
  • Select an option

  • Save dlech/fe887861c287bdf2d3e62ed21d319fce to your computer and use it in GitHub Desktop.

Select an option

Save dlech/fe887861c287bdf2d3e62ed21d319fce to your computer and use it in GitHub Desktop.
LEGO Education Science BLE reveng
# SPDX-License-Identifier: MIT
import asyncio
from bleak import BleakScanner
from bleak.uuids import normalize_uuid_16
LEGO_SHORT_UUID = normalize_uuid_16(0xFD02)
async def main():
async with BleakScanner() as scanner:
async for _device, data in scanner.advertisement_data():
service_data = data.service_data.get(LEGO_SHORT_UUID)
if service_data is None:
continue
print(service_data.hex(":"))
if __name__ == "__main__":
asyncio.run(main())
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment