BlueZoo
BlueZoo is a BlueZ D-Bus API mock, designed to test applications for BlueZ integration.
Introduction
BlueZoo provides "org.bluez" D-Bus service, allowing developers to test BlueZ integration in their applications without needing actual Bluetooth hardware. It runs entirely in user space, so it can be easily integrated into automated test suites on various CI/CD pipelines.
Installation
BlueZoo is available as a Python package on PyPI and can be installed using
pip:
pip install bluezoo
Usage
By default, BlueZoo creates "org.bluez" service on the D-Bus system bus. In
order to use an isolated testing environment, it is recommended to run a local
D-Bus bus and set DBUS_SYSTEM_BUS_ADDRESS environment variable to point to
the local bus.
-
Start local D-Bus bus:
dbus-daemon --session --print-address
-
Set
DBUS_SYSTEM_BUS_ADDRESSenvironment variable:export DBUS_SYSTEM_BUS_ADDRESS=<BUS-ADDRESS-FROM-STEP-1>
-
Run BlueZoo with pre-defined adapters:
bluezoo --auto-enable --adapter 00:11:22:33:44:55
-
Run your application and test BlueZ integration. For example, you can use
bluetoothctl, which is a command-line utility provided by BlueZ, to interact with BlueZoo service:$ bluetoothctl show 00:11:22:33:44:55 Controller 00:11:22:33:44:55 (public) Name: Alligator's Android Powered: yes Discoverable: no Discovering: no
BlueZoo Manager Interface
BlueZoo provides a D-Bus interface for managing the mock service. The manager
interface is available at /org/bluezoo. It allows to dynamically create and
destroy adapters.
Remove adapter hci0:
gdbus call --system \
--dest org.bluez \
--object-path /org/bluezoo \
--method org.bluezoo.Manager1.RemoveAdapter
0
Add adapter hci0 with address 00:00:00:11:11:11:
gdbus call --system \
--dest org.bluez \
--object-path /org/bluezoo \
--method org.bluezoo.Manager1.AddAdapter
0 '00:00:00:11:11:11'
BlueZ Interfaces
| Name | Supported | Notes |
|---|---|---|
| org.bluez.Adapter1 | ✅ | |
| org.bluez.AdminPolicySet1 | - | |
| org.bluez.AdminPolicyStatus1 | - | |
| org.bluez.AdvertisementMonitorManager1 | - | |
| org.bluez.AdvertisementMonitor1 | - | |
| org.bluez.AgentManager1 | ✅ | |
| org.bluez.Agent1 | ✅ | |
| org.bluez.BatteryProviderManager1 | - | |
| org.bluez.BatteryProvider1 | - | |
| org.bluez.Battery1 | - | |
| org.bluez.Device1 | ✅ | |
| org.bluez.DeviceSet1 | - | |
| org.bluez.GattCharacteristic1 | ✅ | |
| org.bluez.GattDescriptor1 | ✅ | |
| org.bluez.GattManager1 | ✅ | |
| org.bluez.GattProfile1 | - | |
| org.bluez.GattService1 | ✅ | |
| org.bluez.Input1 | - | |
| org.bluez.LEAdvertisement1 | ✅ | |
| org.bluez.LEAdvertisingManager1 | ✅ | |
| org.bluez.MediaAssistant1 | - | |
| org.bluez.MediaControl1 | - | |
| org.bluez.MediaEndpoint1 | - | |
| org.bluez.MediaFolder1 | - | |
| org.bluez.MediaItem1 | - | |
| org.bluez.MediaPlayer1 | - | |
| org.bluez.Media1 | - | |
| org.bluez.MediaTransport1 | - | |
| org.bluez.Network1 | - | |
| org.bluez.NetworkServer1 | - | |
| org.bluez.obex.AgentManager1 | - | |
| org.bluez.obex.Agent1 | - | |
| org.bluez.obex.Client1 | - | |
| org.bluez.obex.FileTransfer1 | - | |
| org.bluez.obex.Image1 | - | |
| org.bluez.obex.MessageAccess1 | - | |
| org.bluez.obex.Message1 | - | |
| org.bluez.obex.ObjectPush1 | - | |
| org.bluez.obex.PhonebookAccess1 | - | |
| org.bluez.obex.Session1 | - | |
| org.bluez.obex.Synchronization1 | - | |
| org.bluez.obex.Transfer1 | - | |
| org.bluez.ProfileManager1 | - | |
| org.bluez.Profile1 | - |
Contributing
Contributions are welcome! Please read the CONTRIBUTING guidelines for more information.
License
This project is licensed under the GNU General Public License v2.0 - see the LICENSE file for details.
Metadata
Release files for bluezoo 1.0.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| bluezoo-1.0.2.tar.gz | 33.3 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| bluezoo-1.0.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 73.5 kB
Release files / bluezoo-1.0.2.tar.gz
| Download URL | bluezoo-1.0.2.tar.gz |
|---|---|
| Size | 33.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
bf3d7757bb6ba00310a509e25fb3b4dfdff78edbb7d6759734b87e97e2f14de7
|
|
BLAKE2b-256 checksum How to use checksums |
1d3c8cf64ef6805718b4ca774e8fa623516214e8d0d60715c7dadde4aa230d78
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
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 Sep 15, 2025.
Transparency logRelease files / bluezoo-1.0.2-py3-none-any.whl
| Download URL | bluezoo-1.0.2-py3-none-any.whl |
|---|---|
| Size | 40.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
c2bba070be644562cfe02f387f24db57e76c953b1a08847231bb5f1c8f5e0925
|
|
BLAKE2b-256 checksum How to use checksums |
3068ff389e77a1829c8dfa8f61822b032038f7f638e34346b4c4eae439df92a8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
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 Sep 15, 2025.
Transparency log