cancel
Showing results for 
Search instead for 
Did you mean: 

Fail: aci_gap_set_security_requirements command, result: 0x11 error

KKIM.6
Senior II

Hi. I have a problem with the STM32WB09KE board.

I'm trying to activate Bluetooth LE using this developer board but the BLE init function returns this error massage.

 

Success: aci_hal_write_config_data command - CONFIG_DATA_PUBADDR_OFFSET
Success: aci_hal_set_tx_power_level command
Success: aci_gatt_srv_profile_init command
Success: aci_gap_init command
Public Bluetooth Address: 00:08:e1:2a:12:34
Success: Gap_profile_set_dev_name - Device Name
Success: Gap_profile_set_appearance - Appearance
Success: aci_gap_set_io_capability command
Fail: aci_gap_set_security_requirements command, result: 0x11
==>> End BLE_Init function

Services and Characteristics creation
Success: aci_gatt_srv_add_service command: WB09KES
End of Services and Characteristics Creation 

 

Is there anyone who knows about this? and How to solve this.

In the code, the input value of aci_gap_set_security_requirements() is below.

I don't think this code is wrong because CubeMX automatically makes it.

 

bleAppContext.BleApplicationContext_legacy.bleSecurityParam.mitm_mode = CFG_MITM_PROTECTION;

bleAppContext.BleApplicationContext_legacy.bleSecurityParam.encryptionKeySizeMin = CFG_ENCRYPTION_KEY_SIZE_MIN;

bleAppContext.BleApplicationContext_legacy.bleSecurityParam.encryptionKeySizeMax = CFG_ENCRYPTION_KEY_SIZE_MAX;

bleAppContext.BleApplicationContext_legacy.bleSecurityParam.bonding_mode = CFG_BONDING_MODE;

 

ret = aci_gap_set_security_requirements(bleAppContext.BleApplicationContext_legacy.bleSecurityParam.bonding_mode,

bleAppContext.BleApplicationContext_legacy.bleSecurityParam.mitm_mode,

CFG_SC_SUPPORT,

CFG_KEYPRESS_NOTIFICATION_SUPPORT,

bleAppContext.BleApplicationContext_legacy.bleSecurityParam.encryptionKeySizeMin,

bleAppContext.BleApplicationContext_legacy.bleSecurityParam.encryptionKeySizeMax,

GAP_PAIRING_RESP_NONE);

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
STTwo-32
ST Employee

Hello @KKIM.6 

The aci_gap_set_security_requirements() command return an error with the code 0x11 that means a BLE_ERROR_UNSUPPORTED_FEATURE if KeyPress_Notification_Support is set to 1 but Secure Connection feature is not supported. Those two parameters are configured throw CubeMX and you can solve it by setting the CFG_BLE_SECURE_CONNECTIONS_ENABLED to Enabled (set by default to Disable on CubeMX):

STTwo32_0-1736243930069.png

Best Regards.

STTwo-32

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.

View solution in original post

2 REPLIES 2
STTwo-32
ST Employee

Hello @KKIM.6 

The aci_gap_set_security_requirements() command return an error with the code 0x11 that means a BLE_ERROR_UNSUPPORTED_FEATURE if KeyPress_Notification_Support is set to 1 but Secure Connection feature is not supported. Those two parameters are configured throw CubeMX and you can solve it by setting the CFG_BLE_SECURE_CONNECTIONS_ENABLED to Enabled (set by default to Disable on CubeMX):

STTwo32_0-1736243930069.png

Best Regards.

STTwo-32

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.

Thanks. The problem has been solved by this modification.