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

[BUG] Doorlock: CredentialIndex in LockOperationEvent is incorrect for Remote operation #24985

Closed
jrhees-cae opened this issue Feb 10, 2023 · 0 comments · Fixed by #24986
Closed

Comments

@jrhees-cae
Copy link
Contributor

Reproduction steps

  1. Create 1 user with credential UserIndex == 44, and CredentialIndex == 55:
    chip-tool doorlock set-user 0 44 "Test45" 445 null 0 0 1 1 --timedInteractionTimeoutMs 1000
    chip-tool doorlock set-credential 0 '{ "credentialType" : 1 , "credentialIndex" : 55 }' 4455 44 null null 1 1 --timedInteractionTimeoutMs 1000

  2. Operate lock via unlock-door command:
    chip-tool doorlock unlock-door 1 1 --PinCode 4455 --timedInteractionTimeoutMs 1000

  3. Read LockOperation event:
    chip-tool doorlock read-event lock-operation 1 1

  4. Note that 'CredentialIndex' in event is incorrect (reads as '44' but should be '55'):

[1676055173.372648][293882:293887] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0101 Event 0x0000_0002
[1676055173.372704][293882:293887] CHIP:TOO:   Event number: 1179651
[1676055173.372742][293882:293887] CHIP:TOO:   Priority: Critical
[1676055173.372784][293882:293887] CHIP:TOO:   Timestamp: 16537
[1676055173.372863][293882:293887] CHIP:TOO:   LockOperation: {
[1676055173.372922][293882:293887] CHIP:TOO:     LockOperationType: 1
[1676055173.372974][293882:293887] CHIP:TOO:     OperationSource: 7
[1676055173.373030][293882:293887] CHIP:TOO:     UserIndex: 44
[1676055173.373076][293882:293887] CHIP:TOO:     FabricIndex: 1
[1676055173.373127][293882:293887] CHIP:TOO:     SourceNode: 112233
[1676055173.373183][293882:293887] CHIP:TOO:     Credentials: 1 entries
[1676055173.373283][293882:293887] CHIP:TOO:       [1]: {
[1676055173.373339][293882:293887] CHIP:TOO:         CredentialType: 1
[1676055173.373391][293882:293887] CHIP:TOO:         CredentialIndex: 44
[1676055173.373440][293882:293887] CHIP:TOO:        }
[1676055173.373493][293882:293887] CHIP:TOO:    }

Bug prevalence

Consistent

GitHub hash of the SDK that was being used

5ad70f6

Platform

core

Platform Version(s)

No response

Anything else?

No response

jrhees-cae added a commit to jrhees-cae/connectedhomeip that referenced this issue Feb 10, 2023
yufengwangca pushed a commit that referenced this issue Feb 11, 2023
…ted remotely (#24985) (#24986)

* DoorLock: Fix incorrect CredentialIndex on LockOperation events initiated remotely (#24985)

* Update YAML tests
lecndav pushed a commit to lecndav/connectedhomeip that referenced this issue Mar 22, 2023
…ted remotely (project-chip#24985) (project-chip#24986)

* DoorLock: Fix incorrect CredentialIndex on LockOperation events initiated remotely (project-chip#24985)

* Update YAML tests
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant