From: hcj <1224667075@qq.com> Date: Fri, 16 Aug 2024 07:28:35 +0000 (+0800) Subject: 重新打开br广播 X-Git-Tag: release_V1.2.70_20241020_135402~609^2~24 X-Git-Url: http://git.snicker.com.cn/css/static/gitweb.css?a=commitdiff_plain;h=e6031bacff6927290593103f96a8000788c7f47d;p=mirrors%2FFD230.git 重新打开br广播 --- diff --git a/code/sdk/application/wearable/service/ble_service/bleservice/bleService.c b/code/sdk/application/wearable/service/ble_service/bleservice/bleService.c index 0f4087425..461471e8f 100644 --- a/code/sdk/application/wearable/service/ble_service/bleservice/bleService.c +++ b/code/sdk/application/wearable/service/ble_service/bleservice/bleService.c @@ -307,7 +307,7 @@ void svr_ble_connstate_change_cb(unsigned short conn_id, bd_addr_t *addr, gap_bl free_ble_data(); if(cm_custom_ble_service_on_flag()) svr_ble_adv_start(); - + ble_disconnect_ok(); // } } else { @@ -370,8 +370,12 @@ void svr_pair_result_cbt_cb(uint16_t conn_id, const bd_addr_t *addr, errcode_t s uapi_get_br_address(&bdaddr); if(false==(bt_is_acl_connected(&bdaddr))) { - int ret=gap_reconnect_media_device(&bdaddr); - WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "gap_reconnect_media_device!!! %X\r\n",ret); + if(cm_get_A2DP_switch() || cm_get_HFP_switch()) + { + int ret=gap_reconnect_media_device(&bdaddr); + WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "gap_reconnect_media_device!!! %X\r\n",ret); + } + } else { @@ -1452,7 +1456,7 @@ void custom_ble_service_start(void) AdverFlag = true; svr_ble_adv_start_param(); - gap_br_set_bt_scan_mode(GAP_SCAN_MODE_NONE, 0); + //gap_br_set_bt_scan_mode(GAP_SCAN_MODE_CONNECTABLE, 0); } @@ -1461,7 +1465,7 @@ void custom_ble_service_start_(uint8_t data) AdverFlag = true; svr_ble_adv_start_param(); WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "custom_ble_service_start_ "); - gap_br_set_bt_scan_mode(GAP_SCAN_MODE_NONE, data); + gap_br_set_bt_scan_mode(GAP_SCAN_MODE_CONNECTABLE, data); } #define MODE_BLE_ADV_SRV (0)