-
Notifications
You must be signed in to change notification settings - Fork 8k
Bluetooth: Classic: HFP_HF: Fix AT+CLCC
can not be sent issue
#96430
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Bluetooth: Classic: HFP_HF: Fix AT+CLCC
can not be sent issue
#96430
Conversation
We actually need a interface for the upper layer to query current calls. It seems like most of the APIs keeps at stack level (similar as Android BTIF/BTA). But for call informations, they become high level APIs (similar as Android AIDL). Indeed it works, but would be a little be hard to migrate to (co-work with) other system. |
Yes. I think we can improve it later. |
It is created here #96564 |
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]>
9c6d618
to
e172a06
Compare
|
Due to the flag
BT_HFP_HF_FLAG_CLCC_PENDING
is set when receiving the +CIEV or +CIND notification, the commandAT+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 flagBT_HFP_HF_FLAG_QUERY_CALLS
instead of setting the flagBT_HFP_HF_FLAG_CLCC_PENDING
if the current calls list needs to be queried and the flagBT_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 flagBT_HFP_HF_FLAG_QUERY_CALLS
is set.Set the flag
BT_HFP_HF_FLAG_CLCC_PENDING
if it is not set in the functionhf_query_current_calls()
.