Skip to content

Commit

Permalink
fix: added initialization to platform wifi network commissioning inst…
Browse files Browse the repository at this point in the history
…ance (project-chip#17983)

Change-Id: I03b6b523d4c4557ab6cc432216e48b6d6b2b6964
  • Loading branch information
rochaferraz authored and cpagravel committed Jun 13, 2022
1 parent ba214c7 commit 1255e3f
Show file tree
Hide file tree
Showing 29 changed files with 11,217 additions and 2,436 deletions.
6,787 changes: 6,787 additions & 0 deletions examples/chef/devices/lighting-app-thread.zap

Large diffs are not rendered by default.

Large diffs are not rendered by default.

6 changes: 6 additions & 0 deletions examples/chef/esp32/main/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,13 @@
#include <lib/support/CHIPMem.h>
#include <platform/CHIPDeviceLayer.h>

#include <app/clusters/network-commissioning/network-commissioning.h>
#include <app/server/OnboardingCodesUtil.h>
#include <app/server/Server.h>

#include <credentials/DeviceAttestationCredsProvider.h>
#include <credentials/examples/DeviceAttestationCredsExample.h>
#include <platform/ESP32/NetworkCommissioningDriver.h>

#include <app-common/zap-generated/att-storage.h>
#include <app-common/zap-generated/attribute-id.h>
Expand Down Expand Up @@ -161,6 +163,9 @@ void printQRCode()
}
#endif // CONFIG_HAVE_DISPLAY

app::Clusters::NetworkCommissioning::Instance
sWiFiNetworkCommissioningInstance(0 /* Endpoint Id */, &(NetworkCommissioning::ESPWiFiDriver::GetInstance()));

void InitServer(intptr_t)
{
// Start IM server
Expand All @@ -170,6 +175,7 @@ void InitServer(intptr_t)

// Device Attestation & Onboarding codes
chip::Credentials::SetDeviceAttestationCredentialsProvider(chip::Credentials::Examples::GetExampleDACProvider());
sWiFiNetworkCommissioningInstance.Init();
chip::DeviceLayer::ConfigurationMgr().LogDeviceConfig();

if (chip::Server::GetInstance().GetCommissioningWindowManager().OpenBasicCommissioningWindow() != CHIP_NO_ERROR)
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ca2c6dcd45363e2c5139925ef341ae18

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 1255e3f

Please sign in to comment.