Skip to content

Commit 3451973

Browse files
jmartinez-silabsrestyled-commits
authored andcommitted
[EFR32] fix BLE not advertising at boot while device is not provisionned (#13346)
* Erase Kvs partition on Factory Reset. this deletes the fabric ids. There was an error with the ChipCounter key placement * Restyled by clang-format Co-authored-by: Restyled.io <commits@restyled.io>
1 parent 1145222 commit 3451973

File tree

2 files changed

+9
-5
lines changed

2 files changed

+9
-5
lines changed

src/platform/EFR32/ConfigurationManagerImpl.cpp

+4
Original file line numberDiff line numberDiff line change
@@ -287,6 +287,10 @@ void ConfigurationManagerImpl::DoFactoryReset(intptr_t arg)
287287

288288
#endif // CHIP_DEVICE_CONFIG_ENABLE_THREAD
289289

290+
#if CHIP_KVS_AVAILABLE
291+
PersistedStorage::KeyValueStoreMgrImpl().ErasePartition();
292+
#endif // CHIP_KVS_AVAILABLE
293+
290294
// Restart the system.
291295
ChipLogProgress(DeviceLayer, "System restarting");
292296
NVIC_SystemReset();

src/platform/EFR32/EFR32Config.h

+5-5
Original file line numberDiff line numberDiff line change
@@ -94,12 +94,12 @@ class EFR32Config
9494
static constexpr Key kConfigKey_RegulatoryLocation = EFR32ConfigKey(kChipConfig_KeyBase, 0x09);
9595
static constexpr Key kConfigKey_CountryCode = EFR32ConfigKey(kChipConfig_KeyBase, 0x0A);
9696
static constexpr Key kConfigKey_Breadcrumb = EFR32ConfigKey(kChipConfig_KeyBase, 0x0B);
97+
static constexpr Key kConfigKey_GroupKeyBase = EFR32ConfigKey(kChipConfig_KeyBase, 0x0C);
98+
static constexpr Key kConfigKey_GroupKeyMax = EFR32ConfigKey(kChipConfig_KeyBase, 0x1B); // Allows 16 Group Keys to be created.
9799

98-
static constexpr Key kConfigKey_BootCount = EFR32ConfigKey(kChipCounter_KeyBase, 0x0C);
99-
static constexpr Key kConfigKey_TotalOperationalHours = EFR32ConfigKey(kChipCounter_KeyBase, 0x0D);
100-
101-
static constexpr Key kConfigKey_GroupKeyBase = EFR32ConfigKey(kChipConfig_KeyBase, 0x0E);
102-
static constexpr Key kConfigKey_GroupKeyMax = EFR32ConfigKey(kChipConfig_KeyBase, 0x1D); // Allows 16 Group Keys to be created.
100+
// CHIP Counter Keys
101+
static constexpr Key kConfigKey_BootCount = EFR32ConfigKey(kChipCounter_KeyBase, 0x00);
102+
static constexpr Key kConfigKey_TotalOperationalHours = EFR32ConfigKey(kChipCounter_KeyBase, 0x01);
103103

104104
// Set key id limits for each group.
105105
static constexpr Key kMinConfigKey_ChipFactory = EFR32ConfigKey(kChipFactory_KeyBase, 0x00);

0 commit comments

Comments
 (0)