diff --git a/tests/bluetooth/tester/src/btp_gap.c b/tests/bluetooth/tester/src/btp_gap.c index 26da168bcc3..430118b2e9f 100644 --- a/tests/bluetooth/tester/src/btp_gap.c +++ b/tests/bluetooth/tester/src/btp_gap.c @@ -1567,7 +1567,11 @@ static uint8_t pair(const void *cmd, uint16_t cmd_len, } err = bt_conn_set_security(conn, BT_SECURITY_L2); - if (err < 0) { + /* + * If the error code is `-EBUSY`, it means the pairing/enryption is ongoing. + * Just ignore the error. + */ + if ((err < 0) && (err != -EBUSY)) { LOG_ERR("Failed to set security: %d", err); bt_conn_unref(conn); return BTP_STATUS_FAILED;