From e20e47809df4e55ca1b8280ceb184516f6bd8ffe Mon Sep 17 00:00:00 2001 From: Xu Jun Jun Date: Sat, 7 Dec 2019 16:19:57 +0800 Subject: [PATCH] For BT device restore security info from NV to SRAM, should set the ble_hci_handle to a invalid value, otherwise BLE devices may have pairing problem --- components/bt/host/bluedroid/stack/btm/btm_dev.c | 1 + 1 file changed, 1 insertion(+) diff --git a/components/bt/host/bluedroid/stack/btm/btm_dev.c b/components/bt/host/bluedroid/stack/btm/btm_dev.c index 0d96bea6fe..2280ed0806 100644 --- a/components/bt/host/bluedroid/stack/btm/btm_dev.c +++ b/components/bt/host/bluedroid/stack/btm/btm_dev.c @@ -81,6 +81,7 @@ BOOLEAN BTM_SecAddDevice (BD_ADDR bd_addr, DEV_CLASS dev_class, BD_NAME bd_name, p_dev_rec->sec_flags = BTM_SEC_IN_USE; memcpy (p_dev_rec->bd_addr, bd_addr, BD_ADDR_LEN); p_dev_rec->hci_handle = BTM_GetHCIConnHandle (bd_addr, BT_TRANSPORT_BR_EDR); + p_dev_rec->ble_hci_handle = BTM_GetHCIConnHandle (bd_addr, BT_TRANSPORT_LE); #if BLE_INCLUDED == TRUE /* use default value for background connection params */