Skip to content

Conversation

pankore
Copy link
Contributor

@pankore pankore commented Sep 11, 2025

Summary

  • OnConnectWiFiNetworkFailed is called when Ameba failed to connect into the network
  • This fixes issue when chip-tool failed to commission Ameba after one failed attempt with incorrect password

Testing

Before changes
  1. Perform commissioning with an incorrect password.
  2. Observe that chip-tool reports a failure.
  3. Retry commissioning with the correct password.
  4. chip-tool still reports an error.
  5. Wait for a while, then try commissioning again with the correct password.
  6. Successfully connected.
After changes
  1. Perform commissioning with an incorrect password.
  2. Observe that chip-tool reports a failure.
  3. Retry commissioning with the correct password.
  4. Successfully connected.

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces a fix for commissioning retries on Ameba platforms after a failed connection attempt. The approach of adding an OnConnectWiFiNetworkFailed callback to reset the commissioning state is correct. My review includes suggestions to enhance this new callback by passing the failure reason, which will allow for more accurate error reporting to the client (e.g., distinguishing between 'network not found' and 'authentication failure'). This will improve the robustness and user experience of the commissioning process.

* OnConnectWiFiNetworkFailed is called when Ameba failed to connect into the network
* This fixes issue when chip-tool failed to commission Ameba after one failed attempt
@pankore pankore force-pushed the ameba_wifi_network_failed branch from b0b5dbd to d7c6142 Compare September 11, 2025 08:12
@andy31415
Copy link
Contributor

@pankore please add to the PR summary what parts in the master branch were cherrypicked here or if no cherrypicks applied, an explanation on why these changes do not apply to master.

The reason for this is that we want to ensure that all fixes are also contained on master, so we ask for fixes to master first.

Copy link
Contributor

@andy31415 andy31415 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@pankore
Copy link
Contributor Author

pankore commented Sep 16, 2025

Hi @andy31415, I just raised PR #41002 with the same changes to master, please help to check

@pankore pankore requested a review from andy31415 September 16, 2025 04:14
@andy31415
Copy link
Contributor

Approved after master PR merged.

@andy31415 andy31415 merged commit a9f4e57 into project-chip:v1.4-branch Sep 16, 2025
68 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants