docs(ble/bluedroid): Optimize BLE example documentation

This commit is contained in:
zhanghaipeng
2024-12-17 14:28:52 +08:00
parent 9c38d1f29e
commit 74461ca835
8 changed files with 46 additions and 31 deletions
@@ -458,6 +458,8 @@ static void esp_gap_cb(esp_gap_ble_cb_event_t event, esp_ble_gap_cb_param_t *par
ESP_LOG_BUFFER_CHAR(GATTC_TAG, adv_name, adv_name_len);
if (adv_name != NULL) {
if (strlen(remote_device_name) == adv_name_len && strncmp((char *)adv_name, remote_device_name, adv_name_len) == 0) {
// Note: If there are multiple devices with the same device name, the device may connect to an unintended one.
// It is recommended to change the default device name to ensure it is unique.
ESP_LOGI(GATTC_TAG, "Device found %s", remote_device_name);
if (connect == false) {
connect = true;