2022-02-16 06:35 PM
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
Solved! Go to Solution.
2022-02-22 08:15 AM
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 ?
Can you have a trial with BLE_STACK_FULL_CONF ? should be defined in project preprocessing options
Regards,
Sebastien.
2022-02-16 06:38 PM
Addendum: I used demo"BLE_Security" in Bluenrg-LP directly, it is normal not to make any changes
2022-02-16 07:07 PM
seek help ....
2022-02-22 08:15 AM
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 ?
Can you have a trial with BLE_STACK_FULL_CONF ? should be defined in project preprocessing options
Regards,
Sebastien.
2022-03-05 02:00 AM
hi Sebastien
thank you, beacuse i
#define SECURE_CONNECTIONS_ENABLED (0U)
not use 1