CYW20706 HFP连接后自动拨号问题

公告

大中华汽车电子生态圈社区并入开发者社区- 更多资讯点击此

Tip / 登入 to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
PeYu_4639956
Level 3
Level 3
10 replies posted 10 questions asked 10 sign-ins

在使用CYW20706蓝牙模块测试HFP时,模块连接安卓手机,连接成功后模块断电复位,然后调用wiced_result_t wiced_bt_hfp_hf_connect(wiced_bt_device_address_t bd_address)函数连接复位前连接对的手机,连接成功后偶发性自动重拨电话。使用WCIED_STAUDIO 6.1和6.4测试了多个手机,小米手机(MIUI 11.3.2)出现这个现象的概率较高。如果在模块连接手机后,从手机端断开连接(保持配对),再调用wiced_bt_hfp_hf_connect连接该手机,则不会出现重拨电话的现象。请各路大神指教,该怎么处理自动重拨电话的问题。

0 点赞
1 解答
Owen_Zhang123
Moderator
Moderator
Moderator
5 questions asked 500 solutions authored 250 sign-ins

请试下在文件libraries/common/handsfree_profile/wiced_bt_hfp_hf_act.c中,将代码修改如下:

wiced_hfp_hf_sdp_complete:

    if( msg.hdr.event == WICED_BT_HFP_HF_SDP_DISC_FAIL_EVT )

    {

        if( wiced_bt_hfp_hf_cb.ag_profile_uuid == UUID_SERVCLASS_AG_HANDSFREE )

        {

//            wiced_bt_hfp_hf_cb.ag_profile_uuid = UUID_SERVCLASS_HEADSET_AUDIO_GATEWAY;

            wiced_bt_hfp_hf_cb.ag_profile_uuid = UUID_SERVCLASS_HF_HANDSFREE;

            memset(p_scb->p_sdp_db,0,WICED_BT_HFP_HF_DISC_BUF_SIZE);

            wiced_app_event_serialize(wiced_bt_do_sdp_again,(void *)p_scb);

        }

.......

在原帖中查看解决方案

0 点赞
2 回复数
Owen_Zhang123
Moderator
Moderator
Moderator
5 questions asked 500 solutions authored 250 sign-ins

请试下在文件libraries/common/handsfree_profile/wiced_bt_hfp_hf_act.c中,将代码修改如下:

wiced_hfp_hf_sdp_complete:

    if( msg.hdr.event == WICED_BT_HFP_HF_SDP_DISC_FAIL_EVT )

    {

        if( wiced_bt_hfp_hf_cb.ag_profile_uuid == UUID_SERVCLASS_AG_HANDSFREE )

        {

//            wiced_bt_hfp_hf_cb.ag_profile_uuid = UUID_SERVCLASS_HEADSET_AUDIO_GATEWAY;

            wiced_bt_hfp_hf_cb.ag_profile_uuid = UUID_SERVCLASS_HF_HANDSFREE;

            memset(p_scb->p_sdp_db,0,WICED_BT_HFP_HF_DISC_BUF_SIZE);

            wiced_app_event_serialize(wiced_bt_do_sdp_again,(void *)p_scb);

        }

.......

0 点赞

谢谢!

0 点赞