Skip to content

Commit

Permalink
Pull request project-chip#1648: [Cherry-pick] Provision 2.0 with late…
Browse files Browse the repository at this point in the history
…st fixes

Merge in WMN_TOOLS/matter from cherry-pick/provision_2.0 to RC_2.3.0-1.3-alpha.3

Squashed commit of the following:

commit 087b18e961396a50fc769b38f2c2ee1009dab588
Author: Ricardo Casallas <[email protected]>
Date:   Fri Mar 15 20:34:39 2024 +0000

    Pull request project-chip#1645: Bugfix: Provision: README typos.

    Merge in WMN_TOOLS/matter from bugfix/provision_readme to RC_2.3.0-1.3

    Squashed commit of the following:

    commit d09303c35e73e0068f07973b8933fb9e97d9ddee
    Author: Ricardo Casallas <[email protected]>
    Date:   Fri Mar 15 11:38:01 2024 -0400

        Bugfix: Provision: README typos.

commit 5356620caa1140925915d07cdb17322629c12373
Author: Ricardo Casallas <[email protected]>
Date:   Fri Mar 15 20:28:34 2024 +0000

    Merge pull request project-chip#1646 in WMN_TOOLS/matter from bugfix/provision_silabs_header to RC_2.3.0-1.3

    Auto-Merge: Pull request project-chip#1646: [AUTO] Bugfix: Provision: Backwards-compatible header moved to the temp folder.

    Merge in WMN_TOOLS/matter from bugfix/provision_silabs_header to RC_2.3.0-1.3

    Squashed commit of the following:

    commit 8e005e302ea19e280e8ad88f0dd3605450021b96
    Author: Ricardo Casallas <[email protected]>
    Date:   Fri Mar 15 15:11:38 2024 -0400

        Bugfix: Provision: Backwards-compatible header moved to the temp folder.

commit 9a1927cd9c5d0d2e93e3093c8b91da91eac10eaf
Author: Ricardo Casallas <[email protected]>
Date:   Thu Mar 14 19:01:30 2024 +0000

    Pull request project-chip#1643: Bugfix: Provision defaults.

    Merge in WMN_TOOLS/matter from bugfix/provision-defaults to RC_2.3.0-1.3

    Squashed commit of the following:

    commit 3eeeb2a30fbdc8cb8a6a992f3f343e47993ad891
    Author: Ricardo Casallas <[email protected]>
    Date:   Thu Mar 14 10:17:52 2024 -0400

        Bugfix: Provision defaults.

... and 1 more commit
  • Loading branch information
jmartinez-silabs committed Mar 17, 2024
1 parent c59b362 commit eae4864
Show file tree
Hide file tree
Showing 245 changed files with 67,888 additions and 24,798 deletions.
10 changes: 2 additions & 8 deletions examples/platform/silabs/BaseApplication.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@
#endif // QR_CODE_ENABLED
#endif // DISPLAY_ENABLED

#include <SilabsDeviceDataProvider.h>
#if CHIP_CONFIG_ENABLE_ICD_SERVER == 1
#include <app/icd/ICDNotifier.h> // nogncheck
#endif
Expand Down Expand Up @@ -762,7 +761,7 @@ void BaseApplication::ScheduleFactoryReset()
// Press both buttons to request provisioning
if (GetPlatform().GetButtonState(APP_ACTION_BUTTON))
{
Provision::Manager::GetInstance().RequestProvision();
Provision::Manager::GetInstance().SetProvisionRequired(true);
}
PlatformMgr().HandleServerShuttingDown();
ConfigurationMgr().InitiateFactoryReset();
Expand All @@ -779,18 +778,13 @@ void BaseApplication::OnPlatformEvent(const ChipDeviceEvent * event, intptr_t)

void BaseApplication::OutputQrCode(bool refreshLCD)
{
CHIP_ERROR err = CHIP_NO_ERROR;
(void) refreshLCD; // could be unused

// Create buffer for the Qr code setup payload that can fit max size and null terminator.
char setupPayloadBuffer[chip::QRCodeBasicSetupPayloadGenerator::kMaxQRCodeBase38RepresentationLength + 1];
chip::MutableCharSpan setupPayload(setupPayloadBuffer);

#if PROVISION_CHANNEL_ENABLED
err = Provision::Manager::GetInstance().GetStorage().GetSetupPayload(setupPayload);
#else
err = Silabs::SilabsDeviceDataProvider::GetDeviceDataProvider().GetSetupPayload(setupPayload);
#endif
CHIP_ERROR err = Provision::Manager::GetInstance().GetStorage().GetSetupPayload(setupPayload);
if (CHIP_NO_ERROR == err)
{
// Print setup info on LCD if available
Expand Down
16 changes: 5 additions & 11 deletions examples/platform/silabs/MatterConfig.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -61,11 +61,7 @@ static chip::DeviceLayer::Internal::Efr32PsaOperationalKeystore gOperationalKeys
#include "SilabsTestEventTriggerDelegate.h"
#include <app/InteractionModelEngine.h>
#include <app/TimerDelegates.h>
#if PROVISION_CHANNEL_ENABLED
#include <provision/ProvisionManager.h>
#else
#include <SilabsDeviceDataProvider.h> // nogncheck
#endif

#if CHIP_CONFIG_SYNCHRONOUS_REPORTS_ENABLED
#include <app/reporting/SynchronizedReportSchedulerImpl.h>
Expand Down Expand Up @@ -194,13 +190,11 @@ CHIP_ERROR SilabsMatterConfig::InitMatter(const char * appName)

ReturnErrorOnFailure(PlatformMgr().InitChipStack());

#if PROVISION_CHANNEL_ENABLED
SetDeviceInstanceInfoProvider(&Silabs::Provision::Manager::GetInstance().GetStorage());
SetCommissionableDataProvider(&Silabs::Provision::Manager::GetInstance().GetStorage());
#else
SetDeviceInstanceInfoProvider(&Silabs::SilabsDeviceDataProvider::GetDeviceDataProvider());
SetCommissionableDataProvider(&Silabs::SilabsDeviceDataProvider::GetDeviceDataProvider());
#endif
// Provision Manager
Silabs::Provision::Manager & provision = Silabs::Provision::Manager::GetInstance();
ReturnErrorOnFailure(provision.Init());
SetDeviceInstanceInfoProvider(&provision.GetStorage());
SetCommissionableDataProvider(&provision.GetStorage());

chip::DeviceLayer::ConnectivityMgr().SetBLEDeviceName(appName);

Expand Down
20 changes: 0 additions & 20 deletions examples/platform/silabs/SiWx917/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -98,21 +98,6 @@ source_set("siwx917-matter-shell") {
}
}

source_set("silabs-factory-data-provider") {
sources = [
"${silabs_common_plat_dir}/SilabsDeviceDataProvider.cpp",
"${silabs_common_plat_dir}/SilabsDeviceDataProvider.h",
]

public_deps = [
"${chip_root}/src/credentials",
"${chip_root}/src/platform:platform_base",
"${chip_root}/src/setup_payload",
]

public_configs = [ ":siwx917-common-config" ]
}

config("siwx917-common-config") {
defines = [ "OTA_PERIODIC_TIMEOUT=${ota_periodic_query_timeout_sec}" ]

Expand Down Expand Up @@ -251,11 +236,6 @@ source_set("siwx917-common") {
# Provisionned data and credentials
public_deps += [ "${silabs_common_plat_dir}/provision:provision-siwx917" ]

# Factory Data Provider
if (use_efr32_factory_data_provider && !use_provision_channel) {
public_deps += [ ":silabs-factory-data-provider" ]
}

if (silabs_test_event_trigger_enabled) {
sources +=
[ "${silabs_common_plat_dir}/SilabsTestEventTriggerDelegate.cpp" ]
Expand Down
Loading

0 comments on commit eae4864

Please sign in to comment.