Skip to content

Commit

Permalink
[Silabs] Add SIT ICD configurations to silabs lock example (#28474)
Browse files Browse the repository at this point in the history
* rename SED for ICD

* Delete ICD subscription callback since default behavior is merged

* Enable ICD default configuration for DL
Update configs to support ICDs

* Add ICDM attributes for SIT ICD config

* generated files

* update wordlist

* update readme

* update default config comments

* add define block for ICD configs

* fix esp

* try to fix esp again

* try to fix esp again
  • Loading branch information
mkardous-silabs authored and pull[bot] committed Nov 8, 2023
1 parent 1ee16a7 commit 451c932
Show file tree
Hide file tree
Showing 23 changed files with 389 additions and 182 deletions.
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
$ ./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
6 changes: 5 additions & 1 deletion examples/lock-app/esp32/main/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ idf_component_register(INCLUDE_DIRS
"${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/server"
"${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/util"
"${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/reporting"
"${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/icd"
"${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/access-control-server"
"${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/administrator-commissioning-server"
"${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/basic-information"
Expand All @@ -74,6 +75,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 Expand Up @@ -162,6 +164,7 @@ idf_component_register(PRIV_INCLUDE_DIRS
"${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/server"
"${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/util"
"${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/reporting"
"${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/icd"
"${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/access-control-server"
"${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/administrator-commissioning-server"
"${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/basic-information"
Expand Down Expand Up @@ -189,7 +192,8 @@ idf_component_register(PRIV_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/examples/platform/esp32/lock"
"${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/icd-management-server"
"${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/platform/esp32/lock"
PRIV_REQUIRES chip QRCode bt 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 {
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
254 changes: 254 additions & 0 deletions examples/lock-app/lock-common/lock-app.zap
Original file line number Diff line number Diff line change
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
Loading

0 comments on commit 451c932

Please sign in to comment.