Change the Bluetooth device name to "Xiaozhi-Blufi" in blufi provisioning. (#1701)

This commit is contained in:
Wang is proud
2026-01-28 01:51:42 +08:00
committed by GitHub
parent 7ad22d49af
commit f6ca040d19
2 changed files with 47 additions and 43 deletions

View File

@@ -34,3 +34,4 @@ BluFi
- 若多次测试,建议清除或覆盖存储的 SSID`wifi` 命名空间),避免旧配置干扰。
- 如果使用自定义 BluFi 客户端,需遵循官方协议帧格式,参考上文官方文档链接。
- 官方文档中已提供EspBlufi APP下载地址
- 由于IDF5.5.2的blufi接口发生变化,5.5.2版本编译后蓝牙名称为"Xiaozhi-Blufi",5.5.1版本中蓝牙名称为"BLUFI_DEVICE"

View File

@@ -12,6 +12,8 @@
#include "freertos/task.h"
#include "wifi_manager.h"
#define BLUFI_DEVICE_NAME "Xiaozhi-Blufi"
#ifdef CONFIG_BT_BLUEDROID_ENABLED
#include "esp_bt_device.h"
#include "esp_bt_main.h"
@@ -648,6 +650,7 @@ void Blufi::_handle_event(esp_blufi_cb_event_t event, esp_blufi_cb_param_t *para
switch (event) {
case ESP_BLUFI_EVENT_INIT_FINISH:
ESP_LOGI(BLUFI_TAG, "BLUFI init finish");
esp_ble_gap_set_device_name(BLUFI_DEVICE_NAME);
esp_blufi_adv_start();
break;
case ESP_BLUFI_EVENT_DEINIT_FINISH: