Skip to content

add service uuids to notifications#445

Merged
qwandor merged 2 commits into
deviceplug:devfrom
MnlPhlp:master
Nov 4, 2025
Merged

add service uuids to notifications#445
qwandor merged 2 commits into
deviceplug:devfrom
MnlPhlp:master

Conversation

@MnlPhlp

@MnlPhlp MnlPhlp commented Oct 21, 2025

Copy link
Copy Markdown
Contributor

I want to support multiple characteristics with the same UUID in different services in tauri-plugin-blec.
In order to support this for subscribes, the ValueNotification has to specifiy what service caused it.
I added the values for all the integrations except Android, because I don't really know how to work with the jni code.

I can look at the android version, but I would prefer if someone with more experience in this area could do that.

The problem is I need a new release of this library with the added fields in order to release my crate with the new dependency.
If i checked correctly, there is no way to publish to crates.io with my github fork as dependency

Comment thread src/bluez/peripheral.rs Outdated
let uuid = find_characteristic_by_id(&services, id)?.uuid;
Some(ValueNotification { uuid, value })
let info = find_characteristic_by_id(&services, id.clone())?;
let service = services.iter().find(|(_, s)| s.info.id == id.service())?.0;

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rather than looping through services a second time, how about making find_characteristic_by_id return the ServiceInfo as well as the characteristic?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I changed it to return a tuple with characteristic and service info.

@qwandor qwandor merged commit 6e5120e into deviceplug:dev Nov 4, 2025
5 checks passed
@MnlPhlp

MnlPhlp commented Dec 3, 2025

Copy link
Copy Markdown
Contributor Author

Are there any plans on when you will do the next release?
Sadly I can't do a new release of the tauri plugin while depending on the git branch.
Cargo requires a published version for all dependencies to publish my crate.

Or do you know any other way I could publish an update?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet