From 0930bbddf5d3c566b173fad54b7fbe2bc8d557fa Mon Sep 17 00:00:00 2001 From: Theo Arends <11044339+arendst@users.noreply.github.com> Date: Mon, 26 Jun 2023 12:38:29 +0200 Subject: [PATCH] Fix ESP32 Matter support --- .../include/tasmota_configurations_ESP32.h | 26 +++++++++++++++++ tasmota/include/tasmota_globals.h | 2 +- tasmota/my_user_config.h | 28 ------------------- 3 files changed, 27 insertions(+), 29 deletions(-) diff --git a/tasmota/include/tasmota_configurations_ESP32.h b/tasmota/include/tasmota_configurations_ESP32.h index 0bb651734..19aa84a22 100644 --- a/tasmota/include/tasmota_configurations_ESP32.h +++ b/tasmota/include/tasmota_configurations_ESP32.h @@ -778,5 +778,31 @@ #endif // FIRMWARE_TASMOTA32 +/*********************************************************************************************\ + * Post-process compile options for Matter +\*********************************************************************************************/ + +#ifdef USE_MATTER_DEVICE + #undef USE_DISCOVERY + #define USE_DISCOVERY + +// Enable all the crypto required by Matter + #undef USE_BERRY_CRYPTO_EC_P256 + #define USE_BERRY_CRYPTO_EC_P256 + #undef USE_BERRY_CRYPTO_HMAC_SHA256 + #define USE_BERRY_CRYPTO_HMAC_SHA256 + #undef USE_BERRY_CRYPTO_HKDF_SHA256 + #define USE_BERRY_CRYPTO_HKDF_SHA256 + #undef USE_BERRY_CRYPTO_AES_CCM + #define USE_BERRY_CRYPTO_AES_CCM + #undef USE_BERRY_CRYPTO_AES_CTR + #define USE_BERRY_CRYPTO_AES_CTR + #undef USE_BERRY_CRYPTO_PBKDF2_HMAC_SHA256 + #define USE_BERRY_CRYPTO_PBKDF2_HMAC_SHA256 + #undef USE_BERRY_CRYPTO_SPAKE2P_MATTER + #define USE_BERRY_CRYPTO_SPAKE2P_MATTER + +#endif // USE_MATTER_DEVICE + #endif // ESP32 #endif // _TASMOTA_CONFIGURATIONS_ESP32_H_ diff --git a/tasmota/include/tasmota_globals.h b/tasmota/include/tasmota_globals.h index 3518899b0..ae6ec9a70 100644 --- a/tasmota/include/tasmota_globals.h +++ b/tasmota/include/tasmota_globals.h @@ -285,7 +285,7 @@ String EthernetMacAddress(void); #ifndef MQTT_CLEAN_SESSION #define MQTT_CLEAN_SESSION 1 // 0 = No clean session, 1 = Clean session (default) #endif -#ifndef MQTT_DISABLE_SSERIALRECEIVED +#ifndef MQTT_DISABLE_SSERIALRECEIVED #define MQTT_DISABLE_SSERIALRECEIVED 0 // 1 = Disable sserialreceived mqtt messages, 0 = Enable sserialreceived mqtt messages (default) #endif #ifndef MQTT_LWT_OFFLINE diff --git a/tasmota/my_user_config.h b/tasmota/my_user_config.h index 64ff38362..9cc1f0659 100644 --- a/tasmota/my_user_config.h +++ b/tasmota/my_user_config.h @@ -1292,34 +1292,6 @@ #define USE_TLS // flag indicates we need to include TLS code #endif -/*********************************************************************************************\ - * Post-process compile options for Matter -\*********************************************************************************************/ - -#ifdef ESP32 -#ifdef USE_MATTER_DEVICE - #undef USE_DISCOVERY - #define USE_DISCOVERY - -// Enable all the crypto required by Matter - #undef USE_BERRY_CRYPTO_EC_P256 - #define USE_BERRY_CRYPTO_EC_P256 - #undef USE_BERRY_CRYPTO_HMAC_SHA256 - #define USE_BERRY_CRYPTO_HMAC_SHA256 - #undef USE_BERRY_CRYPTO_HKDF_SHA256 - #define USE_BERRY_CRYPTO_HKDF_SHA256 - #undef USE_BERRY_CRYPTO_AES_CCM - #define USE_BERRY_CRYPTO_AES_CCM - #undef USE_BERRY_CRYPTO_AES_CTR - #define USE_BERRY_CRYPTO_AES_CTR - #undef USE_BERRY_CRYPTO_PBKDF2_HMAC_SHA256 - #define USE_BERRY_CRYPTO_PBKDF2_HMAC_SHA256 - #undef USE_BERRY_CRYPTO_SPAKE2P_MATTER - #define USE_BERRY_CRYPTO_SPAKE2P_MATTER - -#endif // USE_MATTER_DEVICE -#endif - /*********************************************************************************************\ * Post-process stack size adjustment \*********************************************************************************************/