Hello,
While building the esp ble mesh, the name of the node displayed while provisioning is displayed as the "ESP-BLE-MESH", I want to change the name to something else. Please let me know the procedure for that.
Change the name of the node in the esp ble mesh
Re: Change the name of the node in the esp ble mesh
EDIT: Don't use this method, see my later reply.
The name is set in "components/bt/esp_ble_mesh/mesh_core/proxy_server.c", on line 1442:
You can trace this back up to figure out an appropriate point to insert your own name, or simply replace this string.
The name is set in "components/bt/esp_ble_mesh/mesh_core/proxy_server.c", on line 1442:
Code: Select all
strncpy(device_name, "ESP-BLE-MESH", DEVICE_NAME_SIZE);
Last edited by ZacDaMan on Fri Feb 04, 2022 2:09 am, edited 2 times in total.
Re: Change the name of the node in the esp ble mesh
thanks man!
ZacDaMan wrote: ↑Mon Jan 10, 2022 11:03 pmThe name is set in "components/bt/esp_ble_mesh/mesh_core/proxy_server.c", on line 1442:
`strncpy(device_name, "ESP-BLE-MESH", DEVICE_NAME_SIZE);
You can trace this back up to figure out an appropriate point to insert your own name, or simply replace this string.
Re: Change the name of the node in the esp ble mesh
OK since posting that earlier reply I've found a much better solution (even though it's old, putting it here for others with this issue), and it turns out there's just a function which wasn't in any of the documentation I had read called which means you don't have to muck around with ESP-IDF's source code and can leave proxy_server.c alone. Call it after calling . Makes sense there would be a function for it, just took me forever to actually find it!
https://docs.espressif.com/projects/esp ... evice.html
Code: Select all
esp_bt_dev_set_device_name(const char* name)
Code: Select all
esp_bluedroid_enable()
https://docs.espressif.com/projects/esp ... evice.html
Re: Change the name of the node in the esp ble mesh
Thanks man for the info!!
-
- Posts: 10
- Joined: Wed Feb 03, 2021 7:54 am
Re: Change the name of the node in the esp ble mesh
Just wanted to point out that for the ESP32-C3, it can be done by
Code: Select all
bt_mesh_set_device_name(const char *name);
Who is online
Users browsing this forum: Google [Bot] and 75 guests