feat(bt/blufi): Support Blufi start advertising with specified name

This commit is contained in:
chenjianhua
2024-12-18 17:25:00 +08:00
committed by BLE BOT
parent ee064300cd
commit ea8bcdc360
4 changed files with 28 additions and 1 deletions

View File

@@ -45,6 +45,13 @@ esp_err_t esp_blufi_host_init(void)
}
BLUFI_INFO("BD ADDR: "ESP_BD_ADDR_STR"\n", ESP_BD_ADDR_HEX(esp_bt_dev_get_address()));
/* Set the default device name */
ret = esp_ble_gap_set_device_name(BLUFI_DEVICE_NAME);
if (ret) {
BLUFI_ERROR("%s set device name failed: %s\n", __func__, esp_err_to_name(ret));
return ESP_FAIL;
}
return ESP_OK;
}