diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 3664625..a3da75f 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -17,7 +17,7 @@ jobs: # See https://hub.docker.com/r/espressif/idf/tags and # https://docs.espressif.com/projects/esp-idf/en/latest/esp32/api-guides/tools/idf-docker-image.html # for details. - idf_ver: ["release-v4.4", "release-v5.4"] + idf_ver: ["release-v4.4", "release-v5.4", "release-v5.5"] idf_target: ["esp32", "esp32s3", "esp32c2", "esp32c3", "esp32c5", "esp32c6", "esp32h2", "esp32p4"] example: - NimBLE_Client diff --git a/src/NimBLECharacteristic.cpp b/src/NimBLECharacteristic.cpp index 831f51d..1ffa2bd 100644 --- a/src/NimBLECharacteristic.cpp +++ b/src/NimBLECharacteristic.cpp @@ -18,8 +18,8 @@ # include "NimBLECharacteristic.h" #if CONFIG_BT_NIMBLE_ENABLED && MYNEWT_VAL(BLE_ROLE_PERIPHERAL) -#if defined(ESP_IDF_VERSION_MAJOR) -# if defined(CONFIG_NIMBLE_CPP_IDF) && ESP_IDF_VERSION_MAJOR < 5 +#if defined(CONFIG_NIMBLE_CPP_IDF) +# if !defined(ESP_IDF_VERSION_MAJOR) || ESP_IDF_VERSION_MAJOR < 5 # define ble_gatts_notify_custom ble_gattc_notify_custom # define ble_gatts_indicate_custom ble_gattc_indicate_custom # endif diff --git a/src/NimBLEDevice.cpp b/src/NimBLEDevice.cpp index e7a7c68..2586af4 100644 --- a/src/NimBLEDevice.cpp +++ b/src/NimBLEDevice.cpp @@ -1290,7 +1290,7 @@ 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 +#if !defined(MYNEWT_VAL_BLE_GATTS) || MYNEWT_VAL(BLE_GATTS) > 0 int rc = ble_svc_gap_device_name_set(deviceName.c_str()); if (rc != 0) { NIMBLE_LOGE(LOG_TAG, "Device name not set - too long");