Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge of CSA master into main #213

Merged
merged 350 commits into from
Jan 17, 2025
Merged

Merge of CSA master into main #213

merged 350 commits into from
Jan 17, 2025

Conversation

jmartinez-silabs
Copy link
Contributor

Merge CSA master branch (19ae943) into our Main

mkardous-silabs and others added 30 commits November 27, 2024 13:59
…east 1 subscription (#36627)

* [SL-UP] Add fabric subscription check to the interaction model engine (#117)

* Remove unwanted change

* Restyle

* Improve readability

* Restyled by clang-format

* Update src/app/SubscriptionsInfoProvider.h

Co-authored-by: lpbeliveau-silabs <[email protected]>

---------

Co-authored-by: Restyled.io <[email protected]>
Co-authored-by: lpbeliveau-silabs <[email protected]>
…tate (#36548)

* Added changes for the matter shell

* Added support for the matter shell refrigerator door state

* Added changes for the failure

* Adds required comment changes

* Added restyler changes

* Adds changes according to comment
…nd fix conformance issues (#36201)

* Add missing Water Heater device to matter-devices.xml

This PR adds the missing Water Heater device to matter-devices.xml.

The description was generated using the Alchemy tool
(https://github.com/project-chip/alchemy) with the following command:

`alchemy zap --attribute="in-progress"  --sdkRoot=./connectedhomeip/
--specRoot=./connectedhomeip-spec/
./connectedhomeip-spec/src/device_types/WaterHeater.adoc`

I manually fixed the device nae from `Matter Water Heater` to `Water
Heater`.

* zap regen

* energy-management-app: Split WH and EVSE into 2 endpoints

This PR refactors the energy-management-app into 2 separate endpoints
(one for EVSE and another for WaterHeater).

This is the first step in making this app spec-conformant.

`TC_DeviceBasicComposition.py` failed on this app before this PR and now passes.

Changes:
* Split Water Heater and EVSE into two separate endpoints (1 and 2).
  Updated zap and code.
* Dinamically disable unused endpoint at runtime. Based on the app choice
  (command line argument on linux or #define in ESP32 or SIlabs), initialize
  the clusters in the correct endpoint and disable the other endpoint.
  For example, for Water Heater, initialize clusters on endpoint 2 and
  disable endpoint 1 (EVSE).
* Refactor/move the init code related to ElectricalSensor (PowerTopology, EPM and EEM) from inside EVSE
  into ElectricalSensorInit.h/.cpp so they can be easier to reuse by both WaterHeater and EVSE.
* Refactor/move DEM cluster init code into its own file so it can be
  better reused outside EVSE.

Test performed:
1. Check basic composition for EVSE:
```
scripts/run_in_python_env.sh out/python_env './scripts/tests/run_python_test.py --app ./out/linux-x64-energy-management-no-ble/chip-energy-management-app --app-args "--application evse --trace-to json:log" --script src/python_testing/TC_DeviceBasicComposition.py --script-args "--qr-code MT:-24J0AFN00KA0648G00"'
```

2. Check basic composition for WaterHeater:
```
scripts/run_in_python_env.sh out/python_env './scripts/tests/run_python_test.py --app ./out/linux-x64-energy-management-no-ble/chip-energy-management-app --app-args "--application water-heater --trace-to json:log" --script src/python_testing/TC_DeviceBasicComposition.py --script-args "--qr-code MT:-24J0AFN00KA0648G00"'
```

3. Check app against `TC_EEVSE_2_6.py`:
```
rm -f evse.bin; ./out/linux-x64-energy-management-no-ble/chip-energy-management-app --enable-key 000102030405060708090a0b0c0d0e0f --KVS evse.bin --featureSet 0x3d

python src/python_testing/TC_EEVSE_2_6.py --endpoint 1 -m on-network -n 1234 -p 20202021 -d 3840 --hex-arg enableKey:000102030405060708090a0b0c0d0e0f
```

* Use anon namespace instead of static.

* disable enpoint on esp32 and silabs

* address Tennessee's PR feedback

* Review suggestion: move GetMainAppEndpointId to another file

* zap regen

* fix matter-devices white space diffs

* App now builds on all-clusters app

* Fix typo on init

* fix all-clusters breakage on esp32

* fix misuse of namespace in header

* Fix breakage for silabs water heater

* Update WaterHeater endpoint for CI tests

This fixes REPL test CI breakage.

* Update WaterHeater tests to endpoint 2

* Bumped ClusterRevisions

Cluster 40 (0x28) BasicInformation - 3 -> 4
Cluster 47 (0x2f) PowerSource - 2 -> 3
Cluster 48 (0x30) GeneralCommissioning 1-> 2
Cluster 3 (0x03) Identify 4 -> 5
Cluster 153 (0x99) EnergyEvse 2 -> 3
Cluster 157 (0x9d) EnergyEvseMode 1-> 2
Cluster 159 (0x9f) DeviceEnergyManagementMode 1-> 2

* Update AccessControl featureMap to enable Extension attribute

* Remove AccessControl extension attribute

* Remove kStateForecastReporting from the default feature map

That feature can't be enabled together with kPowerAdjustment.

* Update TC_WHM_1_2 endpoint to 2

* Fix various conformance issues

Remove PowerSource from root node and move to EP1/evse
Bump cluster revisions where needed
Fix device type descriptions for each EP
Remove unused Thermostat cluster and added a TODO. We need to properly
implement this cluster for this app for temperature control.

* TC_WHM_1_2: Use endpoint id passed as argument instead of hardcoded
…6628)

* [SL-UP] Remove two algo design for the wifi retry mechanism (#103)

* [SL-UP] Rename ot interval to transport interval (#108)

* [SL-UP] Delete unnecessary double abstraction for the wiseconnect power save functions (#109)

* [SL-UP] Update spi-multiplex header inclusion (#110)

* [SL-UP] Fix Builds after Wi-Fi interface refactor (#111)

* [SL-UP] Remove WF200 define duplication to avoid value conflicts at runtime (#126)

* fix spacing

* restyle

* Fix define name

* add missing function

* Fix wf200 ICD build

* Restyled by clang-format

* Add debug config

* Re added sem check

---------

Co-authored-by: Restyled.io <[email protected]>
* Move files

* Move wifi files to their final location & cleanup

* Restyled by clang-format

* rename directories

* rename paths for new locations

* Restyled by clang-format

* update include path with the structure

---------

Co-authored-by: Restyled.io <[email protected]>
* Deliver SIGINT to the sell thread to interrupt read()

* Verify that TV apps exit cleanly

* TV casting app with proper shutdown on SIGTERM

* Fix import

* Revert sigaction() usage, as it seems not to work on Darwin

* Remove ifdefs

* Use signal() instead of sigaction() on Darwin

* Restyled by clang-format

---------

Co-authored-by: Restyled.io <[email protected]>
Update light-switch-app/nrfconnect/README.md to fix privilege
…(#36645)

This PR adds a real example for running the `run_python_test.py` script against the `chip-lighting-app`.
* python.md: Fix python_env command

This PR fixes the python activation command in the tutorial.
From  `source pyenv/bin/activate` to `source out/python_env/bin/activate`

* Restyled by prettier-markdown

---------

Co-authored-by: Restyled.io <[email protected]>
…int" gn arg (#36665)

* [NXP][platform][rt1060] Disable chip_inet_config_enable_tcp_endpoint

Signed-off-by: Dina Benamar <[email protected]>

* [NXP][platform][rt1170] Disable chip_inet_config_enable_tcp_endpoint

Signed-off-by: Dina Benamar <[email protected]>

* [NXP][platform][rw61x] Disable chip_inet_config_enable_tcp_endpoint

Signed-off-by: Dina Benamar <[email protected]>

---------

Signed-off-by: Dina Benamar <[email protected]>
* [SL-UP] Bugfix/silabs out rtt removal (#142)

* [SL-UP] Bugfix/matter shell crash nullptr (#125)

* Added checks on null ptr to prevent uart shell crash and modified ICD shell commands to be compatible with our internal structure
* Update energy-management-app README.md

Add link to `kBasicInstallationTestEvent` definition

* Update README.md

* Update README.md

* Restyle

* Update README.md

Use commit it
…653)

* remove Active flag when the readhandler is going to be destroyed

* Restyled by clang-format

---------

Co-authored-by: Restyled.io <[email protected]>
…#36664)

* Fix Matter 1.3 certifiction TC-LWM-1.1 case that feature-map should be 0

Signed-off-by: Chin-Ran Lo <[email protected]>
(cherry picked from commit 21c40394dd0df65b1dd07e6cf9545f9d5cb1af25)

* Update laundry washer ZAP file to pass TC-IDM-10.2/10.4/10.5 during Matter 1.4 SVE

Signed-off-by: Oliver Fan <[email protected]>

[nxp toup][laundry-washer-app][common] Update laundry washer to pass TC-OPSTATE-2.6 during Matter 1.4 SVE

Signed-off-by: Oliver Fan <[email protected]>

[nxp toup][laundry-washer-app][RW612][RTOS] Update RW612 RTOS laundry washer app to pass TC-OPSTATE-2.6 during Matter 1.4 SVE

Signed-off-by: Oliver Fan <[email protected]>

[nxp toup][laundry-washer-app][RT1170][RTOS] Update RT1170+IW612 RTOS laundry washer app to pass TC-OPSTATE-2.6 during Matter 1.4 SVE

Signed-off-by: Oliver Fan <[email protected]>

[nxp toup][laundry-washer-app][RW612][Zephyr] Update laundry washer to pass TC-OPSTATE-2.6, TC-IDM-10.2/10.4/10.5 during Matter 1.4 SVE

Signed-off-by: Oliver Fan <[email protected]>

* Update RW/RT device types ZAP files to align with latest root node configuration updates done in thermostat zap configuration

Signed-off-by: Lo,Chin-Ran <[email protected]>

* Update RT1060 RTOS laundry washer app to aligh with rw61x and rt1170 to pass TC-OPSTATE-2.6

Signed-off-by: Oliver Fan <[email protected]>

* Restyled by clang-format

* Restyled by gn

---------

Signed-off-by: Oliver Fan <[email protected]>
Signed-off-by: Lo,Chin-Ran <[email protected]>
Co-authored-by: Chin-Ran Lo <[email protected]>
Co-authored-by: Oliver Fan <[email protected]>
Co-authored-by: Restyled.io <[email protected]>
* descriptor: decouple from ember

* Restyled by clang-format

* fix shadow error

* fix test build

* fix test build

* use Client cluster iteration

* Restyled by clang-format

* fix CI building error

* fix android build

* review changes

* Restyled by clang-format

* review changes

* some doc changes

* Fix the semantic tags iterator and add unit tests for the new functions

* Restyled by clang-format

* fix clang tidy check

* add composition test

* Restyled by clang-format

* Update src/app/data-model-provider/MetadataTypes.h

Co-authored-by: Boris Zbarsky <[email protected]>

* Update src/app/codegen-data-model-provider/CodegenDataModelProvider.cpp

Co-authored-by: Boris Zbarsky <[email protected]>

---------

Co-authored-by: Restyled.io <[email protected]>
Co-authored-by: Andrei Litvin <[email protected]>
Co-authored-by: Boris Zbarsky <[email protected]>
…4 (#36546)

* Updating TC_CADMIN_1_9 test module:
- Replacing wait with using 3 and 50 as error codes possible when attempting to commission on the 21st attempt!

* Restyled by autopep8

* Updating TC_CADMIN_1_9 test module:
- Attempting to resolve linting error for bare except

* Updating TC_CADMIN_1_9 test module:
- Attempting to resolve linting errors

* Updating CADMIN_1_9 test module:
- Replaced exception to using asserts.assert_in() function instead, much cleaner!

---------

Co-authored-by: Restyled.io <[email protected]>
* Fix JniReferences::GetOptionalValue

It's possible the optional is not of class java/util/Optional so just use the object provided

* fix formatting
* Formatting code extracts

Formatting code extracts

* Update python.md

WARNING: Could not lex literal_block as "python"
…6689)

* Documentation: Fix incorrect paths in fuzz_testing.md and yaml.md

* Update fuzz_testing.md
…SystemTimer.h (#36690)

* Fix: Ensure SYSTEM_STATS_INCREMENT only on successful Timer allocation

* Update SystemTimer.h
A binding client means that this device would be reaching out and
writing to the binding cluster on another endpoint, which is likely
NOT what was intended here since it doesn't do that.

The current app now shows no clusters listed in the client list
on any cluster (from device dump).
* Remove some stutterning from endpoint composition (pattern repeated)

* Remove some explitic bits, add comments about what endpoint composition patterns are

* Restyle

* Restyled by clang-format

* Fix typo

---------

Co-authored-by: Restyled.io <[email protected]>
rcasallas-silabs and others added 23 commits January 15, 2025 16:37
* [Silabs] Provision: Dynamic buffer allocation.

* Code review.
* [bouffalo lab] Update bouffalo lab documents for contact sensor and new platform bl616

* Restyled by prettier-markdown

* fix document references

* Restyled by prettier-markdown

---------

Co-authored-by: Restyled.io <[email protected]>
* Generated using ./alchemy zap --attribute="in-progress" ... /PushAVStreamTransport.adoc

* Generated with ./scripts/tools/zap_regen_all.py

* Update to latest spec using:
./alchemy zap --attribute="in-progress" ... /PushAVStreamTransport.adoc

* Regenerated using  ./scripts/tools/zap_regen_all.py

* Restyled by whitespace

* Restyled by prettier-json

* Add missing description

---------

Co-authored-by: Restyled.io <[email protected]>
* Create initial test draft for WasherCtrl

* Remove test logs

* Fix and add missing assert

* replace WriteAttribute with write_single_attribute

* Change second write

* Change decorator for test to allow pic validation

* Restyled by isort

* Add endpoint to WASHERCTRL test

* Add loop for testing of all valid SpinSpeed values

* Restyled by autopep8

* Remove unused import

* Update src/python_testing/TC_WASHERCTRL_2_1.py

Co-authored-by: Andrei Litvin <[email protected]>

---------

Co-authored-by: Restyled.io <[email protected]>
Co-authored-by: Andrei Litvin <[email protected]>
* Bump submodule for sdk updates and docker image version

* Update files and libs pulled from sisdk. add -fno-lto ld flag. update mg24 linkerfile

* Bring PSA crypto changes from sisdk

Co-authored-by: Ricardo Casallas <[email protected]>

* fixup merge conflict on CHIPCryptoPALPsaEfr32.cpp

* Update mgm24 linkerfile. add no-lto to test-driver

* update mg26 linkerfile

* Adds mbedTLS 3.x support with tinycrypt uECC APIs (#132)

* [SL-UP] Add BRD4338A support for Wiseconnect 3.4 in GN (#104)

* Update for siwx917

* Changes for wifi sdk 3.4.0 (#89)

* fix slc-gen build

* fix wifi ncp build

* Fixup nxp submodule desync

* Fix ot_lib builds

* Fix linking issue with coapi lib. address comments

* Cleanup commented lines and bump merged matter_support sha

* move some psa define from coap config to the right header

* Add segger_rtt reference in linkerfile

* fix rebase to master conflict issue

---------

Co-authored-by: Ricardo Casallas <[email protected]>
Co-authored-by: Rohan Sahay <[email protected]>
Co-authored-by: Mathieu Kardous <[email protected]>
Co-authored-by: bhmanda-silabs <[email protected]>
* Generated using:
./alchemy zap --attribute="in-progress" --sdkRoot=[] --specRoot=[] 'TLSCertificateManagement.adoc'

With manual edits adding description & apiMaturity

* Generated using ./scripts/tools/zap_regen_all.py
* Implement python test for TC_DGWIFI_2_1.py

* Address review comments

* Restyled by autopep8

* Remove unused import

* Update src/python_testing/TC_DGWIFI_2_1.py

Co-authored-by: Andrei Litvin <[email protected]>

* Address review comments

---------

Co-authored-by: Restyled.io <[email protected]>
Co-authored-by: Andrei Litvin <[email protected]>
* Patch unsafe strlen in TLVWriter

This is a vulnerability from Weave that was recently fixed. Apply
the patch to Matter TLVWriter as well. This avoids reading bad
pointers beyond stack-allocated memory.

> One of the PutString function overloads makes a call to strlen
> without safeguards. This has caused faults on several products when
> passing in uninitialized memory. While these call sites have been
> fixed with explicit initialization, we can also make the core
> library more secure. Use the container to determine a maximum length
> and avoid buffer overflow.

* Fix comment and apply clang-format

* Fixes for clang-tidy
* Implement test plan TC_DGWIFI_2_3

* Update src/python_testing/TC_DGWIFI_2_3.py

Co-authored-by: Andrei Litvin <[email protected]>

* Address review comment

* Update test step description

---------

Co-authored-by: Andrei Litvin <[email protected]>
* ESP32: Fix dependency of esp_secure_cert_mgr

* fix conversion error in EndpointQueueFilter
Regular update of nRF Connect SDK to 2.9.0 version.

Signed-off-by: Adrian Gielniewski <[email protected]>
`CONFIG_NET_SOCKETS_POSIX_NAMES` has been deprecated in Zephyr
in favor of `CONFIG_POSIX_API`.
`CONFIG_POSIX_API` enables additional functionalities other than
sockets, resulting in increased footprint.
This commit extends `ZephyrSocket.h` to include Zephyr socket
header and allow building with both configs disabled, adding
neccessary wrappers.
* Fixes for DeviceConformance tests

* Restore OTA Requester on EP0

* Adding OTA Requestor to device type
… (#36801)

* Renaming prior to the delivery of the work about "NFC Commissioning".

In current code, "NFC Commissioning" was used for Onboarding Payload data put into an NFC Tag.
This naming will create confusion with the new "NFC Commissioning" feature
where NFC is used as the commissioning channel.

We propose to use the folllowing names:
- "NFC onboarding payload" when an NFC Tag is used to store the onboarding payload data
(as an alternate solution to QRCode)
- "NFC commissioning" when an NFC Tag is used to perform the first commissioning phase
(as an alternate solution to BLE)

Defines, variables and files have been renamed to reflect this.
The following renaming have been done:
- CHIP_DEVICE_CONFIG_ENABLE_NFC -> CHIP_DEVICE_CONFIG_ENABLE_NFC_ONBOARDING_PAYLOAD
- CONFIG_CHIP_NFC_COMMISSIONING -> CONFIG_CHIP_NFC_ONBOARDING_PAYLOAD
- chip_enable_nfc -> chip_enable_nfc_onboarding_payload
- NFCManager -> NFCOnboardingPayloadManager
- NFCManagerImpl -> NFCOnboardingPayloadManagerImpl
- NFCMgr -> NFCOnboardingMgr
- NFCMgrImpl -> NFCOnboardingPayloadMgrImpl

The following files have been renamed for the platforms Zephyr, nrfconnect, nxp/k32w0 and telink:
NFCManagerImpl.cpp -> NFCOnboardingPayloadManagerImpl.cpp
NFCManagerImpl.h -> NFCOnboardingPayloadManagerImpl.h
NFCManager.h -> NFCOnboardingPayloadManager.h

* Changes suggested by Damian from Nordic.

* Update docs/platforms/nrf/nrfconnect_examples_configuration.md

Co-authored-by: Boris Zbarsky <[email protected]>

* Update docs/platforms/nrf/nrfconnect_examples_configuration.md

Co-authored-by: Boris Zbarsky <[email protected]>

* Update docs/platforms/nrf/nrfconnect_examples_configuration.md

Co-authored-by: Boris Zbarsky <[email protected]>

* Update examples/contact-sensor-app/nxp/mcxw71/include/config/CHIPProjectConfig.h

Co-authored-by: Boris Zbarsky <[email protected]>

* Update examples/lock-app/nxp/k32w1/include/config/CHIPProjectConfig.h

Co-authored-by: Boris Zbarsky <[email protected]>

* Update examples/contact-sensor-app/nxp/k32w1/include/config/CHIPProjectConfig.h

Co-authored-by: Boris Zbarsky <[email protected]>

* Update src/platform/stm32/args.gni

Co-authored-by: Boris Zbarsky <[email protected]>

* Update src/include/platform/internal/GenericPlatformManagerImpl.ipp

Co-authored-by: Boris Zbarsky <[email protected]>

* Update src/include/platform/NFCOnboardingPayloadManager.h

Co-authored-by: Boris Zbarsky <[email protected]>

* Update examples/lock-app/nxp/mcxw71/include/config/CHIPProjectConfig.h

Co-authored-by: Boris Zbarsky <[email protected]>

* Update examples/lighting-app/nxp/k32w1/include/config/CHIPProjectConfig.h

Co-authored-by: Boris Zbarsky <[email protected]>

* Update examples/lighting-app/nxp/mcxw71/include/config/CHIPProjectConfig.h

Co-authored-by: Boris Zbarsky <[email protected]>

* Changes suggested by Alex Tsitsiura [Telink]

* Restyled by clang-format

* Restyled by prettier-markdown

* Renamed CHIP_NFC_COMMISSIONING in nrfconnect config file.

---------

Co-authored-by: Boris Zbarsky <[email protected]>
Co-authored-by: Restyled.io <[email protected]>
Co-authored-by: Andrei Litvin <[email protected]>
We shouldn't need separate specializations of EncodeListItem for T, T&, const T,
and const T&.  Try to collapse those all down to "const T&".
… updates (#36610)

* Update mbedTLS configuration

* Addressing comments

* Replace with use of public APIs

* Updated Support SDK pointer

* Updated Support SDK pointer

* WIP: Wiseconnect 3.4.0 support

* Adds IPMU changes

* Update pointers

* Add fix for LCD

* Cleanup of duplicate entry

* Refactor device attestation key handling in ProvisionStorageFlash.cpp

* Revert changes

---------

Co-authored-by: Andrei Litvin <[email protected]>
* Implement python test script for TC_DGWIFI_2_2

* Restyled by clang-format

* Update src/app/clusters/wifi-network-diagnostics-server/wifi-network-diagnostics-server.h

Co-authored-by: Andrei Litvin <[email protected]>

* Use wait event instead of hard sleep

---------

Co-authored-by: Restyled.io <[email protected]>
Co-authored-by: Andrei Litvin <[email protected]>
@jmartinez-silabs jmartinez-silabs requested a review from a team as a code owner January 16, 2025 21:20
@@ -40,7 +40,11 @@ RUN apt-get update \
icecc \
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PR requires Standard MERGE into main branch

@mkardous-silabs mkardous-silabs merged commit 5d40535 into main Jan 17, 2025
12 of 14 checks passed
@mkardous-silabs mkardous-silabs deleted the csa branch January 17, 2025 15:35
@mkardous-silabs mkardous-silabs restored the csa branch January 20, 2025 16:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.