Create proper fix for split default conn bug
This commit is contained in:
parent
94549b4a07
commit
087574f607
2 changed files with 3 additions and 19 deletions
|
@ -124,6 +124,9 @@ config ZMK_USB
|
||||||
config BT_MAX_CONN
|
config BT_MAX_CONN
|
||||||
default 5
|
default 5
|
||||||
|
|
||||||
|
config BT_GAP_AUTO_UPDATE_CONN_PARAMS
|
||||||
|
default n
|
||||||
|
|
||||||
endif
|
endif
|
||||||
|
|
||||||
endchoice
|
endchoice
|
||||||
|
|
|
@ -76,29 +76,10 @@ static void security_changed(struct bt_conn *conn, bt_security_t level,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#if !IS_ENABLED(CONFIG_ZMK_SPLIT_BLE_ROLE_PERIPHERAL)
|
|
||||||
static bool le_param_req(struct bt_conn *conn, struct bt_le_conn_param *param) {
|
|
||||||
static struct bt_conn_info info;
|
|
||||||
|
|
||||||
bt_conn_get_info(conn, &info);
|
|
||||||
|
|
||||||
/* This captures a param change from central half of a split board connection
|
|
||||||
to stop default params from getting set over the top of our preferred ones */
|
|
||||||
if (info.role == BT_CONN_ROLE_MASTER && (param->interval_min != 6 || param->latency != 30)) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
static struct bt_conn_cb conn_callbacks = {
|
static struct bt_conn_cb conn_callbacks = {
|
||||||
.connected = connected,
|
.connected = connected,
|
||||||
.disconnected = disconnected,
|
.disconnected = disconnected,
|
||||||
.security_changed = security_changed,
|
.security_changed = security_changed,
|
||||||
#if !IS_ENABLED(CONFIG_ZMK_SPLIT_BLE_ROLE_PERIPHERAL)
|
|
||||||
.le_param_req = le_param_req,
|
|
||||||
#endif
|
|
||||||
};
|
};
|
||||||
|
|
||||||
static void auth_passkey_display(struct bt_conn *conn, unsigned int passkey)
|
static void auth_passkey_display(struct bt_conn *conn, unsigned int passkey)
|
||||||
|
|
Loading…
Reference in a new issue