cancel
Showing results for 
Search instead for 
Did you mean: 

hi, I refer to demo"BLE_Security" in BlueNRG-LP , meet this error , API "aci_gap_set_authentication_requirement " return 0x11 err; #define BLE_ERROR_UNSUPPORTED_FEATURE ((tBleStatus)(0x11)) why?

Fx.1
Associate II

code:

void test_security_init(void)
{
 
	Clear_Security_Database();
        int ret;
	/* ACI_GAP_SET_IO_CAPABILITY */
	ret = aci_gap_set_io_capability(IO_CAPABILITY);
	if (ret != BLE_STATUS_SUCCESS) {
	  TUYA_APP_LOG_INFO("aci_gap_set_io_capability(%d) failed:0x%02x\r\n", IO_CAPABILITY, ret);
	}
	else
	{
	  TUYA_APP_LOG_INFO("aci_gap_set_io_capability(%d) --> SUCCESS\r\n",IO_CAPABILITY);
	}
	/* BLE Security v4.2 is supported: BLE stack FW version >= 2.x */  
	ret = aci_gap_set_authentication_requirement(SLAVE_BONDING_USAGE,
												 MITM_MODE,
												 SECURE_CONNECTION_SUPPORT,
												 KEYPRESS_NOTIFICATION,
												 MIN_KEY_SIZE, 
												 MAX_KEY_SIZE,
												 FIXED_PIN_POLICY,
												 PERIPHERAL_SECURITY_KEY);
	if(ret != BLE_STATUS_SUCCESS) {
	  TUYA_APP_LOG_INFO("aci_gap_set_authentication_requirement() failed: 0x%02x\r\n", ret);
 
	}  
	else
	{
	  TUYA_APP_LOG_INFO("aci_gap_set_authentication_requirement() --> SUCCESS\r\n");
	}
}

log:

[I] TUYA_APP: aci_gap_clear_security_db() --> SUCCESS

[I] TUYA_APP: aci_gap_set_io_capability(0) --> SUCCESS

[I] TUYA_APP: aci_gap_set_authentication_requirement() failed: 0x11

1 ACCEPTED SOLUTION

Accepted Solutions
Sebastien DENOUAL
ST Employee

Hi @Fx.1​ ,

I tested "BLE_Security" from BlueNRg-LP SDK => I do not see any issue. It returns BLE_STATUS_SUCCESS.

Are you client (master) or server (salve) ?

Do you confirm you performed a aci_gap_init() before ?

One additional point. To save RAM/FLAH you can select your BLE stack config (disable/enable some features like security, 2Mbps, ..). This could be interesting hypothesis.

What is your BLE stack config ?

  • BLE_STACK_FULL_CONF
  • BLE_STACK_BASIC_CONF => not possible
  • BLE_STACK_SLAVE_DLE_CONF => not possible
  • BLE_STACK_SLAVE_DLE_LE_2M_CODED_CONF => not possible
  • BLE_STACK_CUSTOM_CONF (need to enable SECURE_CONNECTIONS_ENABLED)

Can you have a trial with BLE_STACK_FULL_CONF ? should be defined in project preprocessing options

Regards,

Sebastien.

View solution in original post

4 REPLIES 4
Fx.1
Associate II

Addendum: I used demo"BLE_Security" in Bluenrg-LP directly, it is normal not to make any changes

Fx.1
Associate II

seek help ....

Sebastien DENOUAL
ST Employee

Hi @Fx.1​ ,

I tested "BLE_Security" from BlueNRg-LP SDK => I do not see any issue. It returns BLE_STATUS_SUCCESS.

Are you client (master) or server (salve) ?

Do you confirm you performed a aci_gap_init() before ?

One additional point. To save RAM/FLAH you can select your BLE stack config (disable/enable some features like security, 2Mbps, ..). This could be interesting hypothesis.

What is your BLE stack config ?

  • BLE_STACK_FULL_CONF
  • BLE_STACK_BASIC_CONF => not possible
  • BLE_STACK_SLAVE_DLE_CONF => not possible
  • BLE_STACK_SLAVE_DLE_LE_2M_CODED_CONF => not possible
  • BLE_STACK_CUSTOM_CONF (need to enable SECURE_CONNECTIONS_ENABLED)

Can you have a trial with BLE_STACK_FULL_CONF ? should be defined in project preprocessing options

Regards,

Sebastien.

hi Sebastien

thank you,​ beacuse i

#define SECURE_CONNECTIONS_ENABLED        (0U)

​not use 1