Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Telink] Fix restart BLE adv after basic commissioning fail #28808

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions examples/platform/telink/common/src/AppTaskCommon.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,8 @@ class AppFabricTableDelegate : public FabricTable::Delegate
{
if (chip::Server::GetInstance().GetFabricTable().FabricCount() == 0)
{
bool isCommissioningFailed = chip::Server::GetInstance().GetCommissioningWindowManager().IsCommissioningWindowOpen();
bool isBasicCommissioningMode = chip::Server::GetInstance().GetCommissioningWindowManager().GetCommissioningMode() ==
Dnssd::CommissioningMode::kEnabledBasic;
Comment on lines +160 to +161
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why does basic vs enhanced matter here?

If commissioner A opens a basic commissioning window, commissioner B is trying to commission, and commissioner A removes itself during that time... why would we want to reset mid-commissioning?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@bzbarsky-apple
Changes are no longer relevant.
Please see:
#28947

ChipLogProgress(DeviceLayer, "Performing erasing of settings partition");

#ifdef CONFIG_CHIP_FACTORY_RESET_ERASE_NVS
Expand All @@ -169,7 +170,7 @@ class AppFabricTableDelegate : public FabricTable::Delegate
status = nvs_clear(static_cast<nvs_fs *>(storage));
}

if (!isCommissioningFailed)
if (!isBasicCommissioningMode)
{
if (!status)
{
Expand All @@ -191,7 +192,7 @@ class AppFabricTableDelegate : public FabricTable::Delegate

ConnectivityMgr().ErasePersistentInfo();
#endif
if (isCommissioningFailed)
if (isBasicCommissioningMode)
{
PlatformMgr().Shutdown();
}
Expand Down