fix(gml670x4): 补充 BLE 广播与扫描响应名称配置
This commit is contained in:
@@ -8,6 +8,16 @@ CONFIG_BT_NUS=y
|
||||
# 借鉴 Kiwii: 禁用 NUS 安全限制,提高连接成功率
|
||||
CONFIG_BT_NUS_SECURITY_ENABLED=n
|
||||
|
||||
# SMP 配对与绑定
|
||||
CONFIG_BT_SMP=y
|
||||
CONFIG_BT_SETTINGS=y
|
||||
CONFIG_BT_KEYS_OVERWRITE_OLDEST=y
|
||||
CONFIG_FLASH=y
|
||||
CONFIG_FLASH_MAP=y
|
||||
CONFIG_NVS=y
|
||||
CONFIG_SETTINGS=y
|
||||
CONFIG_SETTINGS_NVS=y
|
||||
|
||||
# 借鉴 Kiwii: 优化缓冲区 (匹配硬件)
|
||||
CONFIG_BT_BUF_ACL_TX_COUNT=3
|
||||
CONFIG_BT_L2CAP_TX_BUF_COUNT=3
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
#include <zephyr/bluetooth/uuid.h>
|
||||
#include <zephyr/kernel.h>
|
||||
#include <zephyr/logging/log.h>
|
||||
#include <zephyr/settings/settings.h>
|
||||
|
||||
LOG_MODULE_REGISTER(ble_transport, LOG_LEVEL_INF);
|
||||
|
||||
@@ -138,6 +139,8 @@ int ble_transport_init(void) {
|
||||
return err;
|
||||
}
|
||||
|
||||
settings_load();
|
||||
|
||||
err = bt_nus_init(&nus_cb);
|
||||
if (err) {
|
||||
LOG_ERR("NUS init failed (err %d)", err);
|
||||
|
||||
Reference in New Issue
Block a user