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

[TE5] Global Attribute ClusterRevision looks broken for clusters of bridged devices #9823

Closed
AntonGrey opened this issue Sep 19, 2021 · 2 comments
Assignees

Comments

@AntonGrey
Copy link
Contributor

AntonGrey commented Sep 19, 2021

ClusterRevision attribute should be greater than 0. Affected clusters of Bridged devices.

  • According to spec ClusterRevision attr SHALL be greater 0.
  • Actually Cluster revision is 0.
  • Steps to reproduce:
  1. Start CHIP bridge-app example.
  2. Connect to bridge-app with chip-device-ctrl tool
  3. Perform zclread BridgedDeviceBasic ClusterRevision 12344321 2 0 command

Original issue was found during TE5.
According to spec ClusterRevision attr SHALL be greater 0
Screenshot from 2021-09-19 15-01-08

Logs:

chip-device-ctrl > zclread OnOff ClusterRevision 12344321 2 0
[1631463550.593479][2265:2273] CHIP:DMG: SendReadRequest: Client[0] [ INIT]
[1631463550.593789][2265:2273] CHIP:IN: Secure message was encrypted: Msg ID 90
[1631463550.593868][2265:2273] CHIP:IN: Encrypted message 0x8444d58 to 0x0000000000BC5C01 of type 2 and protocolId 5 on exchange 39073.
[1631463550.593939][2265:2273] CHIP:IN: Sending msg 0x8444d58 to 0x0000000000BC5C01 at utc time: 3394106 msec
[1631463550.593995][2265:2273] CHIP:IN: Sending secure msg on generic transport
[1631463550.594284][2265:2273] CHIP:IN: Secure msg send status ../../src/inet/IPEndPointBasis.cpp:915: Success
[1631463550.594520][2265:2273] CHIP:DMG: Client[0] moving to [AwaitingResponse]
[1631463550.599870][2265:2273] CHIP:EM: Received message of type 0x05 with vendorId 0x0000 and protocolId 0x0005 on exchange 39073
[1631463550.600022][2265:2273] CHIP:EM: Rxd Ack; Removing MsgId:0000005A from Retrans Table
[1631463550.600081][2265:2273] CHIP:EM: Removed CHIP MsgId:0000005A from RetransTable
[1631463550.600197][2265:2273] CHIP:DMG: ReportData =
[1631463550.600262][2265:2273] CHIP:DMG: {
[1631463550.600308][2265:2273] CHIP:DMG: AttributeDataList =
[1631463550.600370][2265:2273] CHIP:DMG: [
[1631463550.600426][2265:2273] CHIP:DMG: AttributeDataElement =
[1631463550.600498][2265:2273] CHIP:DMG: {
[1631463550.600560][2265:2273] CHIP:DMG: AttributePath =
[1631463550.600641][2265:2273] CHIP:DMG: {
[1631463550.600724][2265:2273] CHIP:DMG: NodeId = 0xbc5c01,
[1631463550.600794][2265:2273] CHIP:DMG: EndpointId = 0x2,
[1631463550.600848][2265:2273] CHIP:DMG: ClusterId = 0x6,
[1631463550.600898][2265:2273] CHIP:DMG: FieldTag = 0xfd,
[1631463550.600944][2265:2273] CHIP:DMG: }
[1631463550.600999][2265:2273] CHIP:DMG:
[1631463550.601047][2265:2273] CHIP:DMG: Data = 0,
[1631463550.601083][2265:2273] CHIP:DMG: DataElementVersion = 0x0,
[1631463550.601127][2265:2273] CHIP:DMG: },
[1631463550.601174][2265:2273] CHIP:DMG:
[1631463550.601210][2265:2273] CHIP:DMG: ],
[1631463550.601253][2265:2273] CHIP:DMG:
[1631463550.601284][2265:2273] CHIP:DMG: }
[1631463550.601755][2265:2273] CHIP:ZCL: ReadAttributesResponse:
[1631463550.601797][2265:2273] CHIP:ZCL: ClusterId: 0x0000_0006
[1631463550.601832][2265:2273] CHIP:ZCL: attributeId: 0x0000_FFFD
[1631463550.601862][2265:2273] CHIP:ZCL: status: Success (0x0000)
[1631463550.601891][2265:2273] CHIP:ZCL: attribute TLV Type: 0x04
[1631463550.601925][2265:2273] CHIP:ZCL: attributeValue: 0
[1631463550.602038][2265:2273] CHIP:DMG: Client[0] moving to [INIT]
[1631463550.602076][2265:2273] CHIP:DMG: Client[0] moving to [UNINIT]
[1631463550.602116][2265:2273] CHIP:EM: Sending Standalone Ack for MsgId:0000002E
AttributeReadResult(path=AttributePath(nodeId=12344321, endpointId=2, clusterId=6, attributeId=65533), status=0, value=0)

@AntonGrey AntonGrey changed the title [TE5] Global Attribute ClusterRevision needs to be fixed for On/Off Cluster [TE5] Global Attribute ClusterRevision looks broken for clusters of bridged device Sep 21, 2021
@AntonGrey AntonGrey changed the title [TE5] Global Attribute ClusterRevision looks broken for clusters of bridged device [TE5] Global Attribute ClusterRevision looks broken for clusters of bridged devices Sep 21, 2021
@pjzander-signify pjzander-signify self-assigned this Oct 1, 2021
@pjzander-signify
Copy link
Contributor

The storage of attributes from dynamic endpoints in memory is not supported. The reason for this is that the memory that is needed to store (fixed endpoint) attributes is generated with ZAP and it can not handle storage of attributes that are added later.

In the bridge app examples (Linux and ESP32) the storage of the revision id's is in memory. This is in contrast with all the other attributes from dynamic endpoints that are stored externally. As a result of this, reading a cluster revision attribute from a dynamic endpoint will return an incorrect value.

bzbarsky-apple pushed a commit that referenced this issue Oct 18, 2021
… devices (#9823) (#10412)

* Return an error when trying to read/write internal stored attributes when the endpoint is dynamic

* Change dynamic endpoints so that the cluster revision is read externally
@pjzander-signify
Copy link
Contributor

The issue is solved in 44304c5.
Note that cluster revision id must be returned by the bridge application. See also the example of the bridge-app in the SDK.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants