-
Notifications
You must be signed in to change notification settings - Fork 21
Zblue hfp batch #118
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: dev
Are you sure you want to change the base?
Zblue hfp batch #118
Conversation
…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]>
03ee85f to
c6779d4
Compare
| /** 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 |
There was a problem hiding this comment.
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, |
There was a problem hiding this comment.
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. |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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); |
There was a problem hiding this comment.
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); |
There was a problem hiding this comment.
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); |
There was a problem hiding this comment.
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) { |
There was a problem hiding this comment.
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]
c6779d4 to
bfb53f8
Compare
No description provided.