-
Notifications
You must be signed in to change notification settings - Fork 35
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
Breaking changes: persistent dbus connections and configurable timeouts #21
Conversation
+1 on acquire_notify functionality. Notification management is fundamental for any BLE application |
Hi there! Wow, great job! First of all, I'm not working on this project anymore, so it's really great to see that it's not dead yet :). My only request is that: can you make this into maybe 4-5 (or even more if you see that is necessary) meaningful commits? And also move the revision bump into a separate commit. I hope that's not too much to ask, because I really love to merge this PR. |
Do you want to change the ownership of this project? We are building an
embedded application for the communication between IoT devices on top of it
…On Wed, Oct 24, 2018, 19:33 Attila Dusnoki ***@***.***> wrote:
Hi there!
Wow, great job!
First of all, I'm not working on this project anymore, so it's really
great to see that it's not dead yet :).
And I can't really try it to see that everything is OK, so I have to trust
you on that one.
But I went through the code and it looks fine to me 👍.
My only request is that: can you make this into maybe 4-5 (or even more if
you see that is necessary) meaningful commits? And also move the revision
bump into a separate commit.
I hope that's not too much to ask, because I really love to merge this PR.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#21 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AB2LTMj6o5izS97bpKmthE7YG0KWAOp2ks5uoJZQgaJpZM4X2OF7>
.
|
This repository is part of a larger ecosystem for Servo. And I'm not the owner of this project anymore, it's under @szeged now. I'm only maintaining it when necessary. |
use BluetoothSession for OBEX
BluetoothDiscoverySession now uses a connection from BluetoothSession filter only signals
moved BluetoothEvent to a separate module fixed examples/
use a longer timeout for Adapter::set_powered() increase the write_value timeout to 10 seconds
I did the rebase, i don't have a version bump commit. is it good enough? |
Yes, thanks. |
can you please publish a new version to crates.io ? |
It's already published as 0.4.0. |
this PR includes some changes and improvements that we needed for using the crate;
BluetoothSession is used as a persistent connection to dbus, instead of opening a different connection for each method call, the session can be initialized with an optional dbus path, which is added as
add_match
to the dbus connection (useful for filtering messages that are received viaincoming()
an example usage is inexamples/test5.rs
the timeout for dbus method calls is passed as an argument, most commands are left with 1000 but some (like
connect()
) have it exposed all the way to make it controllable by the user.BluetoothEvent is an enum for BlueZ events,
BluetoothEvent::from()
can be used to parse incoming messages into BluetoothEvent. the events that we needed are currently in the enum. usage example is also inexamples/test5.rs
implemented some additional functionality -
BluetoothGATTCharacteristic::acquire_write()
andBluetoothGATTCharacteristic::acquire_notify()
(inspired by code from the somewhere in the repository's issues) andBluetoothDiscoverySession::set_discovery_filter()