feat(bt/blufi): Support Blufi start advertising with specified name
(cherry picked from commit ea8bcdc360b2c2d2caee8e48fe3161f42605545a) Co-authored-by: chenjianhua <chenjianhua@espressif.com>
This commit is contained in:
@@ -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;
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user