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

Bond information deleted

I am developing device that uses NRF52 and GSM modem. Sometimes when connecting to bonded device connection fails and phone pop-up appear and ask for pairing. GSM antenna is close to NR52 device and I think some GSM noise is transmitted to 32kHz oscillator tracks and connection packet timing is corrupted.

Simulation:

  1. To test this I took NFR52 dev board with "Nordic_Keyboard" example. 
  2. When connecting to bonded example I was shorting 32kHz oscillator lines for a few ms periods.
  3. I see the same result in NRF Connect app log:
    1. Error 8 (0x8): GATT INSUF AUTHORISATION
    2. Error 8 (0x8): GATT CONN TIMEOUT
    3. Disconnected
    4. Bond information deleted.

Question:

Is it possible to prevent delete of bond on phone side if connection did not succeeded?

Phone:

OnePlus 6 (Android 9.0.7)

Parents
  • Hi,

    It does not look like the bonding procedure completed. In that case, it does not make sense to retain the bond information on the phone, as it would not be possible to use it to encrypt a connection in the future.

    Can you provide a sniffer trace of the communication between the phone and the nRF?

    Best regards,
    Jørgen

  • Hi,

    I use nRF5_SDK_15.3.0 example ble_app_hids_keyboard to test this behavior.

    In code I do these modifications:

    #define APP_ADV_FAST_INTERVAL               MSEC_TO_UNITS(1000, UNIT_0_625_MS)
    #define APP_ADV_SLOW_INTERVAL               MSEC_TO_UNITS(1000, UNIT_0_625_MS)

    Test:

    • Bond to NORDIC_KEYBOARD
    • Do board restart to disconnect from phone
    • At the moment when it starts connecting touch soldered wire
    • Then in nRF Connect app I see that bond was deleted and keyboard is no longer able to connect.

    Keyboard example is able to connect to phone after restart, so I believe it has bonded successfully. When bonding for the first time in UART I see:

     12:36:46.650> <info> peer_manager_handler: Connection secured: role: Peripheral, conn_handle: 0, procedure: Bonding
    12:36:46.650>
    12:36:46.714> <info> app: New Bond, add the peer to the whitelist if possible

     

    bond and bond deleted.pcapng

Reply
  • Hi,

    I use nRF5_SDK_15.3.0 example ble_app_hids_keyboard to test this behavior.

    In code I do these modifications:

    #define APP_ADV_FAST_INTERVAL               MSEC_TO_UNITS(1000, UNIT_0_625_MS)
    #define APP_ADV_SLOW_INTERVAL               MSEC_TO_UNITS(1000, UNIT_0_625_MS)

    Test:

    • Bond to NORDIC_KEYBOARD
    • Do board restart to disconnect from phone
    • At the moment when it starts connecting touch soldered wire
    • Then in nRF Connect app I see that bond was deleted and keyboard is no longer able to connect.

    Keyboard example is able to connect to phone after restart, so I believe it has bonded successfully. When bonding for the first time in UART I see:

     12:36:46.650> <info> peer_manager_handler: Connection secured: role: Peripheral, conn_handle: 0, procedure: Bonding
    12:36:46.650>
    12:36:46.714> <info> app: New Bond, add the peer to the whitelist if possible

     

    bond and bond deleted.pcapng

Children
No Data
Related