diff options
Diffstat (limited to 'Projects/P-NUCLEO-WB55.Nucleo/Applications/BLE/BLE_MultiAppAt/STM32_WPAN/App/app_ble_hr.c')
-rw-r--r-- | Projects/P-NUCLEO-WB55.Nucleo/Applications/BLE/BLE_MultiAppAt/STM32_WPAN/App/app_ble_hr.c | 37 |
1 files changed, 10 insertions, 27 deletions
diff --git a/Projects/P-NUCLEO-WB55.Nucleo/Applications/BLE/BLE_MultiAppAt/STM32_WPAN/App/app_ble_hr.c b/Projects/P-NUCLEO-WB55.Nucleo/Applications/BLE/BLE_MultiAppAt/STM32_WPAN/App/app_ble_hr.c index 1c2382902..7b380b0fb 100644 --- a/Projects/P-NUCLEO-WB55.Nucleo/Applications/BLE/BLE_MultiAppAt/STM32_WPAN/App/app_ble_hr.c +++ b/Projects/P-NUCLEO-WB55.Nucleo/Applications/BLE/BLE_MultiAppAt/STM32_WPAN/App/app_ble_hr.c @@ -18,6 +18,7 @@ ****************************************************************************** */ /* USER CODE END Header */ + /* Includes ------------------------------------------------------------------*/ #include "main.h" @@ -65,19 +66,7 @@ typedef struct _tSecurityParams /** * bonding mode of the device */ - uint8_t bonding_mode; - - /** - * Flag to tell whether OOB data has - * to be used during the pairing process - */ - uint8_t OOB_Data_Present; - - /** - * OOB data to be used in the pairing process if - * OOB_Data_Present is set to TRUE - */ - uint8_t OOB_Data[16]; + uint8_t bonding_mode; /** * this variable indicates whether to use a fixed pin @@ -614,7 +603,6 @@ static void Ble_Tl_Init( void ) static void Ble_Hci_Gap_Gatt_Init(void){ uint8_t role; - uint8_t index; uint16_t gap_service_handle, gap_dev_name_char_handle, gap_appearance_char_handle; const uint8_t *bd_addr; uint32_t srd_bd_addr[2]; @@ -745,26 +733,21 @@ static void Ble_Tl_Init( void ) * Initialize authentication */ BleApplicationContext.BleApplicationContext_legacy.bleSecurityParam.mitm_mode = CFG_MITM_PROTECTION; - BleApplicationContext.BleApplicationContext_legacy.bleSecurityParam.OOB_Data_Present = 0; - BleApplicationContext.BleApplicationContext_legacy.bleSecurityParam.encryptionKeySizeMin = 8; - BleApplicationContext.BleApplicationContext_legacy.bleSecurityParam.encryptionKeySizeMax = 16; - BleApplicationContext.BleApplicationContext_legacy.bleSecurityParam.Use_Fixed_Pin = 1; - BleApplicationContext.BleApplicationContext_legacy.bleSecurityParam.Fixed_Pin = 1111; - BleApplicationContext.BleApplicationContext_legacy.bleSecurityParam.bonding_mode = 0; - for (index = 0; index < 16; index++) - { - BleApplicationContext.BleApplicationContext_legacy.bleSecurityParam.OOB_Data[index] = (uint8_t) index; - } + BleApplicationContext.BleApplicationContext_legacy.bleSecurityParam.encryptionKeySizeMin = CFG_ENCRYPTION_KEY_SIZE_MIN; + BleApplicationContext.BleApplicationContext_legacy.bleSecurityParam.encryptionKeySizeMax = CFG_ENCRYPTION_KEY_SIZE_MAX; + BleApplicationContext.BleApplicationContext_legacy.bleSecurityParam.Use_Fixed_Pin = CFG_USED_FIXED_PIN; + BleApplicationContext.BleApplicationContext_legacy.bleSecurityParam.Fixed_Pin = CFG_FIXED_PIN; + BleApplicationContext.BleApplicationContext_legacy.bleSecurityParam.bonding_mode = CFG_BONDING_MODE; aci_gap_set_authentication_requirement(BleApplicationContext.BleApplicationContext_legacy.bleSecurityParam.bonding_mode, BleApplicationContext.BleApplicationContext_legacy.bleSecurityParam.mitm_mode, - 1, - 0, + CFG_SC_SUPPORT, + CFG_KEYPRESS_NOTIFICATION_SUPPORT, BleApplicationContext.BleApplicationContext_legacy.bleSecurityParam.encryptionKeySizeMin, BleApplicationContext.BleApplicationContext_legacy.bleSecurityParam.encryptionKeySizeMax, BleApplicationContext.BleApplicationContext_legacy.bleSecurityParam.Use_Fixed_Pin, BleApplicationContext.BleApplicationContext_legacy.bleSecurityParam.Fixed_Pin, -0 +PUBLIC_ADDR ); /** |