Skip to content

Commit

Permalink
Merge branch 'master' into pigweed_chip_backends
Browse files Browse the repository at this point in the history
  • Loading branch information
andy31415 committed Oct 30, 2024
2 parents ce47b10 + 7df7676 commit 54a1f28
Show file tree
Hide file tree
Showing 119 changed files with 6,474 additions and 2,357 deletions.
1 change: 1 addition & 0 deletions BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ if (current_toolchain != "${dir_pw_toolchain}/default:default") {
"${chip_root}/src/lib/core/tests:fuzz-tlv-reader-pw(//build/toolchain/pw_fuzzer:chip_pw_fuzztest)",
"${chip_root}/src/lib/dnssd/minimal_mdns/tests:fuzz-minmdns-packet-parsing-pw(//build/toolchain/pw_fuzzer:chip_pw_fuzztest)",
"${chip_root}/src/lib/format/tests:fuzz-payload-decoder-pw(//build/toolchain/pw_fuzzer:chip_pw_fuzztest)",
"${chip_root}/src/protocols/secure_channel/tests:fuzz-PASE-pw(//build/toolchain/pw_fuzzer:chip_pw_fuzztest)",
"${chip_root}/src/setup_payload/tests:fuzz-setup-payload-base38-pw(//build/toolchain/pw_fuzzer:chip_pw_fuzztest)",
]
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -403,14 +403,14 @@ CHIP_ERROR Storage::GetManufacturingDate(uint8_t * value, size_t max, size_t & s
return SilabsConfig::ReadConfigValueStr(SilabsConfig::kConfigKey_ManufacturingDate, (char *) value, max, size);
}

CHIP_ERROR Storage::SetUniqueId(const uint8_t * value, size_t size)
CHIP_ERROR Storage::SetPersistentUniqueId(const uint8_t * value, size_t size)
{
return SilabsConfig::WriteConfigValueBin(SilabsConfig::kConfigKey_UniqueId, value, size);
return SilabsConfig::WriteConfigValueBin(SilabsConfig::kConfigKey_PersistentUniqueId, value, size);
}

CHIP_ERROR Storage::GetUniqueId(uint8_t * value, size_t max, size_t & size)
CHIP_ERROR Storage::GetPersistentUniqueId(uint8_t * value, size_t max, size_t & size)
{
return SilabsConfig::ReadConfigValueBin(SilabsConfig::kConfigKey_UniqueId, value, max, size);
return SilabsConfig::ReadConfigValueBin(SilabsConfig::kConfigKey_PersistentUniqueId, value, max, size);
}

//
Expand Down
8 changes: 4 additions & 4 deletions examples/platform/silabs/provision/ProvisionStorageFlash.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -470,14 +470,14 @@ CHIP_ERROR Storage::GetManufacturingDate(uint8_t * value, size_t max, size_t & s
return Flash::Get(Parameters::ID::kManufacturingDate, value, max, size);
}

CHIP_ERROR Storage::SetUniqueId(const uint8_t * value, size_t size)
CHIP_ERROR Storage::SetPersistentUniqueId(const uint8_t * value, size_t size)
{
return Flash::Set(Parameters::ID::kUniqueId, value, size);
return Flash::Set(Parameters::ID::kPersistentUniqueId, value, size);
}

CHIP_ERROR Storage::GetUniqueId(uint8_t * value, size_t max, size_t & size)
CHIP_ERROR Storage::GetPersistentUniqueId(uint8_t * value, size_t max, size_t & size)
{
return Flash::Get(Parameters::ID::kUniqueId, value, max, size);
return Flash::Get(Parameters::ID::kPersistentUniqueId, value, max, size);
}

//
Expand Down
51 changes: 12 additions & 39 deletions integrations/docker/images/chip-cert-bins/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,13 @@ RUN set -x \
clang \
clang-format \
clang-tidy \
cmake \
curl \
flex \
gcc \
g++ \
gcc \
git \
git-lfs \
gperf \
iproute2 \
jq \
Expand All @@ -54,11 +56,12 @@ RUN set -x \
libcairo2-dev \
libdbus-1-dev \
libdbus-glib-1-dev \
libdmalloc-dev \
libgif-dev \
libgirepository1.0-dev \
libglib2.0-dev \
libical-dev \
libjpeg-dev \
libdmalloc-dev \
libmbedtls-dev \
libncurses5-dev \
libncursesw5-dev \
Expand All @@ -79,55 +82,23 @@ RUN set -x \
pkg-config \
python3 \
python3-dev \
python3-pip \
python3-venv \
rsync \
shellcheck \
software-properties-common \
strace \
systemd \
udev \
unzip \
wget \
git-lfs \
zlib1g-dev \
&& git lfs install \
&& : # last line

# Cmake (Mbed OS requires >=3.19.0-rc3 version which is not available in Ubuntu 20.04 repository)
RUN case ${TARGETPLATFORM} in \
"linux/amd64") \
set -x \
&& (cd /tmp \
&& wget --progress=dot:giga https://github.com/Kitware/CMake/releases/download/v3.19.3/cmake-3.19.3-Linux-x86_64.sh \
&& sh cmake-3.19.3-Linux-x86_64.sh --exclude-subdir --prefix=/usr/local \
&& rm -rf cmake-3.19.3-Linux-x86_64.sh) \
&& exec bash \
;; \
"linux/arm64") \
set -x \
&& (cd /tmp \
&& wget --progress=dot:giga https://github.com/Kitware/CMake/releases/download/v3.19.3/cmake-3.19.3-Linux-aarch64.sh \
&& sh cmake-3.19.3-Linux-aarch64.sh --exclude-subdir --prefix=/usr/local \
&& rm -rf cmake-3.19.3-Linux-aarch64.sh) \
&& exec bash \
;; \
*) \
test -n "$TARGETPLATFORM" \
echo "Unsupported platform ${TARGETPLATFORM}" \
;; \
esac

# Python 3 and PIP
RUN set -x \
&& DEBIAN_FRONTEND=noninteractive apt-get install -y \
libgirepository1.0-dev \
software-properties-common \
&& add-apt-repository universe \
&& curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py \
&& python3 get-pip.py --break-system-packages \
&& : # last line

RUN set -x \
&& pip3 install attrs coloredlogs PyGithub pygit future portpicker mobly click cxxfilt ghapi pandas tabulate --break-system-packages \
&& pip3 install --break-system-packages \
attrs coloredlogs PyGithub pygit future portpicker mobly click cxxfilt ghapi pandas tabulate \
&& : # last line

# build and install gn
Expand Down Expand Up @@ -327,4 +298,6 @@ RUN pip install --break-system-packages -r /tmp/requirements.txt && rm /tmp/requ
# PIP requires MASON package compilation, which seems to require a JDK
RUN set -x && DEBIAN_FRONTEND=noninteractive apt-get update; apt-get install -fy openjdk-8-jdk

RUN pip install --break-system-packages --no-cache-dir python_lib/controller/python/chip*.whl
RUN pip install --break-system-packages --no-cache-dir \
python_lib/python/obj/src/python_testing/matter_testing_infrastructure/chip-testing._build_wheel/chip_testing-*.whl \
python_lib/controller/python/chip*.whl
Original file line number Diff line number Diff line change
Expand Up @@ -109,33 +109,55 @@ limitations under the License.
and enforce Access Control for the Node's endpoints and their associated
cluster instances.</description>

<attribute side="server" code="0x0000" define="ACL" type="array" entryType="AccessControlEntryStruct" writable="true">
<description>ACL</description>
<attribute side="server" code="0x0000" name="ACL" define="ACL" type="array" entryType="AccessControlEntryStruct" writable="true">
<access op="read" privilege="administer"/>
<access op="write" privilege="administer"/>
<mandatoryConform/>
</attribute>

<attribute side="server" code="0x0001" define="EXTENSION" type="array" entryType="AccessControlExtensionStruct" writable="true" optional="true">
<description>Extension</description>
<attribute side="server" code="0x0001" name="Extension" define="EXTENSION" type="array" entryType="AccessControlExtensionStruct" writable="true" optional="true">
<access op="read" privilege="administer"/>
<access op="write" privilege="administer"/>
<mandatoryConform>
<feature name="EXTS"/>
</mandatoryConform>
</attribute>

<attribute side="server" code="0x0002" define="SUBJECTS_PER_ACCESS_CONTROL_ENTRY" type="int16u" min="4" default="4">SubjectsPerAccessControlEntry</attribute>
<attribute side="server" code="0x0003" define="TARGETS_PER_ACCESS_CONTROL_ENTRY" type="int16u" min="3" default="3">TargetsPerAccessControlEntry</attribute>
<attribute side="server" code="0x0004" define="ACCESS_CONTROL_ENTRIES_PER_FABRIC" type="int16u" min="4" default="4">AccessControlEntriesPerFabric</attribute>
<attribute code="0x0005" side="server" define="COMMISSIONING_ARL" type="array" entryType="CommissioningAccessRestrictionEntryStruct" optional="true">CommissioningARL</attribute>
<attribute code="0x0006" side="server" define="ARL" type="array" entryType="AccessRestrictionEntryStruct" optional="true">ARL</attribute>

<attribute side="server" code="0x0002" name="SubjectsPerAccessControlEntry" define="SUBJECTS_PER_ACCESS_CONTROL_ENTRY" type="int16u" min="4" default="4">
<mandatoryConform/>
</attribute>
<attribute side="server" code="0x0003" name="TargetsPerAccessControlEntry" define="TARGETS_PER_ACCESS_CONTROL_ENTRY" type="int16u" min="3" default="3">
<mandatoryConform/>
</attribute>
<attribute side="server" code="0x0004" name="AccessControlEntriesPerFabric" define="ACCESS_CONTROL_ENTRIES_PER_FABRIC" type="int16u" min="4" default="4">
<mandatoryConform/>
</attribute>
<attribute code="0x0005" side="server" name="CommissioningARL" define="COMMISSIONING_ARL" type="array" entryType="CommissioningAccessRestrictionEntryStruct" optional="true">
<mandatoryConform>
<feature name="MNGD"/>
</mandatoryConform>
</attribute>
<attribute code="0x0006" side="server" name="ARL" define="ARL" type="array" entryType="AccessRestrictionEntryStruct" optional="true">
<mandatoryConform>
<feature name="MNGD"/>
</mandatoryConform>
</attribute>

<command code="0x00" source="client" name="ReviewFabricRestrictions" isFabricScoped="true" optional="true" response="ReviewFabricRestrictionsResponse">
<description>This command signals to the service associated with the device vendor that the fabric administrator would like a review of the current restrictions on the accessing fabric.</description>
<access op="invoke" privilege="administer"/>
<arg id="0" name="ARL" array="true" type="CommissioningAccessRestrictionEntryStruct"/>
</command>
<mandatoryConform>
<feature name="MNGD"/>
</mandatoryConform>
</command>

<command code="0x01" source="server" name="ReviewFabricRestrictionsResponse" optional="true" disableDefaultResponse="true">
<description>Returns the review token for the request, which can be used to correlate with a FabricRestrictionReviewUpdate event.</description>
<arg id="0" name="Token" type="int64u"/>
<mandatoryConform>
<feature name="MNGD"/>
</mandatoryConform>
</command>

<event side="server" code="0x0000" name="AccessControlEntryChanged" priority="info" isFabricSensitive="true">
Expand All @@ -145,6 +167,7 @@ limitations under the License.
<field id="3" name="ChangeType" type="ChangeTypeEnum" min="0x00" max="0x02"/>
<field id="4" name="LatestValue" type="AccessControlEntryStruct" isNullable="true"/>
<access op="read" privilege="administer"/>
<mandatoryConform/>
</event>

<event side="server" code="0x0001" name="AccessControlExtensionChanged" priority="info" isFabricSensitive="true" optional="true">
Expand All @@ -154,6 +177,9 @@ limitations under the License.
<field id="3" name="ChangeType" type="ChangeTypeEnum" min="0x00" max="0x02"/>
<field id="4" name="LatestValue" type="AccessControlExtensionStruct" isNullable="true"/>
<access op="read" privilege="administer"/>
<mandatoryConform>
<feature name="EXTS"/>
</mandatoryConform>
</event>

<event side="server" code="0x0002" name="FabricRestrictionReviewUpdate" priority="info" isFabricSensitive="true" optional="true">
Expand All @@ -162,6 +188,9 @@ limitations under the License.
<field id="1" name="Instruction" type="long_char_string" optional="true" length="512"/>
<field id="2" name="ARLRequestFlowUrl" type="long_char_string" optional="true" length="256"/>
<access op="read" privilege="administer"/>
<mandatoryConform>
<feature name="MNGD"/>
</mandatoryConform>
</event>
</cluster>
</configurator>
Original file line number Diff line number Diff line change
Expand Up @@ -28,31 +28,36 @@ limitations under the License.

<command source="client" code="0x00" name="GetSetupPIN" isFabricScoped="true" response="GetSetupPINResponse" mustUseTimedInvoke="true" optional="false">
<description>Upon receipt, the Content App checks if the account associated with the client Temp Account Identifier Rotating ID is the same acount that is active on the given Content App. If the accounts are the same, then the Content App includes the Setup PIN in the GetSetupPIN Response.</description>
<access op="invoke" role="administer" />
<access op="invoke" role="administer"/>
<arg name="TempAccountIdentifier" minLength="16" length="100" type="char_string"/>
<mandatoryConform/>
</command>

<command source="client" code="0x02" name="Login" isFabricScoped="true" mustUseTimedInvoke="true" optional="false">
<description>Upon receipt, the Content App checks if the account associated with the client’s Temp Account Identifier (Rotating ID) has a current active Setup PIN with the given value. If the Setup PIN is valid for the user account associated with the Temp Account Identifier, then the Content App MAY make that user account active.</description>
<access op="invoke" role="administer" />
<access op="invoke" role="administer"/>
<arg name="TempAccountIdentifier" minLength="16" length="100" type="char_string"/>
<arg name="SetupPIN" minLength="8" type="char_string"/>
<arg name="Node" type="node_id" optional="true" />
<arg name="Node" type="node_id" optional="true"/>
<mandatoryConform/>
</command>

<command source="client" code="0x03" name="Logout" isFabricScoped="true" mustUseTimedInvoke="true" optional="false">
<description>The purpose of this command is to instruct the Content App to clear the current user account. This command SHOULD be used by clients of a Content App to indicate the end of a user session.</description>
<arg name="Node" type="node_id" optional="true"/>
<mandatoryConform/>
</command>

<command source="server" code="0x01" name="GetSetupPINResponse" optional="false" disableDefaultResponse="true">
<description>This message is sent in response to the GetSetupPIN Request, and contains the Setup PIN code, or null when the accounts identified in the request does not match the active account of the running Content App.</description>
<arg name="SetupPIN" type="char_string"/>
<mandatoryConform/>
</command>

<event side="server" code="0x00" priority="critical" name="LoggedOut" optional="false">
<description>This event can be used by the Content App to indicate that the current user has logged out. In response to this event, the Fabric Admin SHALL remove access to this Content App by the specified Node. If no Node is provided, then the Fabric Admin SHALL remove access to all non-Admin Nodes.</description>
<field id="0" name="Node" type="node_id" optional="true"/>
<optionalConform/>
</event>

</cluster>
Expand Down
30 changes: 19 additions & 11 deletions src/app/zap-templates/zcl/data-model/chip/actions-cluster.xml
Original file line number Diff line number Diff line change
Expand Up @@ -89,11 +89,17 @@ limitations under the License.
<code>0x0025</code>
<define>ACTIONS_CLUSTER</define>
<description>This cluster provides a standardized way for a Node (typically a Bridge, but could be any Node) to expose action information.</description>

<attribute side="server" code="0x0000" define="ACTION_LIST" type="array" entryType="ActionStruct" length="256" writable="false" optional="false">ActionList</attribute>
<attribute side="server" code="0x0001" define="ENDPOINT_LIST" type="array" entryType="EndpointListStruct" length="256" writable="false" optional="false">EndpointLists</attribute>
<attribute side="server" code="0x0002" define="SETUP_URL" type="LONG_CHAR_STRING" length="512" writable="false" optional="true">SetupURL</attribute>


<attribute side="server" code="0x0000" name="ActionList" define="ACTION_LIST" type="array" entryType="ActionStruct" length="256">
<mandatoryConform/>
</attribute>
<attribute side="server" code="0x0001" name="EndpointLists" define="ENDPOINT_LIST" type="array" entryType="EndpointListStruct" length="256">
<mandatoryConform/>
</attribute>
<attribute side="server" code="0x0002" name="SetupURL" define="SETUP_URL" type="LONG_CHAR_STRING" length="512" optional="true">
<optionalConform/>
</attribute>

<command source="client" code="0x00" name="InstantAction" optional="true">
<description>This command triggers an action (state change) on the involved endpoints.</description>
<arg name="ActionID" type="int16u"/>
Expand Down Expand Up @@ -173,17 +179,19 @@ limitations under the License.

<event side="server" code="0x00" priority="info" name="StateChanged" optional="false">
<description>This event SHALL be generated when there is a change in the Status of an ActionID.</description>
<field id="0" name="ActionID" type="int16u" />
<field id="1" name="InvokeID" type="int32u" />
<field id="0" name="ActionID" type="int16u"/>
<field id="1" name="InvokeID" type="int32u"/>
<field id="2" name="NewState" type="ActionStateEnum" />
<mandatoryConform/>
</event>

<event side="server" code="0x01" priority="info" name="ActionFailed" optional="false">
<description>This event SHALL be generated when there is some error which prevents the action from its normal planned execution.</description>
<field id="0" name="ActionID" type="int16u" />
<field id="1" name="InvokeID" type="int32u" />
<field id="2" name="NewState" type="ActionStateEnum" />
<field id="3" name="Error" type="ActionErrorEnum" />
<field id="0" name="ActionID" type="int16u"/>
<field id="1" name="InvokeID" type="int32u"/>
<field id="2" name="NewState" type="ActionStateEnum"/>
<field id="3" name="Error" type="ActionErrorEnum"/>
<mandatoryConform/>
</event>

</cluster>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,16 @@ limitations under the License.
<optionalConform/>
</feature>
</features>
<attribute side="server" code="0x0000" define="WINDOW_STATUS" type="CommissioningWindowStatusEnum" writable="false" optional="false">WindowStatus</attribute>
<attribute side="server" code="0x0001" define="ADMIN_FABRIC_INDEX" type="fabric_idx" writable="false" isNullable="true" optional="false">AdminFabricIndex</attribute>
<attribute side="server" code="0x0002" define="ADMIN_VENDOR_ID" type="vendor_id" writable="false" isNullable="true" optional="false">AdminVendorId</attribute>

<attribute side="server" code="0x0000" name="WindowStatus" define="WINDOW_STATUS" type="CommissioningWindowStatusEnum">
<mandatoryConform/>
</attribute>
<attribute side="server" code="0x0001" name="AdminFabricIndex" define="ADMIN_FABRIC_INDEX" type="fabric_idx" isNullable="true">
<mandatoryConform/>
</attribute>
<attribute side="server" code="0x0002" name="AdminVendorId" define="ADMIN_VENDOR_ID" type="vendor_id" isNullable="true">
<mandatoryConform/>
</attribute>

<command source="client" code="0x00" name="OpenCommissioningWindow" mustUseTimedInvoke="true" optional="false">
<description>This command is used by a current Administrator to instruct a Node to go into commissioning mode using enhanced commissioning method.</description>
<arg name="CommissioningTimeout" type="int16u"/>
Expand All @@ -55,17 +61,22 @@ limitations under the License.
<arg name="Iterations" type="int32u"/>
<arg name="Salt" type="octet_string" length="32"/>
<access op="invoke" privilege="administer"/>
<mandatoryConform/>
</command>

<command source="client" code="0x01" name="OpenBasicCommissioningWindow" mustUseTimedInvoke="true" optional="true">
<description>This command is used by a current Administrator to instruct a Node to go into commissioning mode using basic commissioning method, if the node supports it.</description>
<arg name="CommissioningTimeout" type="int16u"/>
<access op="invoke" privilege="administer"/>
<mandatoryConform>
<feature name="BC"/>
</mandatoryConform>
</command>

<command source="client" code="0x02" name="RevokeCommissioning" mustUseTimedInvoke="true" optional="false">
<description>This command is used by a current Administrator to instruct a Node to revoke any active Open Commissioning Window or Open Basic Commissioning Window command.</description>
<access op="invoke" privilege="administer"/>
<mandatoryConform/>
</command>

</cluster>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,9 @@ limitations under the License.
</features>

<!-- Attributes -->
<attribute side="server" code="0x0000" define="AIR_QUALITY" type="AirQualityEnum" min="0" max="6" writable="false" isNullable="false" default="0" optional="false">AirQuality</attribute>
<attribute side="server" code="0x0000" name="AirQuality" define="AIR_QUALITY" type="AirQualityEnum" min="0" max="6" default="0">
<mandatoryConform/>
</attribute>
</cluster>

<!-- Cluster Data Types -->
Expand Down
Loading

0 comments on commit 54a1f28

Please sign in to comment.