Skip to content

Bluetooth: GATT: Clarify start and end handles #88234

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

Merged
merged 1 commit into from
Apr 23, 2025

Conversation

omkar3141
Copy link
Collaborator

Clarifies what does start_handle and end_handle means in the GATT API.

@omkar3141 omkar3141 force-pushed the omku/gatt_doc_update branch from 7f69800 to 53e6734 Compare April 10, 2025 10:59
@omkar3141 omkar3141 requested a review from Thalley April 10, 2025 11:14
Copy link
Collaborator

@Thalley Thalley left a comment

Choose a reason for hiding this comment

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

I think we should be careful to not tell how to use this in specific cases, when they can be use in many cases. I think some of the documentation added in this PR attempts to tell users how/when to call this function but with using only a very small subset of how/when.

@omkar3141 omkar3141 force-pushed the omku/gatt_doc_update branch from 53e6734 to 531ef11 Compare April 10, 2025 11:52
@omkar3141 omkar3141 requested a review from Thalley April 10, 2025 11:52
Comment on lines 1796 to 1800
* point of the range over which this read should
* be performed. For example, this could be set to
* @ref BT_ATT_FIRST_ATTRIBUTE_HANDLE to set the
* starting point of the range at the beginning of
* the GATT database, or to the starting handle of a
Copy link
Collaborator

Choose a reason for hiding this comment

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

It generally also seems like you are using a column width of 80 instead of 100. Suggest to use 100 as that is our maximum in Zephyr

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Again, sticking to existing pattern in gatt.h. Do you insist to change this?

Copy link
Collaborator

Choose a reason for hiding this comment

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

Column width is not really a pattern IMO :D There are many places in gatt.h that uses column width >80, so I suggest we continue with that

@Thalley
Copy link
Collaborator

Thalley commented Apr 10, 2025

The commit message header should also be updated from Bluetooth:Doc: Clarify GATT API Bluetooth: GATT: Clarify start and end handles to be more precise (and the doc infix doesn't really match anything).

@omkar3141 omkar3141 force-pushed the omku/gatt_doc_update branch from 531ef11 to 6f23ab1 Compare April 13, 2025 13:57
@omkar3141 omkar3141 changed the title Bluetooth:Doc: Clarify GATT API Bluetooth:GATT: Clarify start and end handles Apr 13, 2025
@omkar3141 omkar3141 force-pushed the omku/gatt_doc_update branch from 6f23ab1 to e5f324b Compare April 14, 2025 16:12
@omkar3141 omkar3141 requested a review from KyraLengfeld April 14, 2025 16:13
KyraLengfeld
KyraLengfeld previously approved these changes Apr 15, 2025
@jhedberg jhedberg changed the title Bluetooth:GATT: Clarify start and end handles Bluetooth: GATT: Clarify start and end handles Apr 15, 2025
@jhedberg
Copy link
Member

@omkar3141 there are some merge conflicts that need to be fixed

jhedberg
jhedberg previously approved these changes Apr 22, 2025
Thalley
Thalley previously approved these changes Apr 22, 2025
@omkar3141 omkar3141 dismissed stale reviews from Thalley and jhedberg via 4f5cc7a April 23, 2025 08:35
@omkar3141 omkar3141 force-pushed the omku/gatt_doc_update branch from 004b447 to 4f5cc7a Compare April 23, 2025 08:35
@omkar3141 omkar3141 force-pushed the omku/gatt_doc_update branch from 4f5cc7a to 178e125 Compare April 23, 2025 08:37
@Thalley Thalley requested a review from Copilot April 23, 2025 08:46
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR clarifies the documentation for the GATT API by updating the parameter descriptions for start and end handles. The changes update Doxygen comments both for attribute iteration functions and discovery/read parameters to improve clarity.

  • Updated function comments to explicitly refer to "Starting attribute handle" and "Ending attribute handle".
  • Enhanced descriptions in the bt_gatt_discover_params and bt_gatt_read_params structures.
  • Maintained consistency in terminology across the API documentation.

Clarifies what does start_handle and end_handle means in the GATT API.

Signed-off-by: Omkar Kulkarni <[email protected]>
@omkar3141 omkar3141 force-pushed the omku/gatt_doc_update branch from 178e125 to 858633e Compare April 23, 2025 10:10
@omkar3141 omkar3141 requested a review from Thalley April 23, 2025 10:11
@kartben kartben merged commit 4680590 into zephyrproject-rtos:main Apr 23, 2025
24 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: Bluetooth Host Bluetooth Host (excluding BR/EDR) area: Bluetooth
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants