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

[Silabs] Add SIT ICD configurations to silabs lock example #28474

Merged
merged 12 commits into from
Aug 3, 2023
3 changes: 2 additions & 1 deletion .github/.wordlist.txt
Original file line number Diff line number Diff line change
Expand Up @@ -632,6 +632,7 @@ hci
hciattach
hciconfig
hdlc
HEPA
HKDF
HMAC
hoc
Expand All @@ -641,7 +642,6 @@ HomePods
hostapd
hostname
href
HEPA
HTTPS
HW
hwadr
Expand All @@ -652,6 +652,7 @@ IasWd
iaszone
ibb
ICA
ICD
iCloud
ICMP
IDF
Expand Down
4 changes: 2 additions & 2 deletions examples/light-switch-app/silabs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -131,9 +131,9 @@ Silicon Labs platform.

./scripts/examples/gn_silabs_example.sh examples/light-switch-app/silabs/efr32/ out/light-switch-app BRD4187C chip_build_libshell=true

* Build the example as Sleepy End Device (SED)
* Build the example as Intermittently Connected Device (ICD)

$ ./scripts/examples/gn_silabs_example.sh ./examples/light-switch-app/silabs/efr32/ ./out/light-switch-app_SED BRD4187C --sed
mkardous-silabs marked this conversation as resolved.
Show resolved Hide resolved
$ ./scripts/examples/gn_silabs_example.sh ./examples/light-switch-app/silabs/efr32/ ./out/light-switch-app_ICD BRD4187C --icd

or use gn as previously mentioned but adding the following arguments:

Expand Down
4 changes: 2 additions & 2 deletions examples/lighting-app/silabs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -123,9 +123,9 @@ Silicon Labs platform.
$ cd ~/connectedhomeip/examples/lighting-app/silabs/efr32
$ rm -rf out/

* Build the example as Sleepy End Device (SED)
* Build the example as Intermittently Connected Device (ICD)

$ ./scripts/examples/gn_silabs_example.sh ./examples/lighting-app/silabs/efr32/ ./out/lighting-app_SED BRD4187C --sed
$ ./scripts/examples/gn_silabs_example.sh ./examples/lighting-app/silabs/efr32/ ./out/lighting-app_ICD BRD4187C --icd

or use gn as previously mentioned but adding the following arguments:

Expand Down
1 change: 1 addition & 0 deletions examples/lock-app/esp32/main/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ idf_component_register(INCLUDE_DIRS
"${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/door-lock-server"
"${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/identify-server"
"${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/groups-server"
"${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/icd-management-server"
PRIV_REQUIRES bt chip QRCode nvs_flash driver)
add_dependencies(${COMPONENT_LIB} app-codegen)

Expand Down
32 changes: 32 additions & 0 deletions examples/lock-app/lock-common/lock-app.matter
Original file line number Diff line number Diff line change
Expand Up @@ -1662,6 +1662,30 @@ server cluster UserLabel = 65 {
readonly attribute int16u clusterRevision = 65533;
}

/** Allows servers to ensure that listed clients are notified when a server is available for communication. */
server cluster IcdManagement = 70 {
mkardous-silabs marked this conversation as resolved.
Show resolved Hide resolved
bitmap Feature : BITMAP32 {
kCheckInProtocolSupport = 0x1;
}

fabric_scoped struct MonitoringRegistrationStruct {
fabric_sensitive node_id checkInNodeID = 1;
fabric_sensitive int64u monitoredSubject = 2;
fabric_sensitive octet_string<16> key = 3;
fabric_idx fabricIndex = 254;
}

readonly attribute int32u idleModeInterval = 0;
readonly attribute int32u activeModeInterval = 1;
readonly attribute int16u activeModeThreshold = 2;
readonly attribute command_id generatedCommandList[] = 65528;
readonly attribute command_id acceptedCommandList[] = 65529;
readonly attribute event_id eventList[] = 65530;
readonly attribute attrib_id attributeList[] = 65531;
readonly attribute bitmap32 featureMap = 65532;
readonly attribute int16u clusterRevision = 65533;
}

/** An interface to a generic way to secure a door */
server cluster DoorLock = 257 {
enum AlarmCodeEnum : ENUM8 {
Expand Down Expand Up @@ -2541,6 +2565,14 @@ endpoint 0 {
ram attribute featureMap default = 0;
ram attribute clusterRevision default = 1;
}

server cluster IcdManagement {
callback attribute idleModeInterval default = 500;
callback attribute activeModeInterval default = 300;
callback attribute activeModeThreshold default = 300;
ram attribute featureMap default = 0x0000;
ram attribute clusterRevision default = 1;
}
}
endpoint 1 {
device type doorlock = 10, version 1;
Expand Down
256 changes: 255 additions & 1 deletion examples/lock-app/lock-common/lock-app.zap
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"featureLevel": 96,
"featureLevel": 97,
"creator": "zap",
"keyValuePairs": [
{
Expand Down Expand Up @@ -5322,6 +5322,260 @@
}
]
},
{
"name": "ICD Management",
"code": 70,
"mfgCode": null,
"define": "ICD_MANAGEMENT_CLUSTER",
"side": "client",
"enabled": 0,
"attributes": [
{
"name": "FeatureMap",
"code": 65532,
"mfgCode": null,
"side": "client",
"type": "bitmap32",
"included": 1,
"storageOption": "RAM",
"singleton": 0,
"bounded": 0,
"defaultValue": "0",
"reportable": 1,
"minInterval": 1,
"maxInterval": 65534,
"reportableChange": 0
},
{
"name": "ClusterRevision",
"code": 65533,
"mfgCode": null,
"side": "client",
"type": "int16u",
"included": 1,
"storageOption": "RAM",
"singleton": 0,
"bounded": 0,
"defaultValue": "1",
"reportable": 1,
"minInterval": 1,
"maxInterval": 65534,
"reportableChange": 0
}
]
},
{
"name": "ICD Management",
"code": 70,
"mfgCode": null,
"define": "ICD_MANAGEMENT_CLUSTER",
"side": "server",
"enabled": 1,
"commands": [
{
"name": "RegisterClientResponse",
"code": 1,
"mfgCode": null,
"source": "server",
"incoming": 1,
"outgoing": 0
}
],
"attributes": [
{
"name": "IdleModeInterval",
"code": 0,
"mfgCode": null,
"side": "server",
"type": "int32u",
"included": 1,
"storageOption": "External",
"singleton": 0,
"bounded": 0,
"defaultValue": "500",
"reportable": 1,
"minInterval": 1,
"maxInterval": 65534,
"reportableChange": 0
},
{
"name": "ActiveModeInterval",
"code": 1,
"mfgCode": null,
"side": "server",
"type": "int32u",
"included": 1,
"storageOption": "External",
"singleton": 0,
"bounded": 0,
"defaultValue": "300",
"reportable": 1,
"minInterval": 1,
"maxInterval": 65534,
"reportableChange": 0
},
{
"name": "ActiveModeThreshold",
"code": 2,
"mfgCode": null,
"side": "server",
"type": "int16u",
"included": 1,
"storageOption": "External",
"singleton": 0,
"bounded": 0,
"defaultValue": "300",
"reportable": 1,
"minInterval": 1,
"maxInterval": 65534,
"reportableChange": 0
},
{
"name": "RegisteredClients",
"code": 3,
"mfgCode": null,
"side": "server",
"type": "array",
"included": 0,
"storageOption": "External",
"singleton": 0,
"bounded": 0,
"defaultValue": "",
"reportable": 1,
"minInterval": 1,
"maxInterval": 65534,
"reportableChange": 0
},
{
"name": "ICDCounter",
"code": 4,
"mfgCode": null,
"side": "server",
"type": "int32u",
"included": 0,
"storageOption": "External",
"singleton": 0,
"bounded": 0,
"defaultValue": "0",
"reportable": 1,
"minInterval": 1,
"maxInterval": 65534,
"reportableChange": 0
},
{
"name": "ClientsSupportedPerFabric",
"code": 5,
"mfgCode": null,
"side": "server",
"type": "int16u",
"included": 0,
"storageOption": "External",
"singleton": 0,
"bounded": 0,
"defaultValue": "1",
"reportable": 1,
"minInterval": 1,
"maxInterval": 65534,
"reportableChange": 0
},
{
"name": "GeneratedCommandList",
"code": 65528,
"mfgCode": null,
"side": "server",
"type": "array",
"included": 0,
"storageOption": "External",
"singleton": 0,
"bounded": 0,
"defaultValue": "",
"reportable": 1,
"minInterval": 1,
"maxInterval": 65534,
"reportableChange": 0
},
{
"name": "AcceptedCommandList",
"code": 65529,
"mfgCode": null,
"side": "server",
"type": "array",
"included": 0,
"storageOption": "External",
"singleton": 0,
"bounded": 0,
"defaultValue": "",
"reportable": 1,
"minInterval": 1,
"maxInterval": 65534,
"reportableChange": 0
},
{
"name": "EventList",
"code": 65530,
"mfgCode": null,
"side": "server",
"type": "array",
"included": 0,
"storageOption": "RAM",
"singleton": 0,
"bounded": 0,
"defaultValue": "",
"reportable": 1,
"minInterval": 1,
"maxInterval": 65534,
"reportableChange": 0
},
{
"name": "AttributeList",
"code": 65531,
"mfgCode": null,
"side": "server",
"type": "array",
"included": 0,
"storageOption": "External",
"singleton": 0,
"bounded": 0,
"defaultValue": "",
"reportable": 1,
"minInterval": 1,
"maxInterval": 65534,
"reportableChange": 0
},
{
"name": "FeatureMap",
"code": 65532,
"mfgCode": null,
"side": "server",
"type": "bitmap32",
"included": 1,
"storageOption": "RAM",
"singleton": 0,
"bounded": 0,
"defaultValue": "0x0000",
"reportable": 1,
"minInterval": 1,
"maxInterval": 65534,
"reportableChange": 0
},
{
"name": "ClusterRevision",
"code": 65533,
"mfgCode": null,
"side": "server",
"type": "int16u",
"included": 1,
"storageOption": "RAM",
"singleton": 0,
"bounded": 0,
"defaultValue": "1",
"reportable": 1,
"minInterval": 1,
"maxInterval": 65534,
"reportableChange": 0
}
]
},
{
"name": "Occupancy Sensing",
"code": 1030,
Expand Down
4 changes: 2 additions & 2 deletions examples/lock-app/silabs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -130,10 +130,10 @@ Mac OS X
$ rm -rf out/
```

* Build the example as Sleepy End Device (SED)
* Build the example as Intermittently Connected Device (ICD)

```
$ ./scripts/examples/gn_silabs_example.sh ./examples/lock-app/silabs/efr32/ ./out/lock-app_SED BRD4187C --sed
$ ./scripts/examples/gn_silabs_example.sh ./examples/lock-app/silabs/efr32/ ./out/lock-app_ICD BRD4187C --icd
```

or use gn as previously mentioned but adding the following arguments:
Expand Down
2 changes: 1 addition & 1 deletion examples/lock-app/silabs/openthread.gn
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ check_system_includes = true
default_args = {
target_cpu = "arm"
target_os = "freertos"
chip_openthread_ftd = true
chip_openthread_ftd = false

import("//openthread.gni")
}
Loading