zephyrproject-rtos/zephyr

Bluetooth: VOCS: Client: Use CCC auto discover

クローズ

#81,132 opened on 2024/11/08

 (1 件のコメント) (0 件のリアクション) (2 人の担当者)C (9,144 件のフォーク)batch import
EnhancementGood first issuearea: Bluetootharea: Bluetooth Audio

Repository metrics

Stars
 (15,249 個のスター)
PR merge metrics
 (平均マージ 4d 21h) (30d で 1,000 merged PRs)

説明

Is your enhancement proposal related to a problem? Please describe. The VOCS client subscribes to the VOCS state, location and description, but it assumes that the CCC is the next characteristic by hard-coding the handle offset:

	/*
	 * TODO: Don't assume that CCC is at handle + 2;
	 * do proper discovery;
	 */
	sub_params->ccc_handle = attr->handle + 2;

Describe the solution you'd like The VOCS client should perform a proper discovery of the CCC characteristic and subscribe to it, even if it is not at handle + 2. For this the CONFIG_BT_GATT_AUTO_DISCOVER_CCC feature can be used, which is already used in most parts of LE Audio.

Ideally the use of CONFIG_BT_GATT_AUTO_DISCOVER_CCC should re-use the initial discovery parameter struct, so as not to increase memory usage.

Describe alternatives you've considered N/A

Additional context N/A

コントリビューターガイド