Skip to content

Commit

Permalink
Merge branch 'master' into quick-fix-TV_ContentLauncherCluster
Browse files Browse the repository at this point in the history
  • Loading branch information
tehampson committed Jan 24, 2023
2 parents 1e0f2d8 + 7c17463 commit 0e492b9
Show file tree
Hide file tree
Showing 153 changed files with 10,818 additions and 6,091 deletions.
1 change: 1 addition & 0 deletions .github/.wordlist.txt
Original file line number Diff line number Diff line change
Expand Up @@ -416,6 +416,7 @@ diffsyms
dimmable
dirname
dirs
disableNotifyUpdateApplied
disambiguated
discoverable
DispatchEvent
Expand Down
10 changes: 10 additions & 0 deletions config/nrfconnect/chip-module/Kconfig.defaults
Original file line number Diff line number Diff line change
Expand Up @@ -104,9 +104,19 @@ config BT_PERIPHERAL_PREF_MIN_INT
config BT_PERIPHERAL_PREF_MAX_INT
default 36

# Increase BT timeout to 5 s to improve connection reliability and avoid fast drop outs.
config BT_PERIPHERAL_PREF_TIMEOUT
default 500

config BT_GAP_AUTO_UPDATE_CONN_PARAMS
default y

# Decrease connection parameters update time, as some Matter controllers request
# enabling IP networking faster than BT connection parameters are updated, what may result
# in commissioning instabilities.
config BT_CONN_PARAM_UPDATE_TIMEOUT
default 1000

config BT_GATT_DYNAMIC_DB
default y

Expand Down
4 changes: 4 additions & 0 deletions config/nrfconnect/chip-module/Kconfig.hci_rpmsg.defaults
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,10 @@ config BT_HCI_RAW_RESERVE
config BT_BUF_CMD_TX_COUNT
default 10

# Enable support for Wi-Fi and Bluetooth LE coexistance
config MPSL_CX
default y

config ASSERT
default y

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3583,9 +3583,9 @@ server cluster ApplicationLauncher = 1292 {
kApplicationPlatform = 0x1;
}

struct Application {
int16u catalogVendorId = 0;
char_string applicationId = 1;
struct ApplicationStruct {
int16u catalogVendorID = 0;
char_string applicationID = 1;
}

readonly attribute INT16U catalogList[] = 0;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18311,7 +18311,7 @@
"outgoing": 1
},
{
"name": "StopPlayback",
"name": "Stop",
"code": 2,
"mfgCode": null,
"source": "client",
Expand Down Expand Up @@ -18455,7 +18455,7 @@
"code": 3,
"mfgCode": null,
"side": "server",
"type": "PlaybackPosition",
"type": "PlaybackPositionStruct",
"included": 0,
"storageOption": "External",
"singleton": 0,
Expand Down Expand Up @@ -19181,7 +19181,7 @@
"code": 1,
"mfgCode": null,
"side": "server",
"type": "ApplicationEP",
"type": "ApplicationEPStruct",
"included": 0,
"storageOption": "External",
"singleton": 0,
Expand Down
14 changes: 9 additions & 5 deletions examples/all-clusters-app/esp32/main/AppTask.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,13 @@ void AppTask::ActionCompleted(BoltLockManager::Action_t aAction)
}
}

CHIP_ERROR AppTask::LockInit()
{
ReturnErrorOnFailure(BoltLockMgr().InitLockState());
BoltLockMgr().SetCallbacks(ActionInitiated, ActionCompleted);
return CHIP_NO_ERROR;
}

CHIP_ERROR AppTask::Init()
{
/* Print chip information */
Expand All @@ -179,10 +186,7 @@ CHIP_ERROR AppTask::Init()
(void *) this, // init timer id = app task obj context
TimerEventHandler // timer callback handler
);

CHIP_ERROR err = BoltLockMgr().InitLockState();

BoltLockMgr().SetCallbacks(ActionInitiated, ActionCompleted);
VerifyOrReturnError(sFunctionTimer != NULL, CHIP_ERROR_NO_MEMORY, ESP_LOGE(TAG, "Failed to create function selection timer"));

statusLED1.Init(STATUS_LED_GPIO_NUM);
// Our second LED doesn't map to any physical LEDs so far, just to virtual
Expand All @@ -199,7 +203,7 @@ CHIP_ERROR AppTask::Init()
InitDeviceDisplay();
#endif

return err;
return CHIP_NO_ERROR;
}

void AppTask::AppTaskMain(void * pvParameter)
Expand Down
1 change: 1 addition & 0 deletions examples/all-clusters-app/esp32/main/include/AppTask.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ class AppTask
void PostEvent(const AppEvent * event);
void ButtonEventHandler(uint8_t btnIdx, uint8_t btnAction);
static void ButtonPressedAction(AppEvent * aEvent);
CHIP_ERROR LockInit();

private:
CHIP_ERROR Init();
Expand Down
7 changes: 7 additions & 0 deletions examples/all-clusters-app/esp32/main/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,13 @@ static void InitServer(intptr_t context)
emberAfEndpointEnableDisable(kNetworkCommissioningEndpointSecondary, false);

InitBindingHandlers();

CHIP_ERROR err = GetAppTask().LockInit();
if (err != CHIP_NO_ERROR)
{
ESP_LOGE(TAG, "Failed to initialize app task lock, err:%" CHIP_ERROR_FORMAT, err.Format());
}

#if CONFIG_DEVICE_TYPE_M5STACK
SetupPretendDevices();
#endif
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2639,7 +2639,7 @@ server cluster MediaPlayback = 1286 {

command Play(): PlaybackResponse = 0;
command Pause(): PlaybackResponse = 1;
command StopPlayback(): PlaybackResponse = 2;
command Stop(): PlaybackResponse = 2;
}

server cluster MediaInput = 1287 {
Expand Down Expand Up @@ -2928,30 +2928,30 @@ server cluster ApplicationLauncher = 1292 {
kApplicationPlatform = 0x1;
}

struct Application {
int16u catalogVendorId = 0;
char_string applicationId = 1;
struct ApplicationStruct {
int16u catalogVendorID = 0;
char_string applicationID = 1;
}

readonly attribute bitmap32 featureMap = 65532;
readonly attribute int16u clusterRevision = 65533;

request struct LaunchAppRequest {
Application application = 0;
optional ApplicationStruct application = 0;
optional OCTET_STRING data = 1;
}

request struct StopAppRequest {
Application application = 0;
optional ApplicationStruct application = 0;
}

request struct HideAppRequest {
Application application = 0;
optional ApplicationStruct application = 0;
}

response struct LauncherResponse = 3 {
ApplicationLauncherStatusEnum status = 0;
OCTET_STRING data = 1;
optional OCTET_STRING data = 1;
}

command LaunchApp(LaunchAppRequest): LauncherResponse = 0;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17811,7 +17811,7 @@
"outgoing": 1
},
{
"name": "StopPlayback",
"name": "Stop",
"code": 2,
"mfgCode": null,
"source": "client",
Expand Down Expand Up @@ -17965,7 +17965,7 @@
"code": 3,
"mfgCode": null,
"side": "server",
"type": "PlaybackPosition",
"type": "PlaybackPositionStruct",
"included": 0,
"storageOption": "External",
"singleton": 0,
Expand Down Expand Up @@ -18717,7 +18717,7 @@
"code": 1,
"mfgCode": null,
"side": "server",
"type": "ApplicationEP",
"type": "ApplicationEPStruct",
"included": 0,
"storageOption": "External",
"singleton": 0,
Expand Down
3 changes: 3 additions & 0 deletions examples/chip-tool/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,8 @@ static_library("chip-tool-utils") {
"commands/common/Commands.h",
"commands/common/CredentialIssuerCommands.h",
"commands/common/HexConversion.h",
"commands/common/RemoteDataModelLogger.cpp",
"commands/common/RemoteDataModelLogger.h",
"commands/delay/SleepCommand.cpp",
"commands/delay/WaitForCommissioneeCommand.cpp",
"commands/discover/DiscoverCommand.cpp",
Expand Down Expand Up @@ -110,6 +112,7 @@ static_library("chip-tool-utils") {
"${chip_root}/src/controller/data_model",
"${chip_root}/src/credentials:file_attestation_trust_store",
"${chip_root}/src/lib",
"${chip_root}/src/lib/support/jsontlv",
"${chip_root}/src/platform",
"${chip_root}/third_party/inipp",
"${chip_root}/third_party/jsoncpp",
Expand Down
6 changes: 6 additions & 0 deletions examples/chip-tool/commands/clusters/ClusterCommand.h
Original file line number Diff line number Diff line change
Expand Up @@ -74,13 +74,17 @@ class ClusterCommand : public InteractionModelCommands, public ModelCommand, pub
CHIP_ERROR error = status.ToChipError();
if (CHIP_NO_ERROR != error)
{
ReturnOnFailure(RemoteDataModelLogger::LogErrorAsJSON(path, status));

ChipLogError(chipTool, "Response Failure: %s", chip::ErrorStr(error));
mError = error;
return;
}

if (data != nullptr)
{
ReturnOnFailure(RemoteDataModelLogger::LogCommandAsJSON(path, data));

error = DataModelLogger::LogCommand(path, data);
if (CHIP_NO_ERROR != error)
{
Expand All @@ -93,6 +97,8 @@ class ClusterCommand : public InteractionModelCommands, public ModelCommand, pub

virtual void OnError(const chip::app::CommandSender * client, CHIP_ERROR error) override
{
ReturnOnFailure(RemoteDataModelLogger::LogErrorAsJSON(error));

ChipLogProgress(chipTool, "Error: %s", chip::ErrorStr(error));
mError = error;
}
Expand Down
2 changes: 2 additions & 0 deletions examples/chip-tool/commands/clusters/DataModelLogger.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,9 @@
#include <app/ConcreteAttributePath.h>
#include <app/ConcreteCommandPath.h>
#include <app/EventHeader.h>
#include <app/MessageDef/StatusIB.h>
#include <app/data-model/DecodableList.h>
#include <commands/common/RemoteDataModelLogger.h>
#include <lib/support/BytesToHex.h>

class DataModelLogger
Expand Down
6 changes: 6 additions & 0 deletions examples/chip-tool/commands/clusters/ReportCommand.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ class ReportCommand : public InteractionModelReports, public ModelCommand, publi
CHIP_ERROR error = status.ToChipError();
if (CHIP_NO_ERROR != error)
{
ReturnOnFailure(RemoteDataModelLogger::LogErrorAsJSON(path, status));

ChipLogError(chipTool, "Response Failure: %s", chip::ErrorStr(error));
mError = error;
return;
Expand All @@ -49,6 +51,8 @@ class ReportCommand : public InteractionModelReports, public ModelCommand, publi
return;
}

ReturnOnFailure(RemoteDataModelLogger::LogAttributeAsJSON(path, data));

error = DataModelLogger::LogAttribute(path, data);
if (CHIP_NO_ERROR != error)
{
Expand All @@ -66,6 +70,8 @@ class ReportCommand : public InteractionModelReports, public ModelCommand, publi
CHIP_ERROR error = status->ToChipError();
if (CHIP_NO_ERROR != error)
{
ReturnOnFailure(RemoteDataModelLogger::LogErrorAsJSON(eventHeader, *status));

ChipLogError(chipTool, "Response Failure: %s", chip::ErrorStr(error));
mError = error;
return;
Expand Down
4 changes: 4 additions & 0 deletions examples/chip-tool/commands/clusters/WriteAttributeCommand.h
Original file line number Diff line number Diff line change
Expand Up @@ -109,13 +109,17 @@ class WriteAttribute : public InteractionModelWriter, public ModelCommand, publi
CHIP_ERROR error = status.ToChipError();
if (CHIP_NO_ERROR != error)
{
ReturnOnFailure(RemoteDataModelLogger::LogErrorAsJSON(path, status));

ChipLogError(chipTool, "Response Failure: %s", chip::ErrorStr(error));
mError = error;
}
}

void OnError(const chip::app::WriteClient * client, CHIP_ERROR error) override
{
ReturnOnFailure(RemoteDataModelLogger::LogErrorAsJSON(error));

ChipLogProgress(chipTool, "Error: %s", chip::ErrorStr(error));
mError = error;
}
Expand Down
Loading

0 comments on commit 0e492b9

Please sign in to comment.