diff --git a/src/NimBLEDevice.cpp b/src/NimBLEDevice.cpp index 4b20674..b78a276 100644 --- a/src/NimBLEDevice.cpp +++ b/src/NimBLEDevice.cpp @@ -1290,12 +1290,13 @@ bool NimBLEDevice::injectConfirmPasskey(const NimBLEConnInfo& peerInfo, bool acc * @param [in] deviceName The name to set. */ bool NimBLEDevice::setDeviceName(const std::string& deviceName) { +#if !defined(ESP_IDF_VERSION) || ESP_IDF_VERSION < ESP_IDF_VERSION_VAL(5, 5, 0) || CONFIG_BT_NIMBLE_GAP_SERVICE int rc = ble_svc_gap_device_name_set(deviceName.c_str()); if (rc != 0) { NIMBLE_LOGE(LOG_TAG, "Device name not set - too long"); return false; } - +#endif return true; } // setDeviceName