diff --git a/examples/platform/silabs/SiWx917/BUILD.gn b/examples/platform/silabs/SiWx917/BUILD.gn index fcc82cb3811d55..2d7b1ec9c8592e 100644 --- a/examples/platform/silabs/SiWx917/BUILD.gn +++ b/examples/platform/silabs/SiWx917/BUILD.gn @@ -147,14 +147,14 @@ source_set("siwx917-attestation-credentials") { public_configs = [ ":attestation-credentials-config" ] } -source_set("siwx917-factory-data-provider") { +source_set("silabs-factory-data-provider") { if (siwx917_commissionable_data) { defines = [ "SIWX917_USE_COMISSIONABLE_DATA=1" ] } sources = [ - "SiWx917DeviceDataProvider.cpp", - "SiWx917DeviceDataProvider.h", + "${silabs_common_plat_dir}/SilabsDeviceDataProvider.cpp", + "${silabs_common_plat_dir}/SilabsDeviceDataProvider.h", ] public_deps = [ @@ -291,7 +291,7 @@ source_set("siwx917-common") { # Factory Data Provider if (use_efr32_factory_data_provider) { - public_deps += [ ":siwx917-factory-data-provider" ] + public_deps += [ ":silabs-factory-data-provider" ] } public_deps += [ diff --git a/examples/platform/silabs/SiWx917/BaseApplication.cpp b/examples/platform/silabs/SiWx917/BaseApplication.cpp index b0f3809876ab49..4ed8ea273e0a5f 100644 --- a/examples/platform/silabs/SiWx917/BaseApplication.cpp +++ b/examples/platform/silabs/SiWx917/BaseApplication.cpp @@ -36,7 +36,7 @@ #endif // QR_CODE_ENABLED #endif // DISPLAY_ENABLED -#include "SiWx917DeviceDataProvider.h" +#include "SilabsDeviceDataProvider.h" #include "rsi_board.h" #include "rsi_chip.h" #include "siwx917_utils.h" @@ -214,7 +214,7 @@ CHIP_ERROR BaseApplication::Init(Identify * identifyObj) char qrCodeBuffer[chip::QRCodeBasicSetupPayloadGenerator::kMaxQRCodeBase38RepresentationLength + 1]; chip::MutableCharSpan QRCode(qrCodeBuffer); - if (SIWx917::SIWx917DeviceDataProvider::GetDeviceDataProvider().GetSetupPayload(QRCode) == CHIP_NO_ERROR) + if (Silabs::SilabsDeviceDataProvider::GetDeviceDataProvider().GetSetupPayload(QRCode) == CHIP_NO_ERROR) { // Print setup info on LCD if available #ifdef QR_CODE_ENABLED diff --git a/examples/platform/silabs/SiWx917/SiWx917DeviceDataProvider.h b/examples/platform/silabs/SiWx917/SiWx917DeviceDataProvider.h deleted file mode 100644 index 2301a21644206d..00000000000000 --- a/examples/platform/silabs/SiWx917/SiWx917DeviceDataProvider.h +++ /dev/null @@ -1,70 +0,0 @@ -/* - * - * Copyright (c) 2022 Project CHIP Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -#pragma once - -#include -#include - -namespace chip { -namespace DeviceLayer { -namespace SIWx917 { - -/** - * @brief This class provides Commissionable data, Device Attestation Credentials, - * and Device Instance Info. - */ - -class SIWx917DeviceDataProvider : public CommissionableDataProvider, - public Internal::GenericDeviceInstanceInfoProvider -{ -public: - SIWx917DeviceDataProvider() : - CommissionableDataProvider(), Internal::GenericDeviceInstanceInfoProvider( - ConfigurationManagerImpl::GetDefaultInstance()) - {} - - static SIWx917DeviceDataProvider & GetDeviceDataProvider(); - CHIP_ERROR GetSetupPayload(MutableCharSpan & payloadBuf); -#ifdef SIWX917_USE_COMISSIONABLE_DATA - void setupPayload(uint8_t * outBuf); - CHIP_ERROR FlashFactoryData(); -#endif /* SIWX917_USE_COMISSIONABLE_DATA */ - // ===== Members functions that implement the CommissionableDataProvider - CHIP_ERROR GetSetupDiscriminator(uint16_t & setupDiscriminator) override; - CHIP_ERROR SetSetupDiscriminator(uint16_t setupDiscriminator) override { return CHIP_ERROR_NOT_IMPLEMENTED; } - CHIP_ERROR GetSpake2pIterationCount(uint32_t & iterationCount) override; - CHIP_ERROR GetSpake2pSalt(MutableByteSpan & saltBuf) override; - CHIP_ERROR GetSpake2pVerifier(MutableByteSpan & verifierBuf, size_t & verifierLen) override; - // Per spec 5.1.7. Passcode cannot be stored on the device - CHIP_ERROR GetSetupPasscode(uint32_t & setupPasscode) override { return CHIP_ERROR_NOT_IMPLEMENTED; }; - CHIP_ERROR SetSetupPasscode(uint32_t setupPasscode) override { return CHIP_ERROR_NOT_IMPLEMENTED; } - - // ===== Members functions that implement the GenericDeviceInstanceInfoProvider - CHIP_ERROR GetVendorName(char * buf, size_t bufSize) override; - CHIP_ERROR GetVendorId(uint16_t & vendorId) override; - CHIP_ERROR GetProductName(char * buf, size_t bufSize) override; - CHIP_ERROR GetProductId(uint16_t & productId) override; - CHIP_ERROR GetHardwareVersionString(char * buf, size_t bufSize) override; - CHIP_ERROR GetRotatingDeviceIdUniqueId(MutableByteSpan & uniqueIdSpan) override; - CHIP_ERROR GetSerialNumber(char * buf, size_t bufSize) override; - CHIP_ERROR GetManufacturingDate(uint16_t & year, uint8_t & month, uint8_t & day) override; - CHIP_ERROR GetHardwareVersion(uint16_t & hardwareVersion) override; -}; - -} // namespace SIWx917 -} // namespace DeviceLayer -} // namespace chip diff --git a/examples/platform/silabs/SiWx917/matter_config.cpp b/examples/platform/silabs/SiWx917/matter_config.cpp index e49b743f01164c..c41e008dea7ae5 100644 --- a/examples/platform/silabs/SiWx917/matter_config.cpp +++ b/examples/platform/silabs/SiWx917/matter_config.cpp @@ -54,7 +54,7 @@ using namespace ::chip::DeviceLayer; #include // If building with the SiWx917-provided crypto backend, we can use the -#include "SiWx917DeviceDataProvider.h" +#include "SilabsDeviceDataProvider.h" #if EFR32_OTA_ENABLED void SilabsMatterConfig::InitOTARequestorHandler(System::Layer * systemLayer, void * appState) @@ -112,11 +112,11 @@ CHIP_ERROR SilabsMatterConfig::InitMatter(const char * appName) } ReturnErrorOnFailure(PlatformMgr().InitChipStack()); - SetDeviceInstanceInfoProvider(&SIWx917::SIWx917DeviceDataProvider::GetDeviceDataProvider()); - SetCommissionableDataProvider(&SIWx917::SIWx917DeviceDataProvider::GetDeviceDataProvider()); + SetDeviceInstanceInfoProvider(&Silabs::SilabsDeviceDataProvider::GetDeviceDataProvider()); + SetCommissionableDataProvider(&Silabs::SilabsDeviceDataProvider::GetDeviceDataProvider()); #ifdef SIWX917_USE_COMISSIONABLE_DATA - err = SIWx917::SIWx917DeviceDataProvider::GetDeviceDataProvider().FlashFactoryData(); + err = Silabs::SilabsDeviceDataProvider::GetDeviceDataProvider().FlashFactoryData(); if (err != CHIP_NO_ERROR) { SILABS_LOG("Flashing to the device failed"); diff --git a/examples/platform/silabs/SiWx917/SiWx917DeviceDataProvider.cpp b/examples/platform/silabs/SilabsDeviceDataProvider.cpp similarity index 87% rename from examples/platform/silabs/SiWx917/SiWx917DeviceDataProvider.cpp rename to examples/platform/silabs/SilabsDeviceDataProvider.cpp index 30cc5172081c06..4c87804c72c706 100644 --- a/examples/platform/silabs/SiWx917/SiWx917DeviceDataProvider.cpp +++ b/examples/platform/silabs/SilabsDeviceDataProvider.cpp @@ -15,24 +15,21 @@ * limitations under the License. */ -#include "SiWx917DeviceDataProvider.h" -#include "DeviceConfig.h" -#include "siwx917_utils.h" +#include "SilabsDeviceDataProvider.h" #include #include #include -#include #include -#include #include namespace chip { namespace DeviceLayer { -namespace SIWx917 { -#include +namespace Silabs { + // using namespace chip::Credentials; using namespace chip::DeviceLayer::Internal; +// TODO Remove once Commander supports (doesn't erase) NVM3 for 917 #ifdef SIWX917_USE_COMISSIONABLE_DATA void SIWx917DeviceDataProvider::setupPayload(uint8_t * outBuf) { @@ -167,7 +164,7 @@ CHIP_ERROR SIWx917DeviceDataProvider::FlashFactoryData() } #endif -CHIP_ERROR SIWx917DeviceDataProvider::GetSetupDiscriminator(uint16_t & setupDiscriminator) +CHIP_ERROR SilabsDeviceDataProvider::GetSetupDiscriminator(uint16_t & setupDiscriminator) { CHIP_ERROR err; uint32_t setupDiscriminator32; @@ -186,9 +183,10 @@ CHIP_ERROR SIWx917DeviceDataProvider::GetSetupDiscriminator(uint16_t & setupDisc return CHIP_NO_ERROR; } -CHIP_ERROR SIWx917DeviceDataProvider::GetSpake2pIterationCount(uint32_t & iterationCount) +CHIP_ERROR SilabsDeviceDataProvider::GetSpake2pIterationCount(uint32_t & iterationCount) { CHIP_ERROR err = SilabsConfig::ReadConfigValue(SilabsConfig::kConfigKey_Spake2pIterationCount, iterationCount); + #if defined(CHIP_DEVICE_CONFIG_USE_TEST_SPAKE2P_ITERATION_COUNT) && CHIP_DEVICE_CONFIG_USE_TEST_SPAKE2P_ITERATION_COUNT if (err == CHIP_DEVICE_ERROR_CONFIG_NOT_FOUND) { @@ -199,7 +197,7 @@ CHIP_ERROR SIWx917DeviceDataProvider::GetSpake2pIterationCount(uint32_t & iterat return err; } -CHIP_ERROR SIWx917DeviceDataProvider::GetSpake2pSalt(MutableByteSpan & saltBuf) +CHIP_ERROR SilabsDeviceDataProvider::GetSpake2pSalt(MutableByteSpan & saltBuf) { static constexpr size_t kSpake2pSalt_MaxBase64Len = BASE64_ENCODED_LEN(chip::Crypto::kSpake2p_Max_PBKDF_Salt_Length) + 1; @@ -208,6 +206,7 @@ CHIP_ERROR SIWx917DeviceDataProvider::GetSpake2pSalt(MutableByteSpan & saltBuf) size_t saltB64Len = 0; err = SilabsConfig::ReadConfigValueStr(SilabsConfig::kConfigKey_Spake2pSalt, saltB64, sizeof(saltB64), saltB64Len); + #if defined(CHIP_DEVICE_CONFIG_USE_TEST_SPAKE2P_SALT) if (err == CHIP_DEVICE_ERROR_CONFIG_NOT_FOUND) { @@ -230,7 +229,7 @@ CHIP_ERROR SIWx917DeviceDataProvider::GetSpake2pSalt(MutableByteSpan & saltBuf) return CHIP_NO_ERROR; } -CHIP_ERROR SIWx917DeviceDataProvider::GetSpake2pVerifier(MutableByteSpan & verifierBuf, size_t & verifierLen) +CHIP_ERROR SilabsDeviceDataProvider::GetSpake2pVerifier(MutableByteSpan & verifierBuf, size_t & verifierLen) { static constexpr size_t kSpake2pSerializedVerifier_MaxBase64Len = BASE64_ENCODED_LEN(chip::Crypto::kSpake2p_VerifierSerialized_Length) + 1; @@ -241,6 +240,7 @@ CHIP_ERROR SIWx917DeviceDataProvider::GetSpake2pVerifier(MutableByteSpan & verif err = SilabsConfig::ReadConfigValueStr(SilabsConfig::kConfigKey_Spake2pVerifier, verifierB64, sizeof(verifierB64), verifierB64Len); + #if defined(CHIP_DEVICE_CONFIG_USE_TEST_SPAKE2P_VERIFIER) if (err == CHIP_DEVICE_ERROR_CONFIG_NOT_FOUND) { @@ -262,13 +262,15 @@ CHIP_ERROR SIWx917DeviceDataProvider::GetSpake2pVerifier(MutableByteSpan & verif return CHIP_NO_ERROR; } -CHIP_ERROR SIWx917DeviceDataProvider::GetSetupPayload(MutableCharSpan & payloadBuf) +CHIP_ERROR SilabsDeviceDataProvider::GetSetupPayload(MutableCharSpan & payloadBuf) { CHIP_ERROR err = CHIP_NO_ERROR; uint8_t payloadBitSet[kTotalPayloadDataSizeInBytes] = { 0 }; size_t bitSetLen = 0; + err = SilabsConfig::ReadConfigValueBin(SilabsConfig::kConfigKey_SetupPayloadBitSet, payloadBitSet, kTotalPayloadDataSizeInBytes, bitSetLen); + #if defined(CHIP_DEVICE_CONFIG_USE_TEST_SETUP_PIN_CODE) && CHIP_DEVICE_CONFIG_USE_TEST_SETUP_PIN_CODE if (err == CHIP_DEVICE_ERROR_CONFIG_NOT_FOUND) { @@ -300,18 +302,19 @@ CHIP_ERROR SIWx917DeviceDataProvider::GetSetupPayload(MutableCharSpan & payloadB return err; } -CHIP_ERROR SIWx917DeviceDataProvider::GetVendorName(char * buf, size_t bufSize) +CHIP_ERROR SilabsDeviceDataProvider::GetVendorName(char * buf, size_t bufSize) { size_t vendorNameLen = 0; // without counting null-terminator return SilabsConfig::ReadConfigValueStr(SilabsConfig::kConfigKey_VendorName, buf, bufSize, vendorNameLen); } -CHIP_ERROR SIWx917DeviceDataProvider::GetVendorId(uint16_t & vendorId) +CHIP_ERROR SilabsDeviceDataProvider::GetVendorId(uint16_t & vendorId) { ChipError err = CHIP_NO_ERROR; uint32_t vendorId32 = 0; err = SilabsConfig::ReadConfigValue(SilabsConfig::kConfigKey_VendorId, vendorId32); + #if defined(CHIP_DEVICE_CONFIG_DEVICE_VENDOR_ID) && CHIP_DEVICE_CONFIG_DEVICE_VENDOR_ID if (err == CHIP_DEVICE_ERROR_CONFIG_NOT_FOUND) { @@ -325,18 +328,19 @@ CHIP_ERROR SIWx917DeviceDataProvider::GetVendorId(uint16_t & vendorId) return err; } -CHIP_ERROR SIWx917DeviceDataProvider::GetProductName(char * buf, size_t bufSize) +CHIP_ERROR SilabsDeviceDataProvider::GetProductName(char * buf, size_t bufSize) { size_t productNameLen = 0; // without counting null-terminator return SilabsConfig::ReadConfigValueStr(SilabsConfig::kConfigKey_ProductName, buf, bufSize, productNameLen); } -CHIP_ERROR SIWx917DeviceDataProvider::GetProductId(uint16_t & productId) +CHIP_ERROR SilabsDeviceDataProvider::GetProductId(uint16_t & productId) { ChipError err = CHIP_NO_ERROR; uint32_t productId32 = 0; err = SilabsConfig::ReadConfigValue(SilabsConfig::kConfigKey_ProductId, productId32); + #if defined(CHIP_DEVICE_CONFIG_DEVICE_PRODUCT_ID) && CHIP_DEVICE_CONFIG_DEVICE_PRODUCT_ID if (err == CHIP_DEVICE_ERROR_CONFIG_NOT_FOUND) { @@ -350,7 +354,7 @@ CHIP_ERROR SIWx917DeviceDataProvider::GetProductId(uint16_t & productId) return err; } -CHIP_ERROR SIWx917DeviceDataProvider::GetHardwareVersionString(char * buf, size_t bufSize) +CHIP_ERROR SilabsDeviceDataProvider::GetHardwareVersionString(char * buf, size_t bufSize) { size_t hardwareVersionStringLen = 0; // without counting null-terminator CHIP_ERROR err = @@ -365,7 +369,7 @@ CHIP_ERROR SIWx917DeviceDataProvider::GetHardwareVersionString(char * buf, size_ return err; } -CHIP_ERROR SIWx917DeviceDataProvider::GetHardwareVersion(uint16_t & hardwareVersion) +CHIP_ERROR SilabsDeviceDataProvider::GetHardwareVersion(uint16_t & hardwareVersion) { CHIP_ERROR err; uint32_t hardwareVersion32; @@ -383,7 +387,7 @@ CHIP_ERROR SIWx917DeviceDataProvider::GetHardwareVersion(uint16_t & hardwareVers return err; } -CHIP_ERROR SIWx917DeviceDataProvider::GetRotatingDeviceIdUniqueId(MutableByteSpan & uniqueIdSpan) +CHIP_ERROR SilabsDeviceDataProvider::GetRotatingDeviceIdUniqueId(MutableByteSpan & uniqueIdSpan) { ChipError err = CHIP_ERROR_WRONG_KEY_TYPE; #if CHIP_ENABLE_ROTATING_DEVICE_ID @@ -411,13 +415,13 @@ CHIP_ERROR SIWx917DeviceDataProvider::GetRotatingDeviceIdUniqueId(MutableByteSpa return err; } -CHIP_ERROR SIWx917DeviceDataProvider::GetSerialNumber(char * buf, size_t bufSize) +CHIP_ERROR SilabsDeviceDataProvider::GetSerialNumber(char * buf, size_t bufSize) { size_t serialNumberLen = 0; // without counting null-terminator return SilabsConfig::ReadConfigValueStr(SilabsConfig::kConfigKey_SerialNum, buf, bufSize, serialNumberLen); } -CHIP_ERROR SIWx917DeviceDataProvider::GetManufacturingDate(uint16_t & year, uint8_t & month, uint8_t & day) +CHIP_ERROR SilabsDeviceDataProvider::GetManufacturingDate(uint16_t & year, uint8_t & month, uint8_t & day) { CHIP_ERROR err; constexpr uint8_t kDateStringLength = 10; // YYYY-MM-DD @@ -452,15 +456,32 @@ CHIP_ERROR SIWx917DeviceDataProvider::GetManufacturingDate(uint16_t & year, uint ChipLogError(DeviceLayer, "Invalid manufacturing date: %s", dateStr); } return err; - return CHIP_ERROR_NOT_IMPLEMENTED; } -SIWx917DeviceDataProvider & SIWx917DeviceDataProvider::GetDeviceDataProvider() +CHIP_ERROR SilabsDeviceDataProvider::GetPartNumber(char * buf, size_t bufSize) +{ + size_t partNumberLen = 0; // without counting null-terminator + return SilabsConfig::ReadConfigValueStr(SilabsConfig::kConfigKey_PartNumber, buf, bufSize, partNumberLen); +} + +CHIP_ERROR SilabsDeviceDataProvider::GetProductURL(char * buf, size_t bufSize) +{ + size_t productUrlLen = 0; // without counting null-terminator + return SilabsConfig::ReadConfigValueStr(SilabsConfig::kConfigKey_ProductURL, buf, bufSize, productUrlLen); +} + +CHIP_ERROR SilabsDeviceDataProvider::GetProductLabel(char * buf, size_t bufSize) +{ + size_t productLabelLen = 0; // without counting null-terminator + return SilabsConfig::ReadConfigValueStr(SilabsConfig::KConfigKey_ProductLabel, buf, bufSize, productLabelLen); +} + +SilabsDeviceDataProvider & SilabsDeviceDataProvider::GetDeviceDataProvider() { - static SIWx917DeviceDataProvider sDataProvider; + static SilabsDeviceDataProvider sDataProvider; return sDataProvider; } -} // namespace SIWx917 +} // namespace Silabs } // namespace DeviceLayer } // namespace chip diff --git a/examples/platform/silabs/efr32/EFR32DeviceDataProvider.h b/examples/platform/silabs/SilabsDeviceDataProvider.h similarity index 84% rename from examples/platform/silabs/efr32/EFR32DeviceDataProvider.h rename to examples/platform/silabs/SilabsDeviceDataProvider.h index 7426905525df38..8bb04fea7d39f5 100644 --- a/examples/platform/silabs/efr32/EFR32DeviceDataProvider.h +++ b/examples/platform/silabs/SilabsDeviceDataProvider.h @@ -21,25 +21,30 @@ namespace chip { namespace DeviceLayer { -namespace EFR32 { +namespace Silabs { /** * @brief This class provides Commissionable data, Device Attestation Credentials, * and Device Instance Info. */ -class EFR32DeviceDataProvider : public CommissionableDataProvider, - public Internal::GenericDeviceInstanceInfoProvider +class SilabsDeviceDataProvider : public CommissionableDataProvider, + public Internal::GenericDeviceInstanceInfoProvider { public: - EFR32DeviceDataProvider() : + SilabsDeviceDataProvider() : CommissionableDataProvider(), Internal::GenericDeviceInstanceInfoProvider( ConfigurationManagerImpl::GetDefaultInstance()) {} - static EFR32DeviceDataProvider & GetDeviceDataProvider(); - CHIP_ERROR GetSetupPayload(MutableCharSpan & payloadBuf); +// TODO Remove once Commander supports (doesn't erase) NVM3 for 917 +#ifdef SIWX917_USE_COMISSIONABLE_DATA + void setupPayload(uint8_t * outBuf); + CHIP_ERROR FlashFactoryData(); +#endif /* SIWX917_USE_COMISSIONABLE_DATA */ + static SilabsDeviceDataProvider & GetDeviceDataProvider(); + CHIP_ERROR GetSetupPayload(MutableCharSpan & payloadBuf); // ===== Members functions that implement the CommissionableDataProvider CHIP_ERROR GetSetupDiscriminator(uint16_t & setupDiscriminator) override; CHIP_ERROR SetSetupDiscriminator(uint16_t setupDiscriminator) override { return CHIP_ERROR_NOT_IMPLEMENTED; } @@ -65,6 +70,6 @@ class EFR32DeviceDataProvider : public CommissionableDataProvider, CHIP_ERROR GetProductLabel(char * buf, size_t bufSize) override; }; -} // namespace EFR32 +} // namespace Silabs } // namespace DeviceLayer } // namespace chip diff --git a/examples/platform/silabs/efr32/BUILD.gn b/examples/platform/silabs/efr32/BUILD.gn index b48f1498469ac0..3c2059a3f77c5e 100644 --- a/examples/platform/silabs/efr32/BUILD.gn +++ b/examples/platform/silabs/efr32/BUILD.gn @@ -179,10 +179,10 @@ source_set("efr32-attestation-credentials") { public_configs = [ ":attestation-credentials-config" ] } -source_set("efr32-factory-data-provider") { +source_set("silabs-factory-data-provider") { sources = [ - "EFR32DeviceDataProvider.cpp", - "EFR32DeviceDataProvider.h", + "${silabs_common_plat_dir}/SilabsDeviceDataProvider.cpp", + "${silabs_common_plat_dir}/SilabsDeviceDataProvider.h", ] public_deps = [ @@ -356,7 +356,7 @@ source_set("efr32-common") { # Factory Data Provider if (use_efr32_factory_data_provider) { - public_deps += [ ":efr32-factory-data-provider" ] + public_deps += [ ":silabs-factory-data-provider" ] } if (chip_config_use_icd_subscription_callbacks) { diff --git a/examples/platform/silabs/efr32/BaseApplication.cpp b/examples/platform/silabs/efr32/BaseApplication.cpp index 4421ca4e313c44..bbb18fc005883a 100644 --- a/examples/platform/silabs/efr32/BaseApplication.cpp +++ b/examples/platform/silabs/efr32/BaseApplication.cpp @@ -37,7 +37,7 @@ #endif // QR_CODE_ENABLED #endif // DISPLAY_ENABLED -#include "EFR32DeviceDataProvider.h" +#include "SilabsDeviceDataProvider.h" #include #include #include @@ -221,7 +221,7 @@ CHIP_ERROR BaseApplication::Init(Identify * identifyObj) char qrCodeBuffer[chip::QRCodeBasicSetupPayloadGenerator::kMaxQRCodeBase38RepresentationLength + 1]; chip::MutableCharSpan QRCode(qrCodeBuffer); - if (EFR32::EFR32DeviceDataProvider::GetDeviceDataProvider().GetSetupPayload(QRCode) == CHIP_NO_ERROR) + if (Silabs::SilabsDeviceDataProvider::GetDeviceDataProvider().GetSetupPayload(QRCode) == CHIP_NO_ERROR) { // Print setup info on LCD if available #ifdef QR_CODE_ENABLED diff --git a/examples/platform/silabs/efr32/EFR32DeviceDataProvider.cpp b/examples/platform/silabs/efr32/EFR32DeviceDataProvider.cpp deleted file mode 100644 index 491fe1b117bbde..00000000000000 --- a/examples/platform/silabs/efr32/EFR32DeviceDataProvider.cpp +++ /dev/null @@ -1,352 +0,0 @@ -/* - * - * Copyright (c) 2022 Project CHIP Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#include "EFR32DeviceDataProvider.h" -#include -#include -#include -#include -#include - -namespace chip { -namespace DeviceLayer { -namespace EFR32 { - -// using namespace chip::Credentials; -using namespace chip::DeviceLayer::Internal; - -CHIP_ERROR EFR32DeviceDataProvider::GetSetupDiscriminator(uint16_t & setupDiscriminator) -{ - CHIP_ERROR err; - uint32_t setupDiscriminator32; - - err = SilabsConfig::ReadConfigValue(SilabsConfig::kConfigKey_SetupDiscriminator, setupDiscriminator32); -#if defined(CHIP_DEVICE_CONFIG_USE_TEST_SETUP_DISCRIMINATOR) && CHIP_DEVICE_CONFIG_USE_TEST_SETUP_DISCRIMINATOR - if (err == CHIP_DEVICE_ERROR_CONFIG_NOT_FOUND) - { - setupDiscriminator32 = CHIP_DEVICE_CONFIG_USE_TEST_SETUP_DISCRIMINATOR; - err = CHIP_NO_ERROR; - } -#endif // defined(CHIP_DEVICE_CONFIG_USE_TEST_SETUP_DISCRIMINATOR) && CHIP_DEVICE_CONFIG_USE_TEST_SETUP_DISCRIMINATOR - - VerifyOrReturnLogError(setupDiscriminator32 <= kMaxDiscriminatorValue, CHIP_ERROR_INVALID_ARGUMENT); - setupDiscriminator = static_cast(setupDiscriminator32); - return CHIP_NO_ERROR; -} - -CHIP_ERROR EFR32DeviceDataProvider::GetSpake2pIterationCount(uint32_t & iterationCount) -{ - CHIP_ERROR err = SilabsConfig::ReadConfigValue(SilabsConfig::kConfigKey_Spake2pIterationCount, iterationCount); - -#if defined(CHIP_DEVICE_CONFIG_USE_TEST_SPAKE2P_ITERATION_COUNT) && CHIP_DEVICE_CONFIG_USE_TEST_SPAKE2P_ITERATION_COUNT - if (err == CHIP_DEVICE_ERROR_CONFIG_NOT_FOUND) - { - iterationCount = CHIP_DEVICE_CONFIG_USE_TEST_SPAKE2P_ITERATION_COUNT; - err = CHIP_NO_ERROR; - } -#endif // defined(CHIP_DEVICE_CONFIG_USE_TEST_SPAKE2P_ITERATION_COUNT) && CHIP_DEVICE_CONFIG_USE_TEST_SPAKE2P_ITERATION_COUNT - return err; -} - -CHIP_ERROR EFR32DeviceDataProvider::GetSpake2pSalt(MutableByteSpan & saltBuf) -{ - static constexpr size_t kSpake2pSalt_MaxBase64Len = BASE64_ENCODED_LEN(chip::Crypto::kSpake2p_Max_PBKDF_Salt_Length) + 1; - - CHIP_ERROR err = CHIP_NO_ERROR; - char saltB64[kSpake2pSalt_MaxBase64Len] = { 0 }; - size_t saltB64Len = 0; - - err = SilabsConfig::ReadConfigValueStr(SilabsConfig::kConfigKey_Spake2pSalt, saltB64, sizeof(saltB64), saltB64Len); - -#if defined(CHIP_DEVICE_CONFIG_USE_TEST_SPAKE2P_SALT) - if (err == CHIP_DEVICE_ERROR_CONFIG_NOT_FOUND) - { - saltB64Len = strlen(CHIP_DEVICE_CONFIG_USE_TEST_SPAKE2P_SALT); - ReturnErrorCodeIf(saltB64Len > sizeof(saltB64), CHIP_ERROR_BUFFER_TOO_SMALL); - memcpy(saltB64, CHIP_DEVICE_CONFIG_USE_TEST_SPAKE2P_SALT, saltB64Len); - err = CHIP_NO_ERROR; - } -#endif // defined(CHIP_DEVICE_CONFIG_USE_TEST_SPAKE2P_SALT) - - ReturnErrorOnFailure(err); - - uint8_t saltByteArray[kSpake2pSalt_MaxBase64Len] = { 0 }; - size_t saltLen = chip::Base64Decode32(saltB64, saltB64Len, saltByteArray); - ReturnErrorCodeIf(saltLen > saltBuf.size(), CHIP_ERROR_BUFFER_TOO_SMALL); - - memcpy(saltBuf.data(), saltByteArray, saltLen); - saltBuf.reduce_size(saltLen); - - return CHIP_NO_ERROR; -} - -CHIP_ERROR EFR32DeviceDataProvider::GetSpake2pVerifier(MutableByteSpan & verifierBuf, size_t & verifierLen) -{ - static constexpr size_t kSpake2pSerializedVerifier_MaxBase64Len = - BASE64_ENCODED_LEN(chip::Crypto::kSpake2p_VerifierSerialized_Length) + 1; - - CHIP_ERROR err = CHIP_NO_ERROR; - char verifierB64[kSpake2pSerializedVerifier_MaxBase64Len] = { 0 }; - size_t verifierB64Len = 0; - - err = SilabsConfig::ReadConfigValueStr(SilabsConfig::kConfigKey_Spake2pVerifier, verifierB64, sizeof(verifierB64), - verifierB64Len); - -#if defined(CHIP_DEVICE_CONFIG_USE_TEST_SPAKE2P_VERIFIER) - if (err == CHIP_DEVICE_ERROR_CONFIG_NOT_FOUND) - { - verifierB64Len = strlen(CHIP_DEVICE_CONFIG_USE_TEST_SPAKE2P_VERIFIER); - ReturnErrorCodeIf(verifierB64Len > sizeof(verifierB64), CHIP_ERROR_BUFFER_TOO_SMALL); - memcpy(verifierB64, CHIP_DEVICE_CONFIG_USE_TEST_SPAKE2P_VERIFIER, verifierB64Len); - err = CHIP_NO_ERROR; - } -#endif // defined(CHIP_DEVICE_CONFIG_USE_TEST_SPAKE2P_VERIFIER) - - ReturnErrorOnFailure(err); - - verifierLen = chip::Base64Decode32(verifierB64, verifierB64Len, reinterpret_cast(verifierB64)); - ReturnErrorCodeIf(verifierLen > verifierBuf.size(), CHIP_ERROR_BUFFER_TOO_SMALL); - - memcpy(verifierBuf.data(), verifierB64, verifierLen); - verifierBuf.reduce_size(verifierLen); - - return CHIP_NO_ERROR; -} - -CHIP_ERROR EFR32DeviceDataProvider::GetSetupPayload(MutableCharSpan & payloadBuf) -{ - CHIP_ERROR err = CHIP_NO_ERROR; - uint8_t payloadBitSet[kTotalPayloadDataSizeInBytes] = { 0 }; - size_t bitSetLen = 0; - - err = SilabsConfig::ReadConfigValueBin(SilabsConfig::kConfigKey_SetupPayloadBitSet, payloadBitSet, kTotalPayloadDataSizeInBytes, - bitSetLen); - -#if defined(CHIP_DEVICE_CONFIG_USE_TEST_SETUP_PIN_CODE) && CHIP_DEVICE_CONFIG_USE_TEST_SETUP_PIN_CODE - if (err == CHIP_DEVICE_ERROR_CONFIG_NOT_FOUND) - { - static constexpr uint8_t kTestSetupPayloadBitset[] = { 0x88, 0xFF, 0x2F, 0x00, 0x44, 0x00, 0xE0, 0x4B, 0x84, 0x68, 0x02 }; - bitSetLen = sizeof(kTestSetupPayloadBitset); - ReturnErrorCodeIf(bitSetLen > kTotalPayloadDataSizeInBytes, CHIP_ERROR_BUFFER_TOO_SMALL); - memcpy(payloadBitSet, kTestSetupPayloadBitset, bitSetLen); - err = CHIP_NO_ERROR; - } -#endif // defined(CHIP_DEVICE_CONFIG_USE_TEST_SPAKE2P_VERIFIER) - - ReturnErrorOnFailure(err); - - size_t prefixLen = strlen(kQRCodePrefix); - - if (payloadBuf.size() < prefixLen + 1) - { - err = CHIP_ERROR_BUFFER_TOO_SMALL; - } - else - { - MutableCharSpan subSpan = payloadBuf.SubSpan(prefixLen, payloadBuf.size() - prefixLen); - memcpy(payloadBuf.data(), kQRCodePrefix, prefixLen); - err = base38Encode(MutableByteSpan(payloadBitSet), subSpan); - // Reduce output span size to be the size of written data - payloadBuf.reduce_size(subSpan.size() + prefixLen); - } - - return err; -} - -CHIP_ERROR EFR32DeviceDataProvider::GetVendorName(char * buf, size_t bufSize) -{ - size_t vendorNameLen = 0; // without counting null-terminator - return SilabsConfig::ReadConfigValueStr(SilabsConfig::kConfigKey_VendorName, buf, bufSize, vendorNameLen); -} - -CHIP_ERROR EFR32DeviceDataProvider::GetVendorId(uint16_t & vendorId) -{ - ChipError err = CHIP_NO_ERROR; - uint32_t vendorId32 = 0; - - err = SilabsConfig::ReadConfigValue(SilabsConfig::kConfigKey_VendorId, vendorId32); - -#if defined(CHIP_DEVICE_CONFIG_DEVICE_VENDOR_ID) && CHIP_DEVICE_CONFIG_DEVICE_VENDOR_ID - if (err == CHIP_DEVICE_ERROR_CONFIG_NOT_FOUND) - { - vendorId32 = CHIP_DEVICE_CONFIG_DEVICE_VENDOR_ID; - err = CHIP_NO_ERROR; - } -#endif // defined(CHIP_DEVICE_CONFIG_DEVICE_VENDOR_ID) && CHIP_DEVICE_CONFIG_DEVICE_VENDOR_ID - - ReturnErrorOnFailure(err); - vendorId = static_cast(vendorId32); - return err; -} - -CHIP_ERROR EFR32DeviceDataProvider::GetProductName(char * buf, size_t bufSize) -{ - size_t productNameLen = 0; // without counting null-terminator - return SilabsConfig::ReadConfigValueStr(SilabsConfig::kConfigKey_ProductName, buf, bufSize, productNameLen); -} - -CHIP_ERROR EFR32DeviceDataProvider::GetProductId(uint16_t & productId) -{ - ChipError err = CHIP_NO_ERROR; - uint32_t productId32 = 0; - - err = SilabsConfig::ReadConfigValue(SilabsConfig::kConfigKey_ProductId, productId32); - -#if defined(CHIP_DEVICE_CONFIG_DEVICE_PRODUCT_ID) && CHIP_DEVICE_CONFIG_DEVICE_PRODUCT_ID - if (err == CHIP_DEVICE_ERROR_CONFIG_NOT_FOUND) - { - productId32 = CHIP_DEVICE_CONFIG_DEVICE_PRODUCT_ID; - err = CHIP_NO_ERROR; - } -#endif // defined(CHIP_DEVICE_CONFIG_DEVICE_PRODUCT_ID) && CHIP_DEVICE_CONFIG_DEVICE_PRODUCT_ID - ReturnErrorOnFailure(err); - - productId = static_cast(productId32); - return err; -} - -CHIP_ERROR EFR32DeviceDataProvider::GetHardwareVersionString(char * buf, size_t bufSize) -{ - size_t hardwareVersionStringLen = 0; // without counting null-terminator - CHIP_ERROR err = - SilabsConfig::ReadConfigValueStr(SilabsConfig::kConfigKey_HardwareVersionString, buf, bufSize, hardwareVersionStringLen); -#if defined(CHIP_DEVICE_CONFIG_DEFAULT_DEVICE_HARDWARE_VERSION_STRING) - if (err == CHIP_DEVICE_ERROR_CONFIG_NOT_FOUND) - { - memcpy(buf, CHIP_DEVICE_CONFIG_DEFAULT_DEVICE_HARDWARE_VERSION_STRING, bufSize); - err = CHIP_NO_ERROR; - } -#endif // CHIP_DEVICE_CONFIG_DEFAULT_DEVICE_HARDWARE_VERSION_STRING - return err; -} - -CHIP_ERROR EFR32DeviceDataProvider::GetHardwareVersion(uint16_t & hardwareVersion) -{ - CHIP_ERROR err; - uint32_t hardwareVersion32; - - err = SilabsConfig::ReadConfigValue(SilabsConfig::kConfigKey_HardwareVersion, hardwareVersion32); -#if defined(CHIP_DEVICE_CONFIG_DEFAULT_DEVICE_HARDWARE_VERSION) - if (err == CHIP_DEVICE_ERROR_CONFIG_NOT_FOUND) - { - hardwareVersion32 = CHIP_DEVICE_CONFIG_DEFAULT_DEVICE_HARDWARE_VERSION; - err = CHIP_NO_ERROR; - } -#endif // defined(CHIP_DEVICE_CONFIG_DEFAULT_DEVICE_HARDWARE_VERSION) - - hardwareVersion = static_cast(hardwareVersion32); - return err; -} - -CHIP_ERROR EFR32DeviceDataProvider::GetRotatingDeviceIdUniqueId(MutableByteSpan & uniqueIdSpan) -{ - ChipError err = CHIP_ERROR_WRONG_KEY_TYPE; -#if CHIP_ENABLE_ROTATING_DEVICE_ID - static_assert(ConfigurationManager::kRotatingDeviceIDUniqueIDLength >= ConfigurationManager::kMinRotatingDeviceIDUniqueIDLength, - "Length of unique ID for rotating device ID is smaller than minimum."); - - size_t uniqueIdLen = 0; - err = - SilabsConfig::ReadConfigValueBin(SilabsConfig::kConfigKey_UniqueId, uniqueIdSpan.data(), uniqueIdSpan.size(), uniqueIdLen); -#ifdef CHIP_DEVICE_CONFIG_ROTATING_DEVICE_ID_UNIQUE_ID - if (err == CHIP_DEVICE_ERROR_CONFIG_NOT_FOUND) - { - constexpr uint8_t uniqueId[] = CHIP_DEVICE_CONFIG_ROTATING_DEVICE_ID_UNIQUE_ID; - - ReturnErrorCodeIf(sizeof(uniqueId) > uniqueIdSpan.size(), CHIP_ERROR_BUFFER_TOO_SMALL); - memcpy(uniqueIdSpan.data(), uniqueId, sizeof(uniqueId)); - uniqueIdLen = sizeof(uniqueId); - } -#endif // CHIP_DEVICE_CONFIG_ROTATING_DEVICE_ID_UNIQUE_ID - - ReturnErrorOnFailure(err); - uniqueIdSpan.reduce_size(uniqueIdLen); - -#endif // CHIP_ENABLE_ROTATING_DEVICE_ID - return err; -} - -CHIP_ERROR EFR32DeviceDataProvider::GetSerialNumber(char * buf, size_t bufSize) -{ - size_t serialNumberLen = 0; // without counting null-terminator - return SilabsConfig::ReadConfigValueStr(SilabsConfig::kConfigKey_SerialNum, buf, bufSize, serialNumberLen); -} - -CHIP_ERROR EFR32DeviceDataProvider::GetManufacturingDate(uint16_t & year, uint8_t & month, uint8_t & day) -{ - CHIP_ERROR err; - constexpr uint8_t kDateStringLength = 10; // YYYY-MM-DD - char dateStr[kDateStringLength + 1]; - size_t dateLen; - char * parseEnd; - - err = SilabsConfig::ReadConfigValueBin(SilabsConfig::kConfigKey_ManufacturingDate, reinterpret_cast(dateStr), - sizeof(dateStr), dateLen); - SuccessOrExit(err); - - VerifyOrExit(dateLen == kDateStringLength, err = CHIP_ERROR_INVALID_ARGUMENT); - - // Cast does not lose information, because we then check that we only parsed - // 4 digits, so our number can't be bigger than 9999. - year = static_cast(strtoul(dateStr, &parseEnd, 10)); - VerifyOrExit(parseEnd == dateStr + 4, err = CHIP_ERROR_INVALID_ARGUMENT); - - // Cast does not lose information, because we then check that we only parsed - // 2 digits, so our number can't be bigger than 99. - month = static_cast(strtoul(dateStr + 5, &parseEnd, 10)); - VerifyOrExit(parseEnd == dateStr + 7, err = CHIP_ERROR_INVALID_ARGUMENT); - - // Cast does not lose information, because we then check that we only parsed - // 2 digits, so our number can't be bigger than 99. - day = static_cast(strtoul(dateStr + 8, &parseEnd, 10)); - VerifyOrExit(parseEnd == dateStr + 10, err = CHIP_ERROR_INVALID_ARGUMENT); - -exit: - if (err != CHIP_NO_ERROR && err != CHIP_DEVICE_ERROR_CONFIG_NOT_FOUND) - { - ChipLogError(DeviceLayer, "Invalid manufacturing date: %s", dateStr); - } - return err; -} - -CHIP_ERROR EFR32DeviceDataProvider::GetPartNumber(char * buf, size_t bufSize) -{ - size_t partNumberLen = 0; // without counting null-terminator - return SilabsConfig::ReadConfigValueStr(SilabsConfig::kConfigKey_PartNumber, buf, bufSize, partNumberLen); -} - -CHIP_ERROR EFR32DeviceDataProvider::GetProductURL(char * buf, size_t bufSize) -{ - size_t productUrlLen = 0; // without counting null-terminator - return SilabsConfig::ReadConfigValueStr(SilabsConfig::kConfigKey_ProductURL, buf, bufSize, productUrlLen); -} - -CHIP_ERROR EFR32DeviceDataProvider::GetProductLabel(char * buf, size_t bufSize) -{ - size_t productLabelLen = 0; // without counting null-terminator - return SilabsConfig::ReadConfigValueStr(SilabsConfig::KConfigKey_ProductLabel, buf, bufSize, productLabelLen); -} - -EFR32DeviceDataProvider & EFR32DeviceDataProvider::GetDeviceDataProvider() -{ - static EFR32DeviceDataProvider sDataProvider; - return sDataProvider; -} - -} // namespace EFR32 -} // namespace DeviceLayer -} // namespace chip diff --git a/examples/platform/silabs/efr32/matter_config.cpp b/examples/platform/silabs/efr32/matter_config.cpp index 32cdad602c23e7..3ffabe436c9871 100644 --- a/examples/platform/silabs/efr32/matter_config.cpp +++ b/examples/platform/silabs/efr32/matter_config.cpp @@ -53,7 +53,7 @@ using namespace ::chip::DeviceLayer; static chip::DeviceLayer::Internal::Efr32PsaOperationalKeystore gOperationalKeystore; #endif -#include "EFR32DeviceDataProvider.h" +#include "SilabsDeviceDataProvider.h" #include #ifdef CHIP_CONFIG_USE_ICD_SUBSCRIPTION_CALLBACKS @@ -159,8 +159,8 @@ CHIP_ERROR SilabsMatterConfig::InitMatter(const char * appName) ReturnErrorOnFailure(chip::Platform::MemoryInit()); ReturnErrorOnFailure(PlatformMgr().InitChipStack()); - SetDeviceInstanceInfoProvider(&EFR32::EFR32DeviceDataProvider::GetDeviceDataProvider()); - SetCommissionableDataProvider(&EFR32::EFR32DeviceDataProvider::GetDeviceDataProvider()); + SetDeviceInstanceInfoProvider(&Silabs::SilabsDeviceDataProvider::GetDeviceDataProvider()); + SetCommissionableDataProvider(&Silabs::SilabsDeviceDataProvider::GetDeviceDataProvider()); chip::DeviceLayer::ConnectivityMgr().SetBLEDeviceName(appName); diff --git a/examples/window-app/silabs/SiWx917/src/WindowAppImpl.cpp b/examples/window-app/silabs/SiWx917/src/WindowAppImpl.cpp index 694bc918f5bcd0..108fd77f9f8e37 100644 --- a/examples/window-app/silabs/SiWx917/src/WindowAppImpl.cpp +++ b/examples/window-app/silabs/SiWx917/src/WindowAppImpl.cpp @@ -27,7 +27,7 @@ #ifdef QR_CODE_ENABLED #include #else -#include "SiWx917DeviceDataProvider.h" +#include "SilabsDeviceDataProvider.h" #include #include #endif // QR_CODE_ENABLED @@ -217,7 +217,7 @@ CHIP_ERROR WindowAppImpl::Init() char qrCodeBuffer[chip::QRCodeBasicSetupPayloadGenerator::kMaxQRCodeBase38RepresentationLength + 1]; chip::MutableCharSpan QRCode(qrCodeBuffer); - if (SIWx917::SIWx917DeviceDataProvider::GetDeviceDataProvider().GetSetupPayload(QRCode) == CHIP_NO_ERROR) + if (Silabs::SilabsDeviceDataProvider::GetDeviceDataProvider().GetSetupPayload(QRCode) == CHIP_NO_ERROR) { PrintQrCodeURL(QRCode); } diff --git a/examples/window-app/silabs/efr32/src/WindowAppImpl.cpp b/examples/window-app/silabs/efr32/src/WindowAppImpl.cpp index 29847a8031fc93..77d3d6800c5d0a 100644 --- a/examples/window-app/silabs/efr32/src/WindowAppImpl.cpp +++ b/examples/window-app/silabs/efr32/src/WindowAppImpl.cpp @@ -27,7 +27,7 @@ #ifdef QR_CODE_ENABLED #include #else -#include "EFR32DeviceDataProvider.h" +#include "SilabsDeviceDataProvider.h" #include #include #endif // QR_CODE_ENABLED @@ -223,7 +223,7 @@ CHIP_ERROR WindowAppImpl::Init() char qrCodeBuffer[chip::QRCodeBasicSetupPayloadGenerator::kMaxQRCodeBase38RepresentationLength + 1]; chip::MutableCharSpan QRCode(qrCodeBuffer); - if (EFR32::EFR32DeviceDataProvider::GetDeviceDataProvider().GetSetupPayload(QRCode) == CHIP_NO_ERROR) + if (Silabs::SilabsDeviceDataProvider::GetDeviceDataProvider().GetSetupPayload(QRCode) == CHIP_NO_ERROR) { PrintQrCodeURL(QRCode); } diff --git a/src/platform/silabs/SiWx917/args.gni b/src/platform/silabs/SiWx917/args.gni index 52356737e2ae4c..63c70b25e3d57b 100644 --- a/src/platform/silabs/SiWx917/args.gni +++ b/src/platform/silabs/SiWx917/args.gni @@ -28,7 +28,7 @@ mbedtls_target = "${efr32_sdk_build_root}:efr32_sdk" chip_crypto = "platform" # Transitional CommissionableDataProvider not used anymore -# examples/platform/efr32/EFR32DeviceDataProvider is now used. +# examples/platform/silabs/SilabsDeviceDataProvider is now used. chip_use_transitional_commissionable_data_provider = false # Use GSDK lwip instead of CHIP diff --git a/src/platform/silabs/SiWx917/wifi_args.gni b/src/platform/silabs/SiWx917/wifi_args.gni index c1848ece760416..f3439f70062766 100644 --- a/src/platform/silabs/SiWx917/wifi_args.gni +++ b/src/platform/silabs/SiWx917/wifi_args.gni @@ -28,7 +28,7 @@ mbedtls_target = "${efr32_sdk_build_root}:efr32_sdk" chip_crypto = "mbedtls" # Transitional CommissionableDataProvider not used anymore -# examples/platform/efr32/EFR32DeviceDataProvider is now used. +# examples/platform/silabs/SilabsDeviceDataProvider is now used. chip_use_transitional_commissionable_data_provider = false lwip_platform = "silabs" diff --git a/src/platform/silabs/efr32/args.gni b/src/platform/silabs/efr32/args.gni index c50c77a1c83600..99bb92b9ec6372 100644 --- a/src/platform/silabs/efr32/args.gni +++ b/src/platform/silabs/efr32/args.gni @@ -44,7 +44,7 @@ chip_with_lwip = false chip_build_tests = false # Transitional CommissionableDataProvider not used anymore -# examples/platform/silabs/efr32/EFR32DeviceDataProvider is now used. +# examples/platform/silabs/efr32/SilabsDeviceDataProvider is now used. chip_use_transitional_commissionable_data_provider = false openthread_root = diff --git a/src/platform/silabs/efr32/wifi_args.gni b/src/platform/silabs/efr32/wifi_args.gni index 02959ecceeba1b..fac4f4ff6103f7 100644 --- a/src/platform/silabs/efr32/wifi_args.gni +++ b/src/platform/silabs/efr32/wifi_args.gni @@ -31,7 +31,7 @@ if (chip_crypto == "") { } # Transitional CommissionableDataProvider not used anymore -# examples/platform/efr32/EFR32DeviceDataProvider is now used. +# examples/platform/silabs/SilabsDeviceDataProvider is now used. chip_use_transitional_commissionable_data_provider = false lwip_platform = "silabs" diff --git a/src/test_driver/efr32/BUILD.gn b/src/test_driver/efr32/BUILD.gn index e440bb3ac475c2..8ffd6d346033c7 100644 --- a/src/test_driver/efr32/BUILD.gn +++ b/src/test_driver/efr32/BUILD.gn @@ -100,7 +100,7 @@ silabs_executable("efr32_device_tests") { # Factory Data Provider if (use_efr32_factory_data_provider) { - deps += [ "${examples_plat_dir}:efr32-factory-data-provider" ] + deps += [ "${examples_plat_dir}:silabs-factory-data-provider" ] } deps += pw_build_LINK_DEPS