Skip to content

Commit

Permalink
[nrfconnect] Fix all-clusters-app commissioning (#17399)
Browse files Browse the repository at this point in the history
Common ZAP for all-clusters-app has another endpoint 0xFFFE
with NetworkCommissioning cluster, but that is not used by
Thread-based platforms and causes failures when wildcard
reads are used.
  • Loading branch information
Damian-Nordic authored and pull[bot] committed Feb 12, 2024
1 parent 4121d5c commit 1401170
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions examples/all-clusters-app/nrfconnect/main/AppTask.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,10 @@
#include <logging/log.h>
#include <zephyr.h>

using namespace ::chip;
using namespace ::chip::Credentials;
using namespace ::chip::DeviceLayer;

#define FACTORY_RESET_TRIGGER_TIMEOUT 3000
#define FACTORY_RESET_CANCEL_WINDOW_TIMEOUT 3000
#define APP_EVENT_QUEUE_SIZE 10
Expand All @@ -52,6 +56,8 @@ static LEDWidget sStatusLED;
static UnusedLedsWrapper<3> sUnusedLeds{ { DK_LED2, DK_LED3, DK_LED4 } };
static k_timer sFunctionTimer;

constexpr EndpointId kNetworkCommissioningEndpointSecondary = 0xFFFE;

namespace LedConsts {
constexpr uint32_t kBlinkRate_ms{ 500 };
namespace StatusLed {
Expand All @@ -67,10 +73,6 @@ constexpr uint32_t kOff_ms{ 950 };
} // namespace StatusLed
} // namespace LedConsts

using namespace ::chip;
using namespace ::chip::Credentials;
using namespace ::chip::DeviceLayer;

CHIP_ERROR AppTask::Init()
{
// Initialize CHIP stack
Expand Down Expand Up @@ -137,6 +139,8 @@ CHIP_ERROR AppTask::Init()
#if CONFIG_CHIP_OTA_REQUESTOR
InitBasicOTARequestor();
#endif
// We only have network commissioning on endpoint 0.
emberAfEndpointEnableDisable(kNetworkCommissioningEndpointSecondary, false);
ConfigurationMgr().LogDeviceConfig();
PrintOnboardingCodes(chip::RendezvousInformationFlag(chip::RendezvousInformationFlag::kBLE));

Expand Down

0 comments on commit 1401170

Please sign in to comment.