Skip to content

Conversation

lylezhu2012
Copy link
Contributor

Add the function bt_hfp_hf_query_list_of_current_calls() to support users to query current call list.

Add the callback bt_hfp_hf_cb::query_call to notify the received current calls.

makeshi
makeshi previously approved these changes Sep 26, 2025
Due to the flag `BT_HFP_HF_FLAG_CLCC_PENDING` is set when receiving
the +CIEV or +CIND notification, the command `AT+CLCC` will be
pending due to the flag is not cleared.

Add a flag `BT_HFP_HF_FLAG_INITIATING` to indicate the HF
initialization is ongoing.

Add a flag `BT_HFP_HF_FLAG_QUERY_CALLS` to indicate the current calls
list needs to be queried.

Set the flag `BT_HFP_HF_FLAG_INITIATING` at the beginning of the HF
initialization. Set the flag `BT_HFP_HF_FLAG_QUERY_CALLS` instead of
setting the flag `BT_HFP_HF_FLAG_CLCC_PENDING` if the current calls
list needs to be queried and the flag `BT_HFP_HF_FLAG_INITIATING` is
set.

After the HF initialization is done, query list of the current calls
by calling the function `hf_query_current_calls()` if the flag
`BT_HFP_HF_FLAG_QUERY_CALLS` is set.

Set the flag `BT_HFP_HF_FLAG_CLCC_PENDING` if it is not set in the
function `hf_query_current_calls()`.

Signed-off-by: Lyle Zhu <[email protected]>
Add the function `bt_hfp_hf_query_list_of_current_calls()` to support
users to query current call list.

Add the callback `bt_hfp_hf_cb::query_call` to notify the received
current calls.

Signed-off-by: Lyle Zhu <[email protected]>
Add the command `query_calls` to query the current calls list.

The received current calls list will be printed in callback
`hf_query_call()`.

Signed-off-by: Lyle Zhu <[email protected]>
The current calls list should not be queried if the SLC is not
connected. Or the error `-ENOTCONN` will be returned by function
`hf_query_current_calls()`.

Check the connection status of HF before submitting a delay-able
worker. Only the SLC is established, submit the delay-able worker.

Signed-off-by: Lyle Zhu <[email protected]>
@lylezhu2012 lylezhu2012 force-pushed the classic_hfp_support_query_current_calls_list branch from 609c548 to 5252b66 Compare October 9, 2025 06:58
@lylezhu2012 lylezhu2012 requested a review from makeshi October 9, 2025 07:00
@zephyrbot zephyrbot requested a review from chengkai15 October 9, 2025 07:00
Copy link

sonarqubecloud bot commented Oct 9, 2025

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants