Skip to content

Commit

Permalink
[QPG] QPG SDK feature updates. (#30094)
Browse files Browse the repository at this point in the history
* add option in build_examples.py script to update the SW version
* enable commands, set featuremap bit for check-in support
* Use schedule lambda when triggering commissioning cycle
* Fixing the OTA build
* implementation of GetNetworkInterfaces function
* Fix for lock operation events that did not get triggered
* Update light and lock ZAP files to align with latest Matter requirements
* auto-start BLE commissioning only if NO fabrics known
* enable ICD server feature on lock app
* TotalOperationalHours attribute is disabled so don't store to NVM anymore
* Add jammed lock event trigger on button.
  • Loading branch information
dvdm-qorvo authored Oct 31, 2023
1 parent 5218c3b commit e68186f
Show file tree
Hide file tree
Showing 21 changed files with 343 additions and 663 deletions.
2 changes: 0 additions & 2 deletions examples/lighting-app/qpg/args.gni
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,6 @@ chip_stack_lock_tracking = "none"

matter_device_vid = "0xFFF1"
matter_device_pid = "0x8005"
matter_device_software_version = "0x0001"
matter_device_software_version_string = "1.0"

pw_log_BACKEND = "${chip_root}/src/lib/support/pw_log_chip"
pw_assert_BACKEND = "$dir_pw_assert_log:check_backend"
20 changes: 13 additions & 7 deletions examples/lighting-app/qpg/src/AppTask.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -257,15 +257,23 @@ void AppTask::InitServer(intptr_t arg)
// Open commissioning after boot if no fabric was available
if (chip::Server::GetInstance().GetFabricTable().FabricCount() == 0)
{
PlatformMgr().ScheduleWork(OpenCommissioning, 0);
ChipLogProgress(NotSpecified, "No fabrics, starting commissioning.");
AppTask::OpenCommissioning((intptr_t) 0);
}
}

void AppTask::OpenCommissioning(intptr_t arg)
{
// Enable BLE advertisements
chip::Server::GetInstance().GetCommissioningWindowManager().OpenBasicCommissioningWindow();
ChipLogProgress(NotSpecified, "BLE advertising started. Waiting for Pairing.");

SystemLayer().ScheduleLambda([] {
CHIP_ERROR err;
err = chip::Server::GetInstance().GetCommissioningWindowManager().OpenBasicCommissioningWindow();
if (err == CHIP_NO_ERROR)
{
ChipLogProgress(NotSpecified, "BLE advertising started. Waiting for Pairing.");
}
});
}

CHIP_ERROR AppTask::Init()
Expand Down Expand Up @@ -486,10 +494,8 @@ void AppTask::FunctionHandler(AppEvent * aEvent)
else
{
// Enable BLE advertisements and pairing window
if (chip::Server::GetInstance().GetCommissioningWindowManager().OpenBasicCommissioningWindow() == CHIP_NO_ERROR)
{
ChipLogProgress(NotSpecified, "BLE advertising started. Waiting for Pairing.");
}
AppTask::OpenCommissioning((intptr_t) 0);
ChipLogProgress(NotSpecified, "BLE advertising started. Waiting for Pairing.");
}
}
else if (sAppTask.mFunctionTimerActive && sAppTask.mFunction == kFunction_SoftwareUpdate)
Expand Down
26 changes: 0 additions & 26 deletions examples/lighting-app/qpg/zap/light.matter
Original file line number Diff line number Diff line change
Expand Up @@ -206,9 +206,6 @@ server cluster LevelControl = 8 {
readonly attribute int16u remainingTime = 1;
readonly attribute int8u minLevel = 2;
readonly attribute int8u maxLevel = 3;
readonly attribute int16u currentFrequency = 4;
readonly attribute int16u minFrequency = 5;
readonly attribute int16u maxFrequency = 6;
attribute LevelControlOptions options = 15;
attribute nullable int8u onLevel = 17;
attribute access(write: manage) nullable int8u startUpCurrentLevel = 16384;
Expand Down Expand Up @@ -957,7 +954,6 @@ server cluster GeneralDiagnostics = 51 {
readonly attribute NetworkInterface networkInterfaces[] = 0;
readonly attribute int16u rebootCount = 1;
readonly attribute int64u upTime = 2;
readonly attribute int32u totalOperationalHours = 3;
readonly attribute BootReasonEnum bootReason = 4;
readonly attribute HardwareFaultEnum activeHardwareFaults[] = 5;
readonly attribute RadioFaultEnum activeRadioFaults[] = 6;
Expand Down Expand Up @@ -1873,7 +1869,6 @@ endpoint 0 {
callback attribute networkInterfaces;
callback attribute rebootCount default = 0x0000;
callback attribute upTime default = 0x0000000000000000;
callback attribute totalOperationalHours default = 0x00000000;
callback attribute bootReason;
callback attribute activeHardwareFaults;
callback attribute activeRadioFaults;
Expand Down Expand Up @@ -2115,9 +2110,6 @@ endpoint 1 {
ram attribute remainingTime default = 0x0000;
ram attribute minLevel default = 0x01;
ram attribute maxLevel default = 0xFE;
ram attribute currentFrequency default = 0x0000;
ram attribute minFrequency default = 0x0000;
ram attribute maxFrequency default = 0x0000;
ram attribute options default = 0x00;
ram attribute onLevel default = 0xFF;
persist attribute startUpCurrentLevel default = 255;
Expand Down Expand Up @@ -2149,24 +2141,6 @@ endpoint 1 {
callback attribute clusterRevision default = 1;
}

server cluster FixedLabel {
callback attribute labelList;
callback attribute generatedCommandList;
callback attribute acceptedCommandList;
callback attribute attributeList;
ram attribute featureMap default = 0;
ram attribute clusterRevision default = 1;
}

server cluster UserLabel {
callback attribute labelList;
callback attribute generatedCommandList;
callback attribute acceptedCommandList;
callback attribute attributeList;
ram attribute featureMap default = 0;
ram attribute clusterRevision default = 1;
}

server cluster ColorControl {
ram attribute currentHue default = 0x00;
ram attribute currentSaturation default = 0x00;
Expand Down
Loading

0 comments on commit e68186f

Please sign in to comment.