Skip to main content

A mock for the BlueZ D-Bus API

Project description

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.

  1. Start local D-Bus bus:

    dbus-daemon --session --print-address
    
  2. Set DBUS_SYSTEM_BUS_ADDRESS environment variable:

    export DBUS_SYSTEM_BUS_ADDRESS=<BUS-ADDRESS-FROM-STEP-1>
    
  3. Run BlueZoo with pre-defined adapters:

    bluezoo --auto-enable --adapter 00:11:22:33:44:55
    
  4. 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
    

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.

Project details


Download files

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

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

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

bluezoo-0.1.0-py3-none-any.whl (37.4 kB view details)

Uploaded Python 3

File details

Details for the file bluezoo-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: bluezoo-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 37.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.12.3

File hashes

Hashes for bluezoo-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 ebf2cce5d09ea16b549e3e3aa10b0b4456aff4de50fe7a7723ad72639d4bd744
MD5 17fc9a18c5c69def9326a415f719d1bb
BLAKE2b-256 c4457243d9afada994bce7e9a18b25da4848ebf0bffd88a5116f7f5192012c14

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page