[EFR32] Implement the CommisionableData Provider (#22705)
* WIP
* WIP Add the Commisionable Data provide to the ligthing-app
* Fix reading potential garbage bytes. Create python script to inject commissionable data to a efr32 device
* Add EFR32CommissinableDataProvider to all silabs examples. Add a fallback to use TEST_SETUP_VALUES if credentials are not found in nvm3. Add a Readme for the provider script.
* Fix typo and add a subscript in the readme.md
* Create a class and remove the use of global variables. Fix other comments
* fix merge conflict, run restyle
* Remove Passcode storing, Instead store qrcode bitset payload. Support deviceInstanceInfoProvider, augment FactoryDataProvider and add checks
* Add commissioning flow and rendez-vous flag args to the factoryDataProvider script
* fix build issue
* Enable EFR32DeviceDataProvider for the wifi platform examples also
* address last few comments
diff --git a/src/platform/EFR32/EFR32Config.cpp b/src/platform/EFR32/EFR32Config.cpp
index 1abd6cf..ff6a34c 100644
--- a/src/platform/EFR32/EFR32Config.cpp
+++ b/src/platform/EFR32/EFR32Config.cpp
@@ -84,7 +84,7 @@
CHIP_ERROR err;
uint32_t objectType;
size_t dataLen;
- bool tmpVal;
+ bool tmpVal = 0;
VerifyOrExit(ValidConfigKey(key), err = CHIP_DEVICE_ERROR_CONFIG_NOT_FOUND); // Verify key id.
@@ -106,7 +106,7 @@
CHIP_ERROR err;
uint32_t objectType;
size_t dataLen;
- uint32_t tmpVal;
+ uint32_t tmpVal = 0;
VerifyOrExit(ValidConfigKey(key), err = CHIP_DEVICE_ERROR_CONFIG_NOT_FOUND); // Verify key id.
@@ -128,7 +128,7 @@
CHIP_ERROR err;
uint32_t objectType;
size_t dataLen;
- uint64_t tmpVal;
+ uint64_t tmpVal = 0;
VerifyOrExit(ValidConfigKey(key), err = CHIP_DEVICE_ERROR_CONFIG_NOT_FOUND); // Verify key id.
@@ -264,8 +264,8 @@
CHIP_ERROR EFR32Config::ReadConfigValueCounter(uint8_t counterIdx, uint32_t & val)
{
CHIP_ERROR err;
- uint32_t tmpVal;
- Key key = kMinConfigKey_MatterCounter + counterIdx;
+ uint32_t tmpVal = 0;
+ Key key = kMinConfigKey_MatterCounter + counterIdx;
VerifyOrExit(ValidConfigKey(key), err = CHIP_DEVICE_ERROR_CONFIG_NOT_FOUND); // Verify key id.