Skip to content

nimble/host: Add support for storing client supported features values#2114

Open
piotrnarajowski wants to merge 7 commits into
apache:masterfrom
piotrnarajowski:store_cl_sup_feat
Open

nimble/host: Add support for storing client supported features values#2114
piotrnarajowski wants to merge 7 commits into
apache:masterfrom
piotrnarajowski:store_cl_sup_feat

Conversation

@piotrnarajowski

@piotrnarajowski piotrnarajowski commented Aug 26, 2025

Copy link
Copy Markdown
Contributor

Implements the core mechanism for storing and maintaining Client Supported Features for peers with a trusted relationship. This successfully resolves Host qualification test case GATT/SR/GAS/BV-04-C.

Alongside the core stack changes, storage layer has been extended with a new object type, and a comprehensive unit test suite (ble_gatts_cl_sup_feat_suite) has been added

@github-actions github-actions Bot added host size/M Medium PR labels Aug 26, 2025
@github-actions github-actions Bot added the size/L Large PR label Aug 26, 2025
@piotrnarajowski piotrnarajowski marked this pull request as ready for review August 26, 2025 12:14
@piotrnarajowski piotrnarajowski changed the title nimble/host: Add support for storing client supported features values. nimble/host: Add support for storing client supported features values Aug 26, 2025
@piotrnarajowski piotrnarajowski marked this pull request as draft August 26, 2025 13:13
@piotrnarajowski

Copy link
Copy Markdown
Contributor Author

#AutoPTS run mynewt GATT/SR/GAS/BV-04-C

@codecoup-tester

Copy link
Copy Markdown

Scheduled PR #2114 (comment), board: nrf52, estimated start time: 15:17:06, test case count: 1, estimated duration: 0:11:01

Test cases to be runGATT/SR/GAS/BV-04-C

@codecoup-tester

Copy link
Copy Markdown

AutoPTS Bot results:
No failed test found.

Successful tests (1)GATT GATT/SR/GAS/BV-04-C PASS

@piotrnarajowski piotrnarajowski marked this pull request as ready for review August 27, 2025 07:44
@piotrnarajowski

Copy link
Copy Markdown
Contributor Author

@andrzej-kaczmarek PTAL and enable workflows

#endif

static int
ble_store_ram_delete_cl_sup_feat(const struct ble_store_key_cl_sup_feat

Check notice

Code scanning / CodeQL

Unused static function

Static function ble_store_ram_delete_cl_sup_feat is unreachable
}

static int
ble_store_ram_read_cl_sup_feat(const struct ble_store_key_cl_sup_feat

Check notice

Code scanning / CodeQL

Unused static function

Static function ble_store_ram_read_cl_sup_feat is unreachable
}

static int
ble_store_ram_write_cl_sup(const struct ble_store_value_cl_sup_feat

Check notice

Code scanning / CodeQL

Unused static function

Static function ble_store_ram_write_cl_sup is unreachable
@piotrnarajowski piotrnarajowski force-pushed the store_cl_sup_feat branch 2 times, most recently from ad2f8cd to 3c6f1ab Compare September 3, 2025 09:42
@piotrnarajowski

Copy link
Copy Markdown
Contributor Author

Fixed coding style issues and updated ble_gatts_peer_cl_sup_feat_update function. Added check for disabling already enabled features for bonded clients

Comment thread nimble/host/include/host/ble_store.h Outdated

#include <inttypes.h>
#include "nimble/ble.h"
#include "../../host/src/ble_gatt_priv.h"

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.

this needs other solution (eg. move declarations for public headers if now used in API)
we should not include private headers in public headers...

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.

moved to ble_gatt.h

@piotrnarajowski piotrnarajowski marked this pull request as draft April 24, 2026 11:56
@piotrnarajowski piotrnarajowski marked this pull request as ready for review May 25, 2026 12:59
@piotrnarajowski piotrnarajowski marked this pull request as draft May 27, 2026 10:03
@piotrnarajowski piotrnarajowski marked this pull request as ready for review June 2, 2026 14:42
@piotrnarajowski

Copy link
Copy Markdown
Contributor Author

@MariuszSkamra PTAL

@piotrnarajowski

Copy link
Copy Markdown
Contributor Author

#AutoPTS run mynewt GATT/SR/GAS/BV-04-C

@codecoup-tester

Copy link
Copy Markdown

Scheduled PR #2114 (comment), board: nrf52, estimated start time: 15:27:54, test case count: 1, estimated duration: 0:10:57

Test cases to be runGATT/SR/GAS/BV-04-C

@codecoup-tester

Copy link
Copy Markdown

AutoPTS Bot results:
No failed test found.

Successful tests (1)GATT GATT/SR/GAS/BV-04-C PASS

Add support for BLE_STORE_OBJ_TYPE_PEER_CL_SUP_FEAT. This is used
for storing values of Client Supported Features for clients with a
trusted relationship.
This adds support for storing client supported features for
clients with a trusted relationship. Fixes Host qualification test
case GATT/SR/GAS/BV-04-C
Extend storage unit tests to cover new object type PEER_CL_SUP_FEAT
Fix code style in ble_store.h
Moves 'BLE_GATT_CHR_CLI_SUP_FEAT_SZ' from the private header to the
public ble_gatt.h header.
Introduce a comprehensive unit test suite to validate the persistance,
restoration, and specification compliance of the Client Supported
Features characteristic values across peer bonding lifecycles.
Update keystore commands to handle Client Supported Features
storage type object.
@piotrnarajowski

piotrnarajowski commented Jul 1, 2026

Copy link
Copy Markdown
Contributor Author

Recent changes introduce Btshell keystore methods update that allows to see if Client Supported Features values has been stored properly for client with trusted relationship

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.

4 participants