BLE Security parameter "AuthOpt_u8" doesn't get reset after the BLE was disabled/re-enabled. (IDFGH-12909) #13869
Closed
3 tasks done
Labels
Resolution: NA
Issue resolution is unavailable
Status: Done
Issue is done internally
Type: Bug
bugs in IDF
Answers checklist.
IDF version.
v4.3
Espressif SoC revision.
ESP32
Operating System used.
Windows
How did you build your project?
VS Code IDE
If you are using Windows, please specify command line type.
None
Development Kit.
custom board
Power Supply used.
USB
What is the expected behavior?
the value of the BLE security parameter "AuthOpt_u8" should be cleared after cycles of BLE enable/disable.
What is the actual behavior?
the value of the BLE security parameter "AuthOpt_u8" is stored between cycles of BLE enabling /disabling.
Steps to reproduce.
Enable BLE
esp_bt_controller_config_t NPI_BT_ControllerConfig_st = BT_CONTROLLER_INIT_CONFIG_DEFAULT();
ErrorCode_s32 = esp_bt_controller_init(&NPI_BT_ControllerConfig_st);
if (ErrorCode_s32 != ESP_OK) {
//error message
}
ErrorCode_s32 = esp_bt_controller_enable(ESP_BT_MODE_BLE);
if (ErrorCode_s32 != ESP_OK) {
//error message
}
ErrorCode_s32 = esp_ble_config_file_path_update((char_t*)NPI_BT_Filename_pac);
if (ErrorCode_s32 != ESP_OK) {
//error message
}
ErrorCode_s32 = esp_bluedroid_init();
if (ErrorCode_s32 != ESP_OK) {
//error message
}
ErrorCode_s32 = esp_bluedroid_enable();
if (ErrorCode_s32 != ESP_OK) {
//error message
}
Set AuthOpt_u8 = ESP_BLE_ONLY_ACCEPT_SPECIFIED_AUTH_ENABLE;
Disable BLE
// Before deinit, disable ble first
ErrorCode_s32 = esp_bluedroid_disable();
if (ErrorCode_s32 != ESP_OK) {
//error message
}
// Deinit and free the stack for ble
ErrorCode_s32 = esp_bluedroid_deinit();
if (ErrorCode_s32 != ESP_OK) {
//error message }
// Disable the bt controller
ErrorCode_s32 = esp_bt_controller_disable();
if (ErrorCode_s32 != ESP_OK) {
//error message }
// Deinit the bt controller
ErrorCode_s32 = esp_bt_controller_deinit();
if (ErrorCode_s32 != ESP_OK) {
//error message }
Enable BLE again like in step 1.
The value of AuthOpt_u8 = ESP_BLE_ONLY_ACCEPT_SPECIFIED_AUTH_ENABLE is still as set before.
This is not the case if you reboot the board.
In order to fix this you need to explicit clear this settings.
...
Debug Logs.
No response
More Information.
No response
The text was updated successfully, but these errors were encountered: