feat(bt/bluedroid): Added an event to notify the encryption mode to applicaiton layer

This commit is contained in:
Jin Cheng
2023-12-29 16:01:41 +08:00
parent 6ee9b95960
commit 057eb7061d
11 changed files with 116 additions and 1 deletions
@@ -82,6 +82,13 @@ static void bt_app_gap_cb(esp_bt_gap_cb_event_t event, esp_bt_gap_cb_param_t *pa
ESP_LOGI(BT_AV_TAG, "link key type of current link is: %d", param->auth_cmpl.lk_type);
break;
}
case ESP_BT_GAP_ENC_CHG_EVT: {
char *str_enc[3] = {"OFF", "E0", "AES"};
bda = (uint8_t *)param->enc_chg.bda;
ESP_LOGI(BT_AV_TAG, "Encryption mode to [%02x:%02x:%02x:%02x:%02x:%02x] changed to %s",
bda[0], bda[1], bda[2], bda[3], bda[4], bda[5], str_enc[param->enc_chg.enc_mode]);
break;
}
#if (CONFIG_EXAMPLE_A2DP_SINK_SSP_ENABLED == true)
/* when Security Simple Pairing user confirmation requested, this event comes */