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

ICD Client Behavior #1089

Open
dmartauz opened this issue Feb 28, 2025 · 6 comments
Open

ICD Client Behavior #1089

dmartauz opened this issue Feb 28, 2025 · 6 comments

Comments

@dmartauz
Copy link

Matter specification defines ICD client Behavior requirements:

Image

It is required for Long Idle Time ICDs to actually operate in LIT mode:

Image

Does python-matter-server support ICD Client Behavior?

@marcelveldt
Copy link
Contributor

yes, it should as it is included in the SDK

@lboue
Copy link
Contributor

lboue commented Feb 28, 2025

I did a small test to check:

  1. I've compiled this example lit-icd-app from the SDK.
  2. I've paired it in Home Assistant and I can see that the controller hasn't registered.
  3. RegisteredClients AttributeId: 3 (0x003) remains empty

It seems that a brick is missing to handle this.

Image

Diag file:

matter-01JFWSB36P58F3NV6WSBEB0CQ6-TEST_PRODUCT-bccd3c57227eadfb7796d60f2d0cc694.json

@lboue
Copy link
Contributor

lboue commented Feb 28, 2025

Here's what the specifications say from 24-27349-006_Matter-1.4-Core-Specification.pdf page 653

Image

It works fine using chip-tool:

./chip-tool pairing code 10 34970112332 --icd-registration true
[1740761303.868] [16707:16709] [ICD] Store ICD entry successfully with peer nodeId <000000000000000A, 1> and checkin nodeId <000000000001B669, 1>
[1740761303.868] [16707:16709] [TOO] Saved ICD Symmetric key for 000000000000000A
[1740761303.868] [16707:16709] [TOO] ICD Registration Complete for device 000000000000000A / Check-In NodeID: 000000000001B669 / Monitored Subject: 000000000001B669 / Symmetric Key: 43929101bc0c4970be9661c27e5f7f6c / ICDCounter 948456568
[1740761303.868] [16707:16709] [CTL] Successfully finished commissioning step 'ICDRegistration'

./chip-tool icd list
  +------------------------------------------------------------------------------------------+
  | Known ICDs:                                                                              |
  +------------------------------------------------------------------------------------------+
  | Fabric Index:Peer Node ID | Fabric Index:CheckIn Node ID |   Start Counter |  Counter Offset | MonitoredSubject | ClientType |
  +------------------------------------------------------------------------------------------+
  |   1:000000000000000A |   1:000000000001B669 |       948456568 |               0 | 000000000001B669 |          0 |
  | aes key:                              43929101bc0c4970be9661c27e5f7f6c                   |
  | hmac key:                             43929101bc0c4970be9661c27e5f7f6c                   |
  +------------------------------------------------------------------------------------------+

./chip-tool icdmanagement read registered-clients 10 0 | grep TOO
[1740761469.676] [16729:16732] [TOO] Sending command to node 0xa
[1740761469.676] [16729:16732] [TOO] Peer is a registered LIT ICD.
[1740761469.895] [16729:16732] [TOO] Sending ReadAttribute to:
[1740761469.895] [16729:16732] [TOO]    cluster 0x0000_0046, attribute: 0x0000_0003, endpoint 0
[1740761469.900] [16729:16732] [TOO] Endpoint: 0 Cluster: 0x0000_0046 Attribute 0x0000_0003 DataVersion: 3592571304
[1740761469.900] [16729:16732] [TOO]   RegisteredClients: 1 entries
[1740761469.900] [16729:16732] [TOO]     [1]: {
[1740761469.900] [16729:16732] [TOO]       CheckInNodeID: 112233
[1740761469.900] [16729:16732] [TOO]       MonitoredSubject: 112233
[1740761469.900] [16729:16732] [TOO]       ClientType: 0
[1740761469.900] [16729:16732] [TOO]       FabricIndex: 1
[1740761469.900] [16729:16732] [TOO]      }

chip-tool-icd-registration.log

There is a Nordicsemi demo for that:

@lboue
Copy link
Contributor

lboue commented Mar 3, 2025

I found a test script. It shows how to use Python CHIP for ICD:
icd_device_test.py#L134

    devCtrl.EnableICDRegistration(devCtrl.GenerateICDRegistrationParameters())
  EnableICDRegistration = def EnableICDRegistration(parameters: 'ICDRegistrationParameters'):
                          Enables ICD registration for the following commissioning session.
                          
                          Args:
                              parameters: A ICDRegistrationParameters for the parameters used for ICD registration, or None for default arguments. 

@dmartauz
Copy link
Author

dmartauz commented Mar 9, 2025

@marcelveldt can you please comment on how to solve missing functionality?

@marcelveldt
Copy link
Contributor

Create a PR or wait until it gets implemented at some point.
It is not a priority at this moment.

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

3 participants