I modified the FW "ble_app_uart" using the example "\nRF5_SDK_15.2.0_9412b96\examples\ble_peripheral\ble_app_uart \".
I added the pairing function and "delete_bonds ()".
The "delete_bonds ()" function is activated by pressing the EVAL button "Button 2" at startup.
After many pairing and delete_bonds () tests with the same device (Client) I saw that encrypted communication was no longer active (test by sniffer and wireshark).
I have seen that in these cases JLINK RTT sends me what is shown below.
00> <info> app: Debug logging for UART over RTT started.
00> <info> app: Connected
00> <info> app: Data len is set to 0xF4(244)
00> <info> peer_manager_handler: Connection security failed: role: Peripheral, conn_handle: 0x0, procedure: Bonding, error: 133
00> <info> app: Disconnected
00> <info> app: Connected
00> <info> app: Data len is set to 0xF4(244)
00> <warning> peer_manager_handler: Flash storage is full
00> <info> peer_manager_handler: Attempting to clean flash.
00> <error> peer_manager_handler: There are no peers to delete.
00> <info> peer_manager_handler: Connection secured: role: Peripheral, conn_handle: 0, procedure: Bonding
00> <info> peer_manager_handler: Attempting to clean flash.
00> <error> peer_manager_handler: There are no peers to delete.
00> <info> app: Disconnected
00>
To solve this problem I had to perform the "Erase flash" function through the "SEGGER J-FLASH" program.
Questions:
1) Why the "delete_bonds()" function does not solve this problem ?
2) Is there a way to solve this problem without having to perform the "Erase Flash" function through the SEGGER program ?
Thank you.
BR
Demetrio Magrin