blueretro-ble
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.
- 💾 Memory cards — back up / restore the Dreamcast VMU (standard
.bin, same as the web config and emulators) and N64 Controller Pak banks, at any MTU, resuming after link drops. Dreamcast updates also list the VMU saves and free blocks. - 🔍 Discovery helper —
discover()finds nearby BlueRetro adapters. - 🖥️ CLI —
blueretro scan / info / reboot / sleep / vmu-backup / pak-backupfor 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
blueretro vmu-backup AA:BB:CC:DD:EE:FF vmu.bin # save the Dreamcast VMU
blueretro pak-backup AA:BB:CC:DD:EE:FF 1 pak.mpk # save N64 Controller Pak bank 1
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.mdfor the full notes.
Limitations
- The adapter only accepts connections while idle — during gameplay
async_updatereturns an unavailable state. - Memory-card transfers are slow (a full VMU took ~60 s from macOS); a small MTU makes them slower still, but no longer breaks them.
Contributing
See CONTRIBUTING.md.
License
MIT © Hudson Brendon
Metadata
Release files for blueretro-ble 0.9.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| blueretro_ble-0.9.0.tar.gz | 370.9 kB | With provenance | Details for blueretro_ble-0.9.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| blueretro_ble-0.9.0-py3-none-any.whl | Python 3 | none | any | Details for blueretro_ble-0.9.0-py3-none-any.whl |
Total release size: 681.0 kB
Release files / blueretro_ble-0.9.0.tar.gz
| Download URL | blueretro_ble-0.9.0.tar.gz |
|---|---|
| Size | 370.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
41db632288df169d9d5828d082bf6dacbf297271a5001d81c5dabfde6afba3c5
|
|
BLAKE2b-256 checksum How to use checksums |
633268de4ea9ee37a32d7382c41771be21573153d6d095f323ad4cfa8c6b04b7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 25, 2026.
Transparency logRelease files / blueretro_ble-0.9.0-py3-none-any.whl
| Download URL | blueretro_ble-0.9.0-py3-none-any.whl |
|---|---|
| Size | 310.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
105e58750b5c7d9c56fa49a687f371ad0a8a74cfb55dac7ae662d5f9a2557a8a
|
|
BLAKE2b-256 checksum How to use checksums |
410b9072f86cab1f385cba059a114d1dc8715125e124e683ca40d5ed76fa4fbe
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 25, 2026.
Transparency logSecurity for blueretro-ble 0.9.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
All 2 files in this release have been uploaded with provenance metadata.
Attestation for blueretro_ble-0.9.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 25, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.