Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion nimble/host/include/host/ble_gatt.h
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,15 @@ struct ble_hs_cfg;
/*** @client. */
/** Represents a GATT error. */
struct ble_gatt_error {
/** The GATT status code indicating the type of error. */
/**
* The NimBLE host status code indicating the type of error.
*
* This value uses the NimBLE host return-code ranges. ATT errors are
* reported as BLE_HS_ATT_ERR(code), so status 0x0181 is ATT error 0x81
* (0x100 + 0x81). Application-specific ATT errors must be decoded by
* subtracting the ATT base and consulting the service or profile
* specification that defines the ATT error.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Hi,

This is not valid comment. It just exposes current implementation specific details (mask 0x100).
In Nimble error mask is used for specifying which layer trigger error and application shall not assume
any specific layer when decoding.

So I'd suggest to comment here that status is following NimBLE error codes convention described in
https://mynewt.apache.org/latest/network/ble_hs/ble_hs_return_codes.html

*/
uint16_t status;

/** The attribute handle associated with the error. */
Expand Down
Loading