Skip to content

Commit 477b3dd

Browse files
lylezhu2012nashif
authored andcommitted
Bluetooth: Classic: HFP_HF: Compatible old version AG
In current implementation, the AG with old version cannot be supported properly. Such as, if the AG is version 0.96, the AT command `AT+BRSF` should not be sent. And if the AG is no newer than version 1.5, the `Codec Negotiation` should be unsupported. Compatible old version with the following changes, Discover the AG SDP record to get the profile version and AG features. If the SDP discovery is failed, break the RFCOMM DLC connection. If the AG version is v0.96, do not send AT command `AT+BRSF`. Create SCO connection directly if the codec negotiation feature is unsupported on both side in the function `bt_hfp_hf_audio_connect()`. Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
1 parent 3f201d5 commit 477b3dd

File tree

4 files changed

+277
-63
lines changed

4 files changed

+277
-63
lines changed

include/zephyr/bluetooth/classic/hfp_hf.h

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -747,9 +747,8 @@ int bt_hfp_hf_redial(struct bt_hfp_hf *hf);
747747

748748
/** @brief Handsfree HF setup audio connection
749749
*
750-
* Setup audio conenction by sending AT+BCC.
751-
* If @kconfig{CONFIG_BT_HFP_HF_CODEC_NEG} is not enabled, the error
752-
* `-ENOTSUP` will be returned if the function called.
750+
* Setup audio conenction by sending AT+BCC if the Codec Negotiation is supported by both side.
751+
* Or, initialize the SCO audio connection directly.
753752
*
754753
* @param hf HFP HF object.
755754
*

0 commit comments

Comments
 (0)