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
    1. In what way does disconnect not work well with HRM? Using a sniffer I can see that my iOS device with nRF Toolbox sends an LL_TERMINATE_IND PDU.

    2. This is something that has to be implemented on the central side (iOS). You can implement this in your custom iOS app. Your app can scan for known peripherals and connect. This can be done as a background task. Refer to the Core Bluetooth Background Processing for iOS Apps chapter of the Core Bluetooth Programming Guide.

  • 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.

Reply
  • 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.

Children
No Data