Skip to content

Commit

Permalink
[nrfconnect] Fixed app-clusters-app binding cluster (#17740)
Browse files Browse the repository at this point in the history
In nrfconnect's implementation of all-clusters-app
omitted a binding-handler.cpp file. This issue
caused falling into a hardfault while receiving
a binding command from chip-tool.
  • Loading branch information
ArekBalysNordic authored and pull[bot] committed Jan 11, 2024
1 parent 0c7e189 commit a40b3ae
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 0 deletions.
1 change: 1 addition & 0 deletions examples/all-clusters-app/nrfconnect/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/build/
1 change: 1 addition & 0 deletions examples/all-clusters-app/nrfconnect/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ target_sources(app PRIVATE
main/main.cpp
${ALL_CLUSTERS_COMMON_DIR}/src/static-supported-modes-manager.cpp
${ALL_CLUSTERS_COMMON_DIR}/src/bridged-actions-stub.cpp
${ALL_CLUSTERS_COMMON_DIR}/src/binding-handler.cpp
${GEN_DIR}/all-clusters-app/zap-generated/callback-stub.cpp
${GEN_DIR}/all-clusters-app/zap-generated/IMClusterCommandHandler.cpp
${NRFCONNECT_COMMON}/util/LEDWidget.cpp)
Expand Down
6 changes: 6 additions & 0 deletions examples/all-clusters-app/nrfconnect/main/AppTask.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
#include "AppConfig.h"
#include "AppEvent.h"
#include "Utils.h"
#include "binding-handler.h"

#include <app/server/OnboardingCodesUtil.h>
#include <app/server/Server.h>
Expand Down Expand Up @@ -125,6 +126,11 @@ CHIP_ERROR AppTask::Init()
LOG_ERR("dk_buttons_init() failed");
return chip::System::MapErrorZephyr(ret);
}
err = InitBindingHandlers();
if (err != CHIP_NO_ERROR)
{
LOG_ERR("InitBindingHandlers() failed");
}

// Initialize timer user data
k_timer_init(&sFunctionTimer, &AppTask::TimerEventHandler, nullptr);
Expand Down

0 comments on commit a40b3ae

Please sign in to comment.