Skip to content

Conversation

@expliyh
Copy link
Contributor

@expliyh expliyh commented Nov 27, 2025

No description provided.

…ponse.

bug: v/78002

Report call struct pointer when CLCC response to allow the upper layer to match the call in the response with the pointer provided in the callback.

Signed-off-by: YuhengLi <[email protected]>
bug: v/78002

Rootcause: The CLCC API does not report when it finishes, app cannot know whether the CLCC procedure has ended.

Signed-off-by: liyuheng <[email protected]>
…C_NEG is enabled

bug: v/74979

Rootcause: bcs_handle call bt_hfp_hf_set_codecs and bt_hfp_hf_select_codec without using new Z_API marco.
Signed-off-by: YuhengLi <[email protected]>
@expliyh expliyh requested a review from hyson710 as a code owner November 27, 2025 07:49
@expliyh expliyh force-pushed the zblue-hfp-batch branch 2 times, most recently from 03ee85f to c6779d4 Compare November 27, 2025 08:49
/** Vendor specific / custom AT command callback
*
* If this callback is provided it will be called whenever an AT command
* is received from the HF that is not recognized and handled by the
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

and -> or

* the CMEE setting.
* - ret == 0: The command was handled successfully and the stack will
* send the standard "OK" final result code.
* - ret > 0 : The application is responsible for sending all responses,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this one be a ret = -EINPROGRESS?

/** @brief Vendor specific command callback
*
* If this callback is provided it will be called whenever the
* vendor specific command is received from AG.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How do we distinguish "vendor specific" result codes?
Is it any result codes that are not recognized?
Or it is the result codes that are received between bt_hfp_hf_send_vendor and a final OK?

Try to clarify this in the document.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

BTW, command -> result code

* @param hf HFP HF object.
* @param response Vendor specific response string.
*/
void (*vendor_specific)(struct bt_hfp_hf *hf, const char *response);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

response -> rsp

if ((err == -ENOEXEC) && bt_ag && bt_ag->vendor_at_cmd) {
size_t copy_len;

copy_len = MIN(len, sizeof(ag->buffer) - 1);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Check the length and print an error if it exceeds the buffer size.
Do not truncate it and trigger the callback as if nothing happened.

size_t copy_len;

copy_len = MIN(len, sizeof(ag->buffer) - 1);
memcpy(ag->buffer, data, copy_len);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use snprintf to add this \0

}

err = bt_ag->vendor_at_cmd(ag, ag->buffer);
if (err > 0) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove this, use -EINPROGRESS

bug: v/78306

Rootcause: Add sendvendor API to send vendor-specific AT commands.

Signed-off-by: liyuheng <[email protected]>
bug: v/79377

Rootcause: Add vendor_at_cmd callback and bt_hfp_ag_send_vendor API  to recieve and send vendor-specific AT commands.

Signed-off-by: liyuheng [email protected]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants