diff --git a/config/esp32/components/chip/Kconfig b/config/esp32/components/chip/Kconfig index 9acf9395f18459..4fb3fe4fe63a48 100644 --- a/config/esp32/components/chip/Kconfig +++ b/config/esp32/components/chip/Kconfig @@ -286,11 +286,17 @@ menu "CHIP Device Layer" persistent storage (e.g. by a factory provisioning process). config DEVICE_SOFTWARE_VERSION - string "Device Software Version" + string "Device Software Version String" default "" help A string identifying the software version running on the device. + config DEVICE_SOFTWARE_VERSION_NUMBER + int "Device Software Version Number" + default 1 + help + Software version number running on the device. + config DEVICE_TYPE int "Default Device type" default 0 diff --git a/examples/ota-requestor-app/esp32/sdkconfig.defaults b/examples/ota-requestor-app/esp32/sdkconfig.defaults index ac8d7d38f4e065..1114acc792f2b8 100644 --- a/examples/ota-requestor-app/esp32/sdkconfig.defaults +++ b/examples/ota-requestor-app/esp32/sdkconfig.defaults @@ -55,3 +55,4 @@ CONFIG_ESPTOOLPY_FLASHSIZE="4MB" # Enable OTA Requestor CONFIG_ENABLE_OTA_REQUESTOR=y +CONFIG_DEVICE_SOFTWARE_VERSION_NUMBER=2 diff --git a/src/platform/ESP32/CHIPDevicePlatformConfig.h b/src/platform/ESP32/CHIPDevicePlatformConfig.h index b4d973f53b8191..20ea0109cdd1bb 100644 --- a/src/platform/ESP32/CHIPDevicePlatformConfig.h +++ b/src/platform/ESP32/CHIPDevicePlatformConfig.h @@ -42,6 +42,7 @@ #define CHIP_DEVICE_CONFIG_DEVICE_TYPE CONFIG_DEVICE_TYPE #define CHIP_DEVICE_CONFIG_DEFAULT_DEVICE_HARDWARE_VERSION CONFIG_DEFAULT_DEVICE_HARDWARE_VERSION #define CHIP_DEVICE_CONFIG_DEVICE_SOFTWARE_VERSION_STRING CONFIG_DEVICE_SOFTWARE_VERSION +#define CHIP_DEVICE_CONFIG_DEVICE_SOFTWARE_VERSION CONFIG_DEVICE_SOFTWARE_VERSION_NUMBER #define CHIP_DEVICE_CONFIG_ENABLE_THREAD CONFIG_OPENTHREAD_ENABLED #define CHIP_DEVICE_CONFIG_ENABLE_THREAD_SRP_CLIENT CONFIG_OPENTHREAD_SRP_CLIENT diff --git a/src/platform/ESP32/bluedroid/BLEManagerImpl.cpp b/src/platform/ESP32/bluedroid/BLEManagerImpl.cpp index cc76952871c069..808a6ba0b029bd 100644 --- a/src/platform/ESP32/bluedroid/BLEManagerImpl.cpp +++ b/src/platform/ESP32/bluedroid/BLEManagerImpl.cpp @@ -964,12 +964,10 @@ void BLEManagerImpl::HandleGATTCommEvent(esp_gatts_cb_event_t event, esp_gatt_if // possibly not fitting. There's no way to suppress that warning // via explicit cast; we have to disable the warning around the // assignment. - // - // TODO: https://github.com/project-chip/connectedhomeip/issues/2569 - // tracks making this safe with a check or explaining why no check - // is needed. #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wconversion" + // As per the BLE specification, the maximum MTU value can be 517 bytes. + // This can be accomodated in 10 bits conState->MTU = param->mtu.mtu; #pragma GCC diagnostic pop }