Skip to main content

BlueRetro

blueretro-ble

CI PyPI Python License: MIT

Talk to a BlueRetro retro-console Bluetooth adapter over Bluetooth LE from Python — read its status and current game, read and change the global/output config, and reboot or deep-sleep it.

This library powers the BlueRetro Home Assistant integration, but works standalone in any async Python project (or straight from the command line).

Features

  • 🔌 Async BLE control built on bleak + bleak-retry-connector — works on Linux, macOS, and Windows.
  • 📊 Read device state — firmware, ABI version, BD address, current game id + resolved game name, and config source.
  • ⚙️ Read & write config — system, multitap, pairing mode and memory-card bank (global config), plus per-output device mode and accessory.
  • 🔁 Commands — reboot, deep sleep, and factory reset.
  • 🔍 Discovery helperdiscover() finds nearby BlueRetro adapters.
  • 🖥️ CLIblueretro scan / info / reboot / sleep for quick testing.
  • 🏷️ Bundled game database — resolves a Game ID to a human-readable name.

Requirements

  • Python 3.11 or newer.
  • A Bluetooth LE adapter (built-in or USB).
  • A BlueRetro adapter, reachable only while idle (no controller connected).

Installation

pip install blueretro-ble

CLI usage

blueretro scan                          # find nearby adapters
blueretro info AA:BB:CC:DD:EE:FF        # connect and print the full state
blueretro reboot AA:BB:CC:DD:EE:FF      # reboot the adapter
blueretro sleep AA:BB:CC:DD:EE:FF       # put the adapter into deep sleep

Library usage

import asyncio
from blueretro_ble import BlueRetroDevice, discover

async def main():
    devices = await discover()
    device = BlueRetroDevice()
    state = await device.async_update(devices[0])
    print(state.fw_version, state.system, state.game_name)

    # change the emulated accessory on output port 1
    await device.async_set_output_config(devices[0], 0, accessory="Memory")

asyncio.run(main())

BlueRetroDevice methods accept a bleak BLEDevice (e.g. from Home Assistant's shared scanner or an ESPHome Bluetooth proxy). async_update connects, reads everything, always disconnects, and never raises — on failure it returns a BlueRetroState(available=False).

How it works

BlueRetro exposes a GATT service whose characteristics carry the configuration and a command channel; blueretro_ble reads/decodes them and sends 1-byte commands.

  • Service UUID: 56830f56-5180-fab0-314b-2fa176799a00
  • The configuration is only reachable while the adapter is idle (no controller paired).
  • The protocol is reverse-engineered from the official BlueRetroWebCfg. See HARDWARE.md for the full notes.

Limitations

  • The adapter only accepts connections while idle — during gameplay async_update returns an unavailable state.
  • Dreamcast VMU (memory card) transfer needs a large BLE MTU; over stacks stuck at MTU 23 it is unreliable — use the official web config for VMU backup/restore.

Contributing

See CONTRIBUTING.md.

License

MIT © Hudson Brendon

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

blueretro_ble-0.8.0.tar.gz (365.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

blueretro_ble-0.8.0-py3-none-any.whl (307.1 kB view details)

Uploaded Python 3

File details

Details for the file blueretro_ble-0.8.0.tar.gz.

File metadata

  • Download URL: blueretro_ble-0.8.0.tar.gz
  • Upload date:
  • Size: 365.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for blueretro_ble-0.8.0.tar.gz
Algorithm Hash digest
SHA256 255d208a22610065dbad3bb97f02668fa87ea4a30d55a6f76a6318296b06dfe6
MD5 0610538401becefecfbe695fb4c0e85c
BLAKE2b-256 db6a0ad70ff303ba0bfb132620f4140951ea8fd1cf99c1e048c6e3d8870cef57

See more details on using hashes here.

Provenance

The following attestation bundles were made for blueretro_ble-0.8.0.tar.gz:

Publisher: publish.yml on hudsonbrendon/blueretro-ble

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file blueretro_ble-0.8.0-py3-none-any.whl.

File metadata

  • Download URL: blueretro_ble-0.8.0-py3-none-any.whl
  • Upload date:
  • Size: 307.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for blueretro_ble-0.8.0-py3-none-any.whl
Algorithm Hash digest
SHA256 f17484e452056c45938f04127adfda613f602bcf720aa9ac16ff5a00e243c833
MD5 ac8bbb37afe94041913ea773358b9d19
BLAKE2b-256 d8ad79350c1a5c8ab078bc1692633af946f1adeedbbe2c2f61ac7264dc6f0f7c

See more details on using hashes here.

Provenance

The following attestation bundles were made for blueretro_ble-0.8.0-py3-none-any.whl:

Publisher: publish.yml on hudsonbrendon/blueretro-ble

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

This release

0.8.0 This release

2 files

0.7.0

2 files

0.5.0

2 files

0.4.0

2 files

0.3.1

2 files

0.3.0

2 files

0.2.0

2 files

0.1.2

2 files

0.1.1

2 files

0.1.0

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page