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

UART app shows connected (but actually not) when peripheral bonding data is cleared

Hi,

I tested UART app(nRF Toolbox) by iPhone for scenario: erased bonding info of peripheral but iPhone, then establish connection between iPhone and peripheral.

Here are test result:

1. UART app shows connected (but actually not)  when I erased the bonding info of peripheral early.

2. We can see the logs that the connection isn't established correctly.

The connection is not established is expected.

Does the UART app keep connection is expected?

Can peripheral send notification to UART app, and disconnect the secure link? 

By the way, tn this situation, I understand user should clear bonding info in iPhone manually. 

=====

Hardware: nRF52832

SDK: 16.0.0

Code base: ble_app_hrs_pca10040 S132 

Integrate NUS service to code base.

=====

Thanks. Vick

Parents
  • Hi

    It's good practice to test for all thinkable scenarios of course, but as long as there is a way to erase bonding information on both the peripheral and central device, I don't think this will be a problem for you. This is common for all BLE devices using pairing, as the connection will fail if one of the devices has erased the bonding information of the other.

    As for your testing method, it seems sound, and the tests seem expected. nRFConnect for Android /iOS have an option to pair once you have connected to a device and won't do pairing without you initiating it. Have you tested to see if the Android app shows the same "incorrect" connected after the nRF has deleted bonding information?

    c) nRFConnect is not open-source I'm afraid, and is meant to be a tool for assisting BLE developers. We recommend using the nRF Toolbox and/or the Android BLE Library for developing your own mobile apps.

    Best regards,

    Simon

Reply
  • Hi

    It's good practice to test for all thinkable scenarios of course, but as long as there is a way to erase bonding information on both the peripheral and central device, I don't think this will be a problem for you. This is common for all BLE devices using pairing, as the connection will fail if one of the devices has erased the bonding information of the other.

    As for your testing method, it seems sound, and the tests seem expected. nRFConnect for Android /iOS have an option to pair once you have connected to a device and won't do pairing without you initiating it. Have you tested to see if the Android app shows the same "incorrect" connected after the nRF has deleted bonding information?

    c) nRFConnect is not open-source I'm afraid, and is meant to be a tool for assisting BLE developers. We recommend using the nRF Toolbox and/or the Android BLE Library for developing your own mobile apps.

    Best regards,

    Simon

Children
  • Hi Simon,

    Thanks for your reply.

    b) I have test nRFConnect like below:

    [Android] In the test scenario, the logs show "Connection terminated by peer (status 19)

    [iOS] In the test scenario, the logs show Attempting to connect, and seems no timeout.

    Because peripheral keeps connected then disconnected.

     iOS

    I think two different behavior because of design between iOS and Android, right?

    If the bonding data of peripheral has been deleted, App should handle this case right? such as  "Keep the status disconnected" Then user can forget the peripheral in Phone setting.

    c) I see. 

    Thanks. Vick

  • Vick_Chang said:
    I think two different behavior because of design between iOS and Android, right?

     Yes, iOS and Android will behave somewhat differently in a few scenarios, this being one of them it seems. The disconnection reason (status 19) is called whenever the peer is the device initiating the disconnection (defers to 0x13 = GATT CONN TERMINATE PEER USER). So there isn't a way to specifically know that this is the issue when you're struggling to connect.

    Best regards,

    Simon

Related