我们尝试在bluetooth_init();成功之后调用esp_bt_dev_set_device_name来修改代码,但是不成功。
请问应该如何修改这个默认名称?
请教:ble mesh的例程运行之后设备名称总是ESP-BLE-MESH,请问怎么修改这个名称?
-
- Posts: 1
- Joined: Wed Aug 02, 2023 6:39 am
-
- Posts: 132
- Joined: Thu Nov 15, 2018 2:06 am
Re: 请教:ble mesh的例程运行之后设备名称总是ESP-BLE-MESH,请问怎么修改这个名称?
/**
* @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
* @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
Who is online
Users browsing this forum: No registered users and 135 guests