diff --git a/examples/light-switch-app/telink/Readme.md b/examples/light-switch-app/telink/Readme.md index 486eb9506cdfd9..523a81ac11ea81 100755 --- a/examples/light-switch-app/telink/Readme.md +++ b/examples/light-switch-app/telink/Readme.md @@ -95,7 +95,8 @@ following states: - **1** ID of endpoint -3. Add an ACL to the development kit that is programmed with the Lighting Application Example by running the following command: +4. Add an ACL to the development kit that is programmed with the Lighting + Application Example by running the following command: ``` ${CHIP_TOOL_DIR}/chip-tool accesscontrol write acl '[{"fabricIndex": 1, "privilege": 5, "authMode": 2, "subjects": [112233], "targets": null}, {"fabricIndex": 1, "privilege": 3, "authMode": 2, "subjects": [], "targets": [{"cluster": 6, "endpoint": 1, "deviceType": null}, {"cluster": 8, "endpoint": 1, "deviceType": null}]}]' 0 @@ -103,16 +104,16 @@ following states: In this command: - - `{"fabricIndex": 1, "privilege": 5, "authMode": 2, "subjects": [112233], "targets": null}` - is an ACL for the communication with the CHIP Tool. - - `{"fabricIndex": 1, "privilege": 5, "authMode": 2, "subjects": [], "targets": [{"cluster": 6, "endpoint": 1, "deviceType": null}, {"cluster": 8, "endpoint": 1, "deviceType": null}]}` - is an ACL for binding (cluster no. 6 is the On/Off cluster and the - cluster no. 8 is the Level Control cluster). + - `{"fabricIndex": 1, "privilege": 5, "authMode": 2, "subjects": [112233], "targets": null}` + is an ACL for the communication with the CHIP Tool. + - `{"fabricIndex": 1, "privilege": 5, "authMode": 2, "subjects": [], "targets": [{"cluster": 6, "endpoint": 1, "deviceType": null}, {"cluster": 8, "endpoint": 1, "deviceType": null}]}` + is an ACL for binding (cluster no. 6 is the On/Off cluster and the cluster + no. 8 is the Level Control cluster). This command adds permissions on the lighting application device that allows it to receive commands from the light switch device. -4. Add a binding table to the Light Switch binding cluster: +5. Add a binding table to the Light Switch binding cluster: ``` ${CHIP_TOOL_DIR}/chip-tool binding write binding '[{"fabricIndex": 1, "node": , "endpoint": 1, "cluster": 6}, {"fabricIndex": 1, "node": , "endpoint": 1, "cluster": 8}]' 1 @@ -120,10 +121,10 @@ following states: In this command: - - `{"fabricIndex": 1, "node": , "endpoint": 1, "cluster": 6}` is a - binding for the On/Off cluster. - - `{"fabricIndex": 1, "node": , "endpoint": 1, "cluster": 8}` is a - binding for the Level Control cluster. + - `{"fabricIndex": 1, "node": , "endpoint": 1, "cluster": 6}` + is a binding for the On/Off cluster. + - `{"fabricIndex": 1, "node": , "endpoint": 1, "cluster": 8}` + is a binding for the Level Control cluster. ### Testing the communication diff --git a/examples/light-switch-app/telink/src/AppTask.cpp b/examples/light-switch-app/telink/src/AppTask.cpp index 493c6df512f8eb..6cd3ea1253e27f 100755 --- a/examples/light-switch-app/telink/src/AppTask.cpp +++ b/examples/light-switch-app/telink/src/AppTask.cpp @@ -103,7 +103,7 @@ CHIP_ERROR AppTask::Init() { LOG_ERR("InitBindingHandler() failed"); return ret; - } + } PrintOnboardingCodes(chip::RendezvousInformationFlags(chip::RendezvousInformationFlag::kBLE)); diff --git a/examples/light-switch-app/telink/src/ZclCallbacks.cpp b/examples/light-switch-app/telink/src/ZclCallbacks.cpp old mode 100755 new mode 100644 index 9aa6ef099af151..1116c260b74e68 --- a/examples/light-switch-app/telink/src/ZclCallbacks.cpp +++ b/examples/light-switch-app/telink/src/ZclCallbacks.cpp @@ -35,9 +35,8 @@ void MatterPostAttributeChangeCallback(const chip::app::ConcreteAttributePath & if (clusterId == OnOffSwitchConfiguration::Id) { - ChipLogProgress( - Zcl, "OnOff Switch Configuration attribute ID: " ChipLogFormatMEI " Type: %u Value: %u, length %u", - ChipLogValueMEI(attributeId), type, *value, size); + ChipLogProgress(Zcl, "OnOff Switch Configuration attribute ID: " ChipLogFormatMEI " Type: %u Value: %u, length %u", + ChipLogValueMEI(attributeId), type, *value, size); // WIP Apply attribute change to Light }