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

Set a Custom IPK in esp_matter_controller_client (CON-1551) #1280

Open
crivi30 opened this issue Feb 17, 2025 · 2 comments
Open

Set a Custom IPK in esp_matter_controller_client (CON-1551) #1280

crivi30 opened this issue Feb 17, 2025 · 2 comments

Comments

@crivi30
Copy link

crivi30 commented Feb 17, 2025

Hello everyone!

I need to use a custom IPK instead of the default one in the matter_controller_client after calling setup_commissioner(). However, the current implementation sets the default IPK inside setup_commissioner(), and there is no direct way to override it with a custom value.

Steps to Reproduce

  1. Call setup_commissioner() from matter_controller_client.
  2. Observe that the default IPK is set using:
    chip::ByteSpan default_ipk = chip::GroupTesting::DefaultIpkValue::GetDefaultIpk();
    ESP_RETURN_ON_FALSE(chip::Credentials::SetSingleIpkEpochKey(group_data_provider, fabric_index, default_ipk,
                                                                 compressed_fabric_id_span) == CHIP_NO_ERROR,
                         ESP_FAIL, TAG, "Failed to set ipk for commissioner fabric"); 
    

There is no mechanism to pass a custom IPK instead of the default one.

Is there any existing way to set a custom IPK after calling setup_commissioner()?
If not, would modifying setup_commissioner() to accept a custom IPK be the best approach?

Thanks in advance

@github-actions github-actions bot changed the title Set a Custom IPK in esp_matter_controller_client Set a Custom IPK in esp_matter_controller_client (CON-1551) Feb 17, 2025
@wqx6
Copy link
Contributor

wqx6 commented Feb 21, 2025

I think you can call the chip::Credentials::SetSingleIpkEpochKey() with your custom IPK after setup_commissioner(). It will overwrite the existing default IPK.

@crivi30
Copy link
Author

crivi30 commented Feb 21, 2025

chip::Credentials::SetSingleIpkEpochKey requires m_group_data_provider, which is private in matter_controller_client class. Would there be another way to access or set it?

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