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

BLE examples replicate a UUID for both service and a characteristic #2583

Open
akauppi opened this issue Nov 21, 2024 · 4 comments
Open

BLE examples replicate a UUID for both service and a characteristic #2583

akauppi opened this issue Nov 21, 2024 · 4 comments
Labels
bug Something isn't working

Comments

@akauppi
Copy link
Contributor

akauppi commented Nov 21, 2024

Bug description

The BLE examples having the same UUID for both service and one characteristic seems like a mistake.

Check these lines:

        gatt!([service {
            uuid: "937312e0-2354-11eb-9f10-fbc30a62cf38",
            characteristics: [
                characteristic {
                    uuid: "937312e0-2354-11eb-9f10-fbc30a62cf38",
                    read: rf,
                    write: wf,
                },

This works just fine - I don't think the id's of the characteristics vs. their enclosing service really matter - but logically there shouldn't be any connection between the two?

The other characteristics are varied from the same theme, by changing one character. I would suggest to do the same here.

Background about the selection of UUIDs in a StackOverflow answer.

To Reproduce

Observe the links above.

Expected behavior

The BLE samples not only are functional, but also show "intention", i.e. lead the reader in the right direction.

Environment

Does not matter.

@akauppi akauppi added bug Something isn't working status:needs-attention This should be prioritized labels Nov 21, 2024
@bjoernQ
Copy link
Contributor

bjoernQ commented Nov 22, 2024

We plan to overhaul all the examples including the BLE ones. e.g. something mimicking a real-world device (e.g. a BLE temperature sensor or a HID keyboard)

@akauppi
Copy link
Contributor Author

akauppi commented Nov 22, 2024

Sounds great! I'll keep this ticket open until then, and remove once the new stuff is out. No rush.

@akauppi
Copy link
Contributor Author

akauppi commented Nov 22, 2024

One note on the examples - since the gatt! shows up in the code snippet. Rust Rover IDE has currently a problem with the bleps dependency, because it's not a published package (and features are used). Not your fault, but... since you plan to revise the examples, it's appreciated if outside deps would be ... less ad-hoc, I guess.

end of tangential :)

@MabezDev MabezDev removed the status:needs-attention This should be prioritized label Nov 22, 2024
@lure23
Copy link
Contributor

lure23 commented Nov 23, 2024

For comparison, Nordic mentions this "LED Button Service" in their BLE tutorial: https://docs.nordicsemi.com/bundle/ncs-latest/page/nrf/libraries/bluetooth/services/lbs.html#lbs-readme

It has a service UUID and two characteristics, whose UUIDs are derived from that (differ by one char).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: Todo
Development

No branches or pull requests

4 participants