feat(config): 添加 hci_ipc 网络核配置,优化 DLE 和 ACL 缓冲区设置

This commit is contained in:
2026-05-15 21:34:50 +08:00
parent 0979866a7c
commit 06b1f64213
5 changed files with 47 additions and 12 deletions
+11 -1
View File
@@ -62,6 +62,7 @@ static void disconnected(struct bt_conn *conn, uint8_t reason) {
/** @brief NUS 通知使能状态回调。 */
static void nus_send_enabled(enum bt_nus_send_status status) {
nus_notification_enabled = (status == BT_NUS_SEND_STATUS_ENABLED);
LOG_INF("NUS send_enabled: status=%d, enabled=%d", status, nus_notification_enabled);
}
/**
@@ -106,10 +107,19 @@ void ble_transport_adv_start(void) {
}
void ble_transport_send(const uint8_t *data, uint16_t len) {
static bool first_send_logged = false;
if (!nus_notification_enabled || !current_conn) return;
for (int i = 0; i < 3; i++) {
if (bt_nus_send(current_conn, data, len) == 0) return;
int err = bt_nus_send(current_conn, data, len);
if (err == 0) {
if (!first_send_logged) {
LOG_INF("First NUS send OK (len=%u)", len);
first_send_logged = true;
}
return;
}
k_usleep(500);
}
LOG_WRN("NUS send failed after retries (len=%u)", len);