I have implemented bonding mechanism in nRF52832 firmware. But when I use nRF Connect to connect nRF52832 device sencond time.
nRF Connect still request entering passkey again.
Log messages:
# SEGGER J-Link RTT Viewer V6.32i Terminal Log File
# Compiled: 15:22:50 on Jul 24 2018
# Logging started @ 25 Jul 2022 11:35:03
0> <info> app: Version 1.0.0
0>
0> <info> app: ========| flash info |========
0> <info> app: erase unit: 4096 bytes
0> <info> app: program unit: 4 bytes
0> <info> app: end address: 0x7FFFF
0> <info> app: ==============================
0> <info> app_timer: RTC: initialized.
0> <debug> app: NOR_DATA_PERIOD=819
0>
0> <debug> app: NOR_RECORD_PERIOD=8192
0>
0> <info> app: bsp_button_longkey_handler 0.
0> <warning> app: Battery volage 555mV is too low
0>
0> <warning> app: Battery volage 93mV is too low
0>
0> <warning> app: Battery volage 8mV is too low
0>
0> <warning> app: Battery volage 0mV is too low
0>
0> <debug> app: Battery volage 4049mV
0>
0> <info> app: POWER_ON.
0> <info> app: External devices initializing start
0> <info> app: External devices initializing finish
0> <info> app: bsp_button_longkey_handler 1.
0> <debug> nrf_ble_gatt: Requesting to update ATT MTU to 185 bytes on connection 0x0.
0> <info> app: BLE_GAP_EVT_CONNECTED
0>
0> <debug> app: state=1
0>
0> <debug> nrf_ble_gatt: ATT MTU updated to 185 bytes on connection 0x0 (response).
0> <info> app: BLE_GAP_EVT_SEC_PARAMS_REQUEST
0>
0> <info> app: PM_EVT_CONN_SEC_SUCCEEDED
0>
0> <info> app: Connection secured: role: 1, conn_handle: 0x0, procedure: 2.
0> <info> app: BLE_GAP_EVT_AUTH_STATUS
0>
0> <info> app: BLE_GAP_EVT_DISCONNECTED
0>
0> <debug> app: state=0
0>
0> <debug> nrf_ble_gatt: Requesting to update ATT MTU to 185 bytes on connection 0x0.
0> <info> app: BLE_GAP_EVT_CONNECTED
0>
0> <debug> app: state=1
0>
0> <debug> nrf_ble_gatt: ATT MTU updated to 185 bytes on connection 0x0 (response).
0> <info> app: BLE_GAP_EVT_SEC_PARAMS_REQUEST (connecting 1st time, enter passkey 123456)
0>
0> <info> app: PM_EVT_CONN_SEC_FAILED
0>
0> <info> app: Faield to secure connection with handle 00. (connecting 2nd time, doesn't enter passkey)
0> <info> app: BLE_GAP_EVT_AUTH_STATUS
0>
0> <warning> app: sd_ble_gap_disconnect() failed, errCode=0x8
0>
0> <info> app: BLE_GAP_EVT_DISCONNECTED
0>
0> <debug> app: state=0