题目:BT carkit , missing conference options
[all; 100%; Xian Xiaohong]_[共同cell]_BT carkit
Pre: BT connect with carkit[MB BLUETOOTH]; insert 3 way calling card
Occur Process: on call conversation -> outgoing second call by carkit -> after it , make 3 way calling by carkit
Occur State: haven’t options “conference”
分析问题:
查看log:
打开hci log,有:
与普通蓝牙耳机hci log对比,前半部分并无异常。留意到AT+CHLD=?和+CHLD:指令,查阅HFP的SPCE得知:
AT+CHLD=? :
The test command AT+CHLD=? may be used for retrieving information about the call hold and multiparty services available in the AG
+CHLD:0
,1,2,3,4:
0 = Releases all held calls or sets User Determined User Busy (UDUB) for a waiting call.
1 = Releases all active calls (if any exist) and accepts the other (held or waiting) call.
2 = Places all active calls (if any exist) on hold and accepts the other (held or waiting) call.
3 = Adds a held call to the conversation.
4 = Connects the two calls and disconnects the subscriber from both calls (Explicit Call Transfer). Support for this value and its associated functionality is optional for the HF.
就是说HF端通过AT+CHLD?指令向AG查询三方通话支持的功能(合并通话是其中一种),AG端回复数字组合而成的功能列表。
hci log中的“+CHLD:(0,1,2)”缺少“3(Adds a held call to the conversation. )”,问题就在这里。
分析代码
当rfcomm连接回传数据时,以下方法会被触发:
根据cmd的类型进入如下处理分支:
其中bta_ag_send_result的功能为发送AT指令,指令内容为p_bta_ag_cfg->chld_val,其值为:
BTA_AG_CHLD_VAL的值为:
可以这个代码是发送了“(01,2,3,4)”的。
经过询问mentor,这个宏的值google默认是(01,2,3,4),三星会将其改为“(0,1,2,3)”。视频中出现的bug是因为该宏值为“(0,1,2)”所致。