-
Notifications
You must be signed in to change notification settings - Fork 8.3k
Labels
area: Bluetootharea: Bluetooth HostBluetooth Host (excluding BR/EDR)Bluetooth Host (excluding BR/EDR)bugThe issue is a bug, or the PR is fixing a bugThe issue is a bug, or the PR is fixing a bugpriority: mediumMedium impact/importance bugMedium impact/importance bug
Milestone
Description
I'n using peripheral_lbs from Nordic nRF Connect SDK on nRF52840dk board.
I have Android phone Samsung Galaxy J1. It has BLE 4.1 only.
I've set secuirity level to BT_SECUIRITY_L4
static void connected(struct bt_conn *conn, uint8_t err)
{
if (err) {
printk("Connection failed (err %u)\n", err);
return;
}
printk("Connected\n");
int sec_result = bt_conn_set_security(conn, BT_SECURITY_L4);
printk("Security level, err %d\n", sec_result);
dk_set_led_on(CON_STATUS_LED);
}
On a smartphone I run nRFConnect app and try to pair with DK board.
Pairing fails because BLE 4.1 doesn't support LESC pairing (BT_SECURITY_L4) but
Board shows that the "secuirity_changed" callback called and then immediately "disconnected" callback.
Passkey for d0:1d:c1:85:77:9b (random): 786779
[00:00:12.933,227] [1;31m<err> bt_hci_core: Failed to set required security level
[00:00:12.941,314] [1;31m<err> bt_conn: not connected
[00:00:12.946,960] [1;31m<err> bt_conn: not connected
Security changed: d0:1d:c1:85:77:9b (random) level 3
Disconnected (reason 22)
Expected behavior
I expect bt_conn_auth callbacks like "cancel" or "pairing_failed" to be called but they are not.
Workaround:
Handle in-progress pairing as failed in disconnected callback if pairing_failed has not been called yet
Metadata
Metadata
Assignees
Labels
area: Bluetootharea: Bluetooth HostBluetooth Host (excluding BR/EDR)Bluetooth Host (excluding BR/EDR)bugThe issue is a bug, or the PR is fixing a bugThe issue is a bug, or the PR is fixing a bugpriority: mediumMedium impact/importance bugMedium impact/importance bug