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

Bonding, Auto Connection, and App Disconnect Control

Hi, I'm using

  • IAR EWARM 7.20

  • PCA10001 V 2.0.0 (Changed the MCU to QFAAH00 Revision 3)

(I replaced the MCU to a QFAAH00 (0x0072) with a heat gun)

  • SDK 7.2 (using example ble_app_hrs)

  • SoftDevice S110 7.1

  • J-Link Edu

  • Test device: iPhone 6 Plus (with iOS 9.2.1)

/******************************************************************/

As you know, services like Heart Rate Service (HRS) or HID keyboard /mouse bonds together while connecting.

After the central (like the iPhone) and peripheral was bonded each other,

both stores the IRK, so the iPhone shows the bonded device lists like this.

Bonded

I preferred services that bonds because the peripheral directly connects to the central

without selecting the peripheral from an app or at the Bluetooth settings menu.

(I don't know the term about this direct connection, so I will just call it as "auto connection".)

However, I wish to know if this type of auto connection is possible without bonding together.

Because I found something strange while using the nRF Toolbox (Heart Rate) App

so I can bypass this problem.

HRS Connected

Since it has bonded before, the peripheral automatically connects to the phone.

However, when I press disconnect,

HRS Disconnect request

the disconnection didn't ocurr. The Bluetooth mark remains as "connected" and the settings shows it.

(Sometimes the Bluetooth setting list does not show "Nordic_HRM_DFU" on the list.)

Compared to NUS, which pairs not bonds, the disconnection request worked well.

/******************************************************************/

So my questions are,

  1. Whether HRS or HID, which bonds each other, I think the Nordic or custom app's disconnection requests are not working properly.

Is this problem with bonding, App's API, or iOS?

In the case of nRF Toolbox, I want to disconnect the peripheral, which uses services that bonds, when the app button's "Disconnect Button" is pressed.

  1. Without using bonding, can peripherals, which uses NUS, directly connect to certain centrals,

like the auto connection described above?

For instance, after the first connection was established between the peripheral and the central,

I want the central to connect automatically to that peripheral when it is advertising.

Can this be possible?

-Best Regards, Mango

Parents Reply Children
  • Thanks Einar. I have to take closer look about " Core Bluetooth Background Processing for iOS Apps".

    About number 1, I check that, as you mentioned, the central sends LL_TERMINATE_IND PDU. I checked it with wireshark.

    However, am I the only user observing that the picture above

    (Bluetooth mark shown connected and settings menu still shows Norid_HRM)?

    Even though the app has disconnected and doesn't receive any heart rate data,

    the iOS still has connection as shown in the picture.

    I want to make the central to totally disconnect.

    What I mean is that the settings menus should display the Nordic_HRM as disconnected.

  • For instance, I merged HID keyboard and NUS together. I connected the peripheral with the nRF UART app.

    Even though I press "Disconnect" from the NUS app and shows error number 0,

    I still can send HID keyboard values to the phone.

    What I want is that, when I press the "Disconnect" button of the nRF UART, MCP, or Toolbox App,

    I want to make the bonded device to disconenct from HRS or HID together, not only the NUS.

    Similar to this, the Toolbox app does not "completely" disconnects the peripheral.

    Can you check this?

  • You are probably not the only one. This is iOS behaviour. If you delete the peripheral from your iOS device, and connect via the nRF Toolbox app, you should see connection and disconnection function as expected. However, if you connect via iOS settings, you will see that iOS will automatically reconnect.

Related