Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a disconnect callback for BlueZ #85

Closed

Conversation

arthur-proglove
Copy link
Contributor

This tries to fix issue #82 for BlueZ implementation only.
Other implementations (Core Bluetooth and .NET) will fail with a
NotImplementedError exception.

The disconnect event is found in the DBus PropChanged:

path: /org/bluez/hci0/dev_XX_XX_XX_XX_XX_XX, domain: org.bluez.Device1, body: {'ServicesResolved': False, 'Connected': False}

The callback will be called only on unsolicited disconnect event from
peer. An initiated disconnect from the host will not call it.

The callback will be called only on unsolicited disconnect event from
peer. An initiated disconnect from the host will not call it.

Other implementations (Core Bluetooth and .NET) will fail with a
NotImplementedError exception.
@arthur-proglove arthur-proglove marked this pull request as ready for review July 10, 2019 12:41
@arthur-proglove
Copy link
Contributor Author

I am not an expert of async and await usage.
How can we call self._bus.delMatch('PropChanged') in the _properties_changed_callback routine to act the same as the disconnect routine?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant