Skip to content

host: document GATT error status encoding#2252

Open
Old-Ding wants to merge 1 commit into
apache:masterfrom
Old-Ding:codex/gatt-error-status-doc
Open

host: document GATT error status encoding#2252
Old-Ding wants to merge 1 commit into
apache:masterfrom
Old-Ding:codex/gatt-error-status-doc

Conversation

@Old-Ding

@Old-Ding Old-Ding commented Jul 1, 2026

Copy link
Copy Markdown

Summary

  • Clarify that ble_gatt_error.status uses NimBLE host return-code ranges, not raw ATT error values.
  • Document ATT error encoding with BLE_HS_ATT_ERR(code), including 0x0181 = 0x100 + 0x81.
  • Note that application-specific ATT errors are defined by the relevant service or profile specification after removing the ATT base.

Closes #1827

Testing

  • git diff --check origin/master...HEAD
  • Not run: python .github/check_doxygen.py HEAD origin/master (doxygen is not installed locally)
  • Not run: local clang-format check (clang-format is not installed locally)

Clarify that ble_gatt_error.status uses NimBLE host return-code
ranges instead of raw ATT error values.

This helps callers decode application-specific ATT errors such as
0x0181 by first removing the ATT base.
@Old-Ding Old-Ding marked this pull request as ready for review July 1, 2026 05:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Error status 0x0181 sent back in BLE write call-back. What does it mean?

2 participants