esp_ble_gap_set_device_name does not update the name
Posted: Mon Jan 31, 2022 5:51 am
I am working on the developing the program on the ESP32 device. My task requires to create a custom BLE advertising name.
I have noticed a strange issue with esp_ble_gap_set_device_name function. I have 2 questions:
1. When I pass char array to the function esp_ble_gap_set_device_name and restart the device. I can still see my device advertise the old name. I have tried to unpair the device but it is still the same. Could someone help me understand how it works and what I need to do so the BLE advertising name updates?
Now in my Lightblue App I should see my device advertise with the name "TEST_BLE" but instead it is set to something that I had before.
I have noticed a strange issue with esp_ble_gap_set_device_name function. I have 2 questions:
1. When I pass char array to the function esp_ble_gap_set_device_name and restart the device. I can still see my device advertise the old name. I have tried to unpair the device but it is still the same. Could someone help me understand how it works and what I need to do so the BLE advertising name updates?
Code: Select all
switch (event) {
case ESP_GATTS_REG_EVT:
char test_ble_name[20];
strcpy(test_ble_name,"TEST_BLE");
esp_ble_gap_set_device_name(test_ble_name);
}
...
...
...
Now in my Lightblue App I should see my device advertise with the name "TEST_BLE" but instead it is set to something that I had before.