Skip to content

Commit e707d8b

Browse files
authored
Merge branch 'master' into Tweaks-to-EVSE-Test-plans-based-on-review(Issue-project-chip#31460)
2 parents 52bdb70 + 1259831 commit e707d8b

File tree

228 files changed

+9465
-196777
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

228 files changed

+9465
-196777
lines changed

.github/workflows/tests.yaml

+1
Original file line numberDiff line numberDiff line change
@@ -155,6 +155,7 @@ jobs:
155155
src/app/zap-templates/zcl/data-model/chip/operational-state-oven-cluster.xml \
156156
src/app/zap-templates/zcl/data-model/chip/operational-state-rvc-cluster.xml \
157157
src/app/zap-templates/zcl/data-model/chip/oven-mode-cluster.xml \
158+
src/app/zap-templates/zcl/data-model/chip/power-topology-cluster.xml \
158159
src/app/zap-templates/zcl/data-model/chip/pressure-measurement-cluster.xml \
159160
src/app/zap-templates/zcl/data-model/chip/power-source-cluster.xml \
160161
src/app/zap-templates/zcl/data-model/chip/power-source-configuration-cluster.xml \

config/esp32/components/chip/CMakeLists.txt

+6
Original file line numberDiff line numberDiff line change
@@ -185,6 +185,12 @@ if ((CONFIG_BT_ENABLED) AND (CONFIG_ENABLE_CHIPOBLE))
185185
endif()
186186
endif()
187187

188+
if (CONFIG_ENABLE_PERSIST_SUBSCRIPTIONS)
189+
chip_gn_arg_append("chip_persist_subscriptions" "true")
190+
else()
191+
chip_gn_arg_append("chip_persist_subscriptions" "false")
192+
endif()
193+
188194
if (CONFIG_ENABLE_ESP32_BLE_CONTROLLER)
189195
chip_gn_arg_append("chip_enable_ble_controller" "true")
190196
endif()

config/esp32/components/chip/Kconfig

+7
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,13 @@ menu "CHIP Core"
130130
help
131131
Some device types don't require the read client. Enabling this option may save some flash/ram.
132132

133+
config ENABLE_PERSIST_SUBSCRIPTIONS
134+
bool "Enable persist subscriptions"
135+
default y
136+
help
137+
Enable persist subscriptions to make the device resume the subscriptions from the persist
138+
subscriptions information after reboot.
139+
133140
config BUILD_CHIP_TESTS
134141
bool "Build CHIP tests"
135142
default n

docs/clusters.md

+1
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,7 @@ Generally regenerate using one of:
8484
| 152 | 0x98 | DeviceEnergyManagement |
8585
| 153 | 0x99 | EnergyEvse |
8686
| 155 | 0x9B | EnergyPreference |
87+
| 156 | 0x9C | PowerTopology |
8788
| 157 | 0x9D | EnergyEvseMode |
8889
| 159 | 0x9F | DeviceEnergyManagementMode |
8990
| 257 | 0x101 | DoorLock |

docs/guides/BUILDING.md

+27
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,33 @@ Complete the following steps:
9494
9595
1. Reboot your Raspberry Pi after installing `pi-bluetooth`.
9696
97+
#### Enable experimental Bluetooth support in BlueZ
98+
99+
The Matter application on Linux uses BlueZ to communicate with the Bluetooth
100+
controller. The BlueZ version that comes with Ubuntu 22.04 does not support all
101+
the features required by the Matter application by default. To enable these
102+
features, you need to enable experimental Bluetooth support in BlueZ.
103+
104+
1. Edit the `bluetooth.service` unit by running the following command:
105+
106+
```sh
107+
sudo systemctl edit bluetooth.service
108+
```
109+
110+
1. Add the following content to the override file:
111+
112+
```ini
113+
[Service]
114+
ExecStart=
115+
ExecStart=/usr/lib/bluetooth/bluetoothd -E
116+
```
117+
118+
1. Restart the Bluetooth service by running the following command:
119+
120+
```sh
121+
sudo systemctl restart bluetooth.service
122+
```
123+
97124
#### Configuring wpa_supplicant for storing permanent changes
98125
99126
By default, wpa_supplicant is not allowed to update (overwrite) configuration.

examples/air-purifier-app/air-purifier-common/air-purifier-app.matter

+18-2
Original file line numberDiff line numberDiff line change
@@ -759,6 +759,10 @@ cluster GeneralDiagnostics = 51 {
759759
kEthernetFault = 6;
760760
}
761761

762+
bitmap Feature : bitmap32 {
763+
kDataModelTest = 0x1;
764+
}
765+
762766
struct NetworkInterface {
763767
char_string<32> name = 0;
764768
boolean isOperational = 1;
@@ -815,10 +819,22 @@ cluster GeneralDiagnostics = 51 {
815819
nullable posix_ms posixTimeMs = 1;
816820
}
817821

822+
request struct PayloadTestRequestRequest {
823+
octet_string<16> enableKey = 0;
824+
int8u value = 1;
825+
int16u count = 2;
826+
}
827+
828+
response struct PayloadTestResponse = 4 {
829+
octet_string payload = 0;
830+
}
831+
818832
/** Provide a means for certification tests to trigger some test-plan-specific events */
819833
command access(invoke: manage) TestEventTrigger(TestEventTriggerRequest): DefaultSuccess = 0;
820834
/** Take a snapshot of system time and epoch time. */
821835
command TimeSnapshot(): TimeSnapshotResponse = 1;
836+
/** Request a variable length payload response. */
837+
command PayloadTestRequest(PayloadTestRequestRequest): PayloadTestResponse = 3;
822838
}
823839

824840
/** Commands to trigger a Node to allow a new Administrator to commission it. */
@@ -2390,8 +2406,8 @@ endpoint 0 {
23902406
callback attribute activeRadioFaults;
23912407
callback attribute activeNetworkFaults;
23922408
callback attribute testEventTriggersEnabled default = false;
2393-
ram attribute featureMap default = 0;
2394-
ram attribute clusterRevision default = 0x0002;
2409+
callback attribute featureMap;
2410+
callback attribute clusterRevision;
23952411

23962412
handle command TestEventTrigger;
23972413
handle command TimeSnapshot;

examples/air-quality-sensor-app/air-quality-sensor-common/air-quality-sensor-app.matter

+18-2
Original file line numberDiff line numberDiff line change
@@ -712,6 +712,10 @@ cluster GeneralDiagnostics = 51 {
712712
kEthernetFault = 6;
713713
}
714714

715+
bitmap Feature : bitmap32 {
716+
kDataModelTest = 0x1;
717+
}
718+
715719
struct NetworkInterface {
716720
char_string<32> name = 0;
717721
boolean isOperational = 1;
@@ -768,10 +772,22 @@ cluster GeneralDiagnostics = 51 {
768772
nullable posix_ms posixTimeMs = 1;
769773
}
770774

775+
request struct PayloadTestRequestRequest {
776+
octet_string<16> enableKey = 0;
777+
int8u value = 1;
778+
int16u count = 2;
779+
}
780+
781+
response struct PayloadTestResponse = 4 {
782+
octet_string payload = 0;
783+
}
784+
771785
/** Provide a means for certification tests to trigger some test-plan-specific events */
772786
command access(invoke: manage) TestEventTrigger(TestEventTriggerRequest): DefaultSuccess = 0;
773787
/** Take a snapshot of system time and epoch time. */
774788
command TimeSnapshot(): TimeSnapshotResponse = 1;
789+
/** Request a variable length payload response. */
790+
command PayloadTestRequest(PayloadTestRequestRequest): PayloadTestResponse = 3;
775791
}
776792

777793
/** The Software Diagnostics Cluster provides a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems. */
@@ -2103,8 +2119,8 @@ endpoint 0 {
21032119
callback attribute activeRadioFaults;
21042120
callback attribute activeNetworkFaults;
21052121
callback attribute testEventTriggersEnabled default = false;
2106-
ram attribute featureMap default = 0;
2107-
ram attribute clusterRevision default = 0x0002;
2122+
callback attribute featureMap;
2123+
callback attribute clusterRevision;
21082124

21092125
handle command TestEventTrigger;
21102126
handle command TimeSnapshot;

examples/all-clusters-app/all-clusters-common/all-clusters-app.matter

+20-2
Original file line numberDiff line numberDiff line change
@@ -1697,6 +1697,10 @@ cluster GeneralDiagnostics = 51 {
16971697
kEthernetFault = 6;
16981698
}
16991699

1700+
bitmap Feature : bitmap32 {
1701+
kDataModelTest = 0x1;
1702+
}
1703+
17001704
struct NetworkInterface {
17011705
char_string<32> name = 0;
17021706
boolean isOperational = 1;
@@ -1753,10 +1757,22 @@ cluster GeneralDiagnostics = 51 {
17531757
nullable posix_ms posixTimeMs = 1;
17541758
}
17551759

1760+
request struct PayloadTestRequestRequest {
1761+
octet_string<16> enableKey = 0;
1762+
int8u value = 1;
1763+
int16u count = 2;
1764+
}
1765+
1766+
response struct PayloadTestResponse = 4 {
1767+
octet_string payload = 0;
1768+
}
1769+
17561770
/** Provide a means for certification tests to trigger some test-plan-specific events */
17571771
command access(invoke: manage) TestEventTrigger(TestEventTriggerRequest): DefaultSuccess = 0;
17581772
/** Take a snapshot of system time and epoch time. */
17591773
command TimeSnapshot(): TimeSnapshotResponse = 1;
1774+
/** Request a variable length payload response. */
1775+
command PayloadTestRequest(PayloadTestRequestRequest): PayloadTestResponse = 3;
17601776
}
17611777

17621778
/** The Software Diagnostics Cluster provides a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems. */
@@ -7380,12 +7396,14 @@ endpoint 0 {
73807396
callback attribute acceptedCommandList;
73817397
callback attribute eventList;
73827398
callback attribute attributeList;
7383-
ram attribute featureMap default = 0;
7384-
ram attribute clusterRevision default = 0x0002;
7399+
callback attribute featureMap;
7400+
callback attribute clusterRevision;
73857401

73867402
handle command TestEventTrigger;
73877403
handle command TimeSnapshot;
73887404
handle command TimeSnapshotResponse;
7405+
handle command PayloadTestRequest;
7406+
handle command PayloadTestResponse;
73897407
}
73907408

73917409
server cluster SoftwareDiagnostics {

examples/all-clusters-app/all-clusters-common/all-clusters-app.zap

+16
Original file line numberDiff line numberDiff line change
@@ -2863,6 +2863,22 @@
28632863
"source": "server",
28642864
"isIncoming": 0,
28652865
"isEnabled": 1
2866+
},
2867+
{
2868+
"name": "PayloadTestRequest",
2869+
"code": 3,
2870+
"mfgCode": null,
2871+
"source": "client",
2872+
"isIncoming": 1,
2873+
"isEnabled": 1
2874+
},
2875+
{
2876+
"name": "PayloadTestResponse",
2877+
"code": 4,
2878+
"mfgCode": null,
2879+
"source": "server",
2880+
"isIncoming": 0,
2881+
"isEnabled": 1
28662882
}
28672883
],
28682884
"attributes": [

examples/all-clusters-minimal-app/all-clusters-common/all-clusters-minimal-app.matter

+20-2
Original file line numberDiff line numberDiff line change
@@ -1577,6 +1577,10 @@ cluster GeneralDiagnostics = 51 {
15771577
kEthernetFault = 6;
15781578
}
15791579

1580+
bitmap Feature : bitmap32 {
1581+
kDataModelTest = 0x1;
1582+
}
1583+
15801584
struct NetworkInterface {
15811585
char_string<32> name = 0;
15821586
boolean isOperational = 1;
@@ -1633,10 +1637,22 @@ cluster GeneralDiagnostics = 51 {
16331637
nullable posix_ms posixTimeMs = 1;
16341638
}
16351639

1640+
request struct PayloadTestRequestRequest {
1641+
octet_string<16> enableKey = 0;
1642+
int8u value = 1;
1643+
int16u count = 2;
1644+
}
1645+
1646+
response struct PayloadTestResponse = 4 {
1647+
octet_string payload = 0;
1648+
}
1649+
16361650
/** Provide a means for certification tests to trigger some test-plan-specific events */
16371651
command access(invoke: manage) TestEventTrigger(TestEventTriggerRequest): DefaultSuccess = 0;
16381652
/** Take a snapshot of system time and epoch time. */
16391653
command TimeSnapshot(): TimeSnapshotResponse = 1;
1654+
/** Request a variable length payload response. */
1655+
command PayloadTestRequest(PayloadTestRequestRequest): PayloadTestResponse = 3;
16401656
}
16411657

16421658
/** The Software Diagnostics Cluster provides a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems. */
@@ -6071,12 +6087,14 @@ endpoint 0 {
60716087
callback attribute acceptedCommandList;
60726088
callback attribute eventList;
60736089
callback attribute attributeList;
6074-
ram attribute featureMap default = 0;
6075-
ram attribute clusterRevision default = 0x0002;
6090+
callback attribute featureMap;
6091+
callback attribute clusterRevision;
60766092

60776093
handle command TestEventTrigger;
60786094
handle command TimeSnapshot;
60796095
handle command TimeSnapshotResponse;
6096+
handle command PayloadTestRequest;
6097+
handle command PayloadTestResponse;
60806098
}
60816099

60826100
server cluster SoftwareDiagnostics {

examples/all-clusters-minimal-app/all-clusters-common/all-clusters-minimal-app.zap

+16
Original file line numberDiff line numberDiff line change
@@ -2464,6 +2464,22 @@
24642464
"source": "server",
24652465
"isIncoming": 0,
24662466
"isEnabled": 1
2467+
},
2468+
{
2469+
"name": "PayloadTestRequest",
2470+
"code": 3,
2471+
"mfgCode": null,
2472+
"source": "client",
2473+
"isIncoming": 1,
2474+
"isEnabled": 1
2475+
},
2476+
{
2477+
"name": "PayloadTestResponse",
2478+
"code": 4,
2479+
"mfgCode": null,
2480+
"source": "server",
2481+
"isIncoming": 0,
2482+
"isEnabled": 1
24672483
}
24682484
],
24692485
"attributes": [

examples/android/CHIPTool/app/src/main/java/com/google/chip/chiptool/provisioning/AddressCommissioningFragment.kt

+6-2
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ class AddressCommissioningFragment : Fragment() {
5151
val address = binding.addressEditText.text.toString()
5252
val discriminator = binding.discriminatorEditText.text.toString()
5353
val pincode = binding.pincodeEditText.text.toString()
54+
val port = binding.portEditText.text.toString()
5455

5556
if (address.isEmpty() || discriminator.isEmpty() || pincode.isEmpty()) {
5657
Log.e(TAG, "Address, discriminator, or pincode was empty: $address $discriminator $pincode")
@@ -62,7 +63,8 @@ class AddressCommissioningFragment : Fragment() {
6263
CHIPDeviceInfo(
6364
discriminator = discriminator.toInt(),
6465
setupPinCode = pincode.toLong(),
65-
ipAddress = address
66+
ipAddress = address,
67+
port = port.toInt()
6668
)
6769
)
6870
}
@@ -169,7 +171,7 @@ class AddressCommissioningFragment : Fragment() {
169171
val deviceController = ChipClient.getDeviceController(requireContext())
170172
for (i in 0..10) {
171173
val device = deviceController.getDiscoveredDevice(i) ?: break
172-
ipAddressList.add("${device.ipAddress}, ${device.discriminator}")
174+
ipAddressList.add("${device.ipAddress}, ${device.discriminator}, ${device.port}")
173175
}
174176
requireActivity().runOnUiThread {
175177
binding.discoverListSpinner.adapter =
@@ -179,9 +181,11 @@ class AddressCommissioningFragment : Fragment() {
179181
override fun onItemSelected(parent: AdapterView<*>, view: View, position: Int, id: Long) {
180182
val address = ipAddressList[position].split(",")[0].trim()
181183
val discriminator = ipAddressList[position].split(",")[1].trim()
184+
val port = ipAddressList[position].split(",")[2].trim()
182185

183186
binding.addressEditText.setText(address)
184187
binding.discriminatorEditText.setText(discriminator)
188+
binding.portEditText.setText(port)
185189
}
186190

187191
override fun onNothingSelected(parent: AdapterView<*>) {}

examples/android/CHIPTool/app/src/main/java/com/google/chip/chiptool/provisioning/DeviceProvisioningFragment.kt

+1-2
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,6 @@ class DeviceProvisioningFragment : Fragment() {
160160

161161
private fun pairDeviceWithAddress() {
162162
// IANA CHIP port
163-
val port = 5540
164163
val id = DeviceIdUtil.getNextAvailableId(requireContext())
165164

166165
DeviceIdUtil.setNextAvailableId(requireContext(), id + 1)
@@ -171,7 +170,7 @@ class DeviceProvisioningFragment : Fragment() {
171170
deviceController.pairDeviceWithAddress(
172171
id,
173172
deviceInfo.ipAddress,
174-
port,
173+
deviceInfo.port,
175174
deviceInfo.discriminator,
176175
deviceInfo.setupPinCode,
177176
null

examples/android/CHIPTool/app/src/main/java/com/google/chip/chiptool/setuppayloadscanner/CHIPDeviceInfo.kt

+1
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ data class CHIPDeviceInfo(
3636
val discoveryCapabilities: MutableSet<DiscoveryCapability> = mutableSetOf(),
3737
val isShortDiscriminator: Boolean = false,
3838
val ipAddress: String? = null,
39+
val port: Int = 5540
3940
) : Parcelable {
4041

4142
companion object {

0 commit comments

Comments
 (0)