fix(bt/bluedroid): Optimize compatibility with IOS and MACOS devices

This commit is contained in:
zhanghaipeng
2023-10-24 14:52:56 +08:00
parent 199ce4c7a9
commit 5727802497
3 changed files with 6 additions and 5 deletions
@@ -486,7 +486,7 @@ static esp_err_t start_bt_scan(uint32_t seconds)
/*
* BLE GAP
* */
extern void ble_hid_task_start_up(void);
static void ble_gap_event_handler(esp_gap_ble_cb_event_t event, esp_ble_gap_cb_param_t *param)
{
switch (event) {
@@ -535,10 +535,12 @@ static void ble_gap_event_handler(esp_gap_ble_cb_event_t event, esp_ble_gap_cb_p
* */
case ESP_GAP_BLE_AUTH_CMPL_EVT:
if (!param->ble_security.auth_cmpl.success) {
// if AUTH ERROR,hid maybe don't work.
ESP_LOGE(TAG, "BLE GAP AUTH ERROR: 0x%x", param->ble_security.auth_cmpl.fail_reason);
} else {
ESP_LOGI(TAG, "BLE GAP AUTH SUCCESS");
}
ble_hid_task_start_up();
break;
case ESP_GAP_BLE_KEY_EVT: //shows the ble key info share with peer device to the user.