This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

NFC BLE pairing connection issue

Hi all,

I'm testing the ble_nfc_pairing_reference example from SDK 15.2.0

I have installed microECC and then run succesfully the application using Segger Embedded Studio on Windows.

At the first pairing, my Samsung g6 Android Smartphone can connect with the nrf52832 board, but they disconnect almost immediately (about 1 or 2 seconds). The RTT log captured from Debug interface are:

"<info> app: NFC Connection Handover BLE peripheral device example started.
<info> BUTTONS_M: LESC OOB MODE!
<info> BLE_M: Fast advertising.
<info> BLE_M: Connected.
<info> nrf_ble_lesc: Calling sd_ble_gap_lesc_dhkey_reply on conn_handle: 0
<info> BLE_M: BLE_GAP_EVT_CONN_SEC_UPDATE
<info> BLE_M: Security mode: 2
<info> peer_manager_handler: Connection secured: role: Peripheral, conn_handle: 0, procedure: Bonding
<info> BLE_M: BLE_GAP_EVT_AUTH_STATUS
<info> BLE_M: Authorization succeeded!
<info> BLE_M: Disonnected"

And then, at the next pairing, they can not connect:

"<info> BLE_M: Connected.
<info> peer_manager_handler: Connection security failed: role: Peripheral, conn_handle: 0x0, procedure: Bonding, error: 133
<info> BLE_M: BLE_GAP_EVT_AUTH_STATUS
<info> BLE_M: Authorization failed with code: 133!
<info> peer_manager_handler: Connection security failed: role: Peripheral, conn_handle: 0x0, procedure: Bonding, error: 133
<info> BLE_M: BLE_GAP_EVT_AUTH_STATUS
<info> BLE_M: Authorization failed with code: 133!
<info> BLE_M: Disonnected "

I have tried also with Nexus 7 and found the same problem. So, I have 2 questions:

1. At the first pairing, why they disconnect almost immediately after a successful pairing? How we can do to keep the connection

2. Why they can not reconnect after losing the connection ? Do you have any ideas what could cause these errors? I wonder if I have missed an important step in configuration and coding.

Can you help me?
Many thanks in advance.

  • I am having this same exact problem, and this is only an android issue as iPhone works correctly. I hope a mod will be able to help us soon!

  • Hi,

    It sounds like you have forgotten to erase the bond information in your phone. If you delete the bonding information on the nRF side but not on the phone, the nRF will not allow the phone to bond again as it is a known bonded peer, but lacks the bonding information.

    Best Regards,

    Marjeris

  • Hi msromero,

    I have done "erase all" before each debugging, but I always have the same problem.

    If I try to print the reason when it gets the disconnect event, it shows ¨Disconnect reason: 19¨.
    This 19 (0x13) error code relates to BLE_HCI_REMOTE_USER_TERMINATED_CONNECTION.

    It seems to have a problem during the encryption process. The android device can't understand and then cancel the newly established connection.

    I have tested also the Heart Rate Application with BLE Pairing Using NFC Pairing and the HID Keyboard Application with BLE pairing using NFC. I found the same problem. I clicked the "button 2" to erase bonds and delete all peers but nothing new.

    I don't know how to do now.

    Has anyone run correctly these example with a perfect connection between an android device and nrf52 board. Can you help me, thanks.

  • I think you are erasing the bond information on the nRF side, but have you done the same on the phone side? In the nRF Connect app click the nordic device in the scanner menu, then in the dropdown menu besides the "CONNECT" button up to the right, there is an option to delete bond information on the phone side. Can you try this?

  • Hi msromero,

    I have deleted all bonds on the phone side, close the app and reopen every time, but nothing change.

    Today, I have just tested the BLE Heart Rate Collector Example with NFC Pairing with 2 nrf52832 boards: one attached with Adafruit PN532 NFC Shield and the other attached with NFC antenna. It works very well with a correctly pairing. I can disconnect by clicking the button and reconnect again easily.

    So, this issue is obviously related to the Android device side. I still have no idea what I must change in the code.

Related