Hello,
we face the following issues when trying to connect to our peripheral with Android 7 and 8 phones each with BLE4.2.
Precondition:
Phone was connected and bonded to the peripheral.
Bond information was stored by Peer Manager module.
The bond information was deleted on the peripheral and is no longer available in the peer manager module.
The bond information persists on the phone.
Connection settings:
#define NRF_SDH_BLE_GATT_MAX_MTU_SIZE 92#define NRF_SDH_BLE_GAP_DATA_LENGTH 32#define NRF_SDH_BLE_GAP_EVENT_LENGTH 10
#define MIN_CONN_INTERVAL MSEC_TO_UNITS(45, UNIT_1_25_MS) /**< Minimum acceptable connection interval. */
#define MAX_CONN_INTERVAL MSEC_TO_UNITS(60, UNIT_1_25_MS) /**< Maximum acceptable connection interval. */
#define SLAVE_LATENCY 15 /**< Slave latency. */
#define CONN_SUP_TIMEOUT MSEC_TO_UNITS(6000, UNIT_10_MS) /**< Connection supervisory time-out. */
#define FIRST_CONN_PARAMS_UPDATE_DELAY APP_TIMER_TICKS(500) /**< Time from initiating event (connect or start of notification) to first time sd_ble_gap_conn_param_update is called (10 seconds). */
#define NEXT_CONN_PARAMS_UPDATE_DELAY APP_TIMER_TICKS(1000) /**< Time between each call to sd_ble_gap_conn_param_update after the first call. */
#define MAX_CONN_PARAMS_UPDATE_COUNT 3 /**< Number of attempts before giving up the connection parameter negotiation. */
Observed behavior:
Phone connects to the peripheral, does not bond but disconnects right away.
On the peripheral the disconnect reason 19 (BLE_HCI_REMOTE_USER_TERMINATED_CONNECTION) is reported.
On the phone the disconnect reason Reason: TERMINATE LOCAL HOST is reported after we get the ConnectionObserver.onDeviceConnected() event from the Nordic Android library. After this the Service discovery occurs automatically.
Expected behavior:
Phone connects and bonds to the peripheral without problems as it does with BLE5 and other Android versions.
Is there something we have to consider in the implementation on the peripheral that will lead to the expected behavior on all phones?
Thanks in advance for your help and best regards.