Hello
I'm using SDK 15.2 on nRF52 DK to test the ble_app_multirole_lesc example.
I downloaded the code to nRF52 DK to act as central.
I commented the scan_start() function (main.c line 276) then I downloaded the code to the other nRF52 DK to act as peripheral
I also added DEBUG in the global defines.
The problem is the secure connection has never established.
The logs below are the peripheral traces
/**********************************/ /**********peripheral**************/ /**********************************/ <debug> ble_scan: Added filter on UUID 180D <debug> nrf_ble_lesc: Initialized nrf_crypto. <debug> nrf_ble_lesc: Initialized nrf_ble_lesc. <debug> nrf_ble_lesc: Generating ECC key pair <info> app: LE Secure Connections example started. <info> app: Advertising <info> app: PERIPHERAL: Connected, handle 1. <info> peer_manager_handler: Connection security failed: role: Peripheral, conn_handle: 0x1, procedure: Encryption, error: 4102 <warning> peer_manager_handler: Disconnecting conn_handle 1. <info> app: PERIPHERAL: Disconnected, handle 1, reason 0x16. <info> app: PERIPHERAL: Connected, handle 1. <info> peer_manager_handler: Connection security failed: role: Peripheral, conn_handle: 0x1, procedure: Encryption, error: 4102 <warning> peer_manager_handler: Disconnecting conn_handle 1. <info> app: PERIPHERAL: Disconnected, handle 1, reason 0x16.
The logs below are the Central traces
/**********************************/ /*************Central**************/ /**********************************/ <debug> ble_scan: Added filter on UUID 180D <debug> nrf_ble_lesc: Initialized nrf_crypto. <debug> nrf_ble_lesc: Initialized nrf_ble_lesc. <debug> nrf_ble_lesc: Generating ECC key pair <info> app: LE Secure Connections example started. <debug> ble_scan: Scanning <info> app: Scanning <info> app: Advertising <debug> ble_scan: Connecting <debug> ble_scan: Connection status: 0 <info> app: CENTRAL: Connected, handle: 0. <info> app: CENTRAL: Searching for HRS on conn_handle 0x0 <debug> ble_db_disc: Starting discovery of service with UUID 0x180D on connection handle 0x0. <debug> ble_db_disc: Found service UUID 0x180D. <error> peer_manager_sm: Could not perform security procedure. smd_params_reply() or smd_link_secure() returned Unknown error code. conn_handle: 0 <error> peer_manager_handler: Unexpected fatal error occurred: error: Unknown error code <error> peer_manager_handler: Asserting. <error> app: ERROR 12290 [Unknown error code] at :0 PC at: 0x00000000 <error> app: End of error report <debug> ble_scan: Added filter on UUID 180D <debug> nrf_ble_lesc: Initialized nrf_crypto. <debug> nrf_ble_lesc: Initialized nrf_ble_lesc. <debug> nrf_ble_lesc: Generating ECC key pair <info> app: LE Secure Connections example started. <debug> ble_scan: Scanning <info> app: Scanning <info> app: Advertising <debug> ble_scan: Connecting <debug> ble_scan: Connection status: 0 <info> app: CENTRAL: Connected, handle: 0. <info> app: CENTRAL: Searching for HRS on conn_handle 0x0 <debug> ble_db_disc: Starting discovery of service with UUID 0x180D on connection handle 0x0. <debug> ble_db_disc: Found service UUID 0x180D. <error> peer_manager_sm: Could not perform security procedure. smd_params_reply() or smd_link_secure() returned Unknown error code. conn_handle: 0 <error> peer_manager_handler: Unexpected fatal error occurred: error: Unknown error code <error> peer_manager_handler: Asserting. <error> app: ERROR 12290 [Unknown error code] at :0 PC at: 0x00000000 <error> app: End of error report
I would like to know what's the problem.
Best regards
Youssef