fix: Add ArmFailSafe to IP Commissioning Path#9
Merged
Conversation
Owner
|
it looks ok. thanks |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Please consider this AI generated patch. I has solved my issue with matter bridge commissioning.
Fix: Add ArmFailSafe to IP Commissioning Path
Problem
When commissioning a Matter device over IP (Ethernet/Wi-Fi), the matc controller
skipped the mandatory
ArmFailSafecommand. The Matter specification requiresArmFailSafeto be sent beforeCSRRequestto open a commissioning window onthe device side.
As a result, bridges and devices implementing the spec strictly (such as rs-matter)
rejected the
CSRRequestwith status code0xCA(IMStatusCode::FailSafeRequired,decimal 202), causing commissioning to fail immediately.
The
arm_failsafefunction and its associated constantCMD_GENERAL_COMMISSIONING_ARMFAILSAFEexisted in the codebase but were gatedbehind
#[cfg(feature = "ble")], making them unavailable for the standard IP path.Fix
#[cfg(feature = "ble")]guard fromCMD_GENERAL_COMMISSIONING_ARMFAILSAFEand from the
arm_failsafeasync function, making both available unconditionally.arm_failsafecall as the first step insidecommission(), beforesend_csr. A 60-second timeout is requested, which is the standard value usedduring commissioning.
wrapping_add) to avoid reusingthe exchange ID consumed by
ArmFailSafe.