1st connection is bonded authenticated encrypted link, but 2nd connection becomes not bonded unencrypted link

I use nRF Connect to connect to nRF52832 device. 1st connection is bonded authenticated encrypted link, but 2nd connection becomes not bonded unencrypted link. Why 1st and 2nd connection are different?

The following is log message of nRF52832 device.

00> <info> app: POWER_ON.
00> <debug> nrf_ble_gatt: Requesting to update ATT MTU to 185 bytes on connection 0x0.
00> <info> app: BLE_GAP_EVT_CONNECTED (1st connection)
00> <debug> app: state=1
00> <debug> nrf_ble_gatt: ATT MTU updated to 185 bytes on connection 0x0 (response).
00> <debug> app: _securityRequestHandler
00> <info> app: BLE_GAP_EVT_SEC_PARAMS_REQUEST
00> <info> app: PM_EVT_CONN_SEC_SUCCEEDED
00> <info> app: Connection secured: role: 1, conn_handle: 0x0, procedure: 1.
00> <debug> nrf_ble_gatt: Requesting to update ATT MTU to 185 bytes on connection 0x0.
00> <info> app: PM_EVT_BONDED_PEER_CONNECTED
00> <info> app: BLE_GAP_EVT_CONNECTED (2nd connection)
00> <debug> app: state=1
00> <debug> nrf_ble_gatt: ATT MTU updated to 185 bytes on connection 0x0 (response).

  • Yes, I have initiated pairing from nRF Connect. But I don't know why nRF Connect doesn't pop up window for me to enter passkey. I am using ble_app_ancs_c example now, do I need to change firmware for encryption link testing?

  • The ble_app_ancs_c supports bonding out of the box, so if you are using an unmodified version of that, you should be good.''

    Can you do this?

    1. Ensure that you are testing with an unmodified ble_app_ancs_c. If in doubts, program a pre-built hex file from <SDK>\examples\ble_peripheral\ble_app_ancs_c\hex\
    2. Use nRF Connect to connect and initiate pairing. As this should just work I am having problems understanding what you are doing, I suggest making a screen recording showing exactly how you do it.
    3. Please click "OPEN LOG FILE" in the lower bar and upload the complete log here (use Insert - Insert image/video/file). Also, check the log on the nRF side and upload here. That should hopefully tell us more.
  • 00> BLE_ADV_EVT_WHITELIST_REQUEST
    00> BLE_ADV_EVT_FAST
    00> Hello World!..
    nRF_Connect_ANCS_pairing.txt

Related