Page 1 of 1

请教:ble mesh的例程运行之后设备名称总是ESP-BLE-MESH,请问怎么修改这个名称?

Posted: Wed Aug 02, 2023 6:46 am
by hhaahhaahhaa
我们尝试在bluetooth_init();成功之后调用esp_bt_dev_set_device_name来修改代码,但是不成功。
请问应该如何修改这个默认名称?

Re: 请教:ble mesh的例程运行之后设备名称总是ESP-BLE-MESH,请问怎么修改这个名称?

Posted: Tue Aug 08, 2023 7:30 am
by ESP_@In逍遥子
/**
* @brief Using this function, an unprovisioned device can set its own device name,
* which will be broadcasted in its advertising data.
*
* @param[in] name: Unprovisioned device name
*
* @note This API applicable to PB-GATT mode only by setting the name to the scan response data,
* it doesn't apply to PB-ADV mode.
*
* @return ESP_OK on success or error code otherwise.
*
*/
esp_err_t esp_ble_mesh_set_unprovisioned_device_name(const char *name);

使用这个 API