zephyrproject-rtos/zephyr

Bluetooth: VOCS: Client: Use CCC auto discover

Open

#81,132 opened on 2024年11月8日

GitHub で見る
 (0 comments) (0 reactions) (1 assignee)C (15,249 stars) (9,144 forks)batch import
EnhancementGood first issuearea: Bluetootharea: Bluetooth Audio

説明

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

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