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] CommandHandler tries to send response to a request when not required #30576

Open
simonhmorris1 opened this issue Nov 20, 2023 · 4 comments
Labels

Comments

@simonhmorris1
Copy link
Contributor

Reproduction steps

As part #30201 a ConnectNetwork request is received but no ConnectNetworkResponse is required. This will log errors in CommandHandler.

Update CommandHandler to notify it that no response is required to prevent the error being reported. See discussion here #30201 (comment)

[1699270892.045538][1147:1147] CHIP:NP: Instance::OnResult Non-Concurrent Mode, ConnectNetworkResponse will NOT be sent [1699270892.045602][1147:1147] CHIP:DMG: Endpoint 0, Cluster 0x0000_0030 update version to 869e5227 [1699270892.045639][1147:1147] CHIP:DMG: Decreasing reference count for CommandHandler, remaining 0 [1699270892.045753][1147:1147] CHIP:DMG: Failed to send command response: src/app/CommandHandler.cpp:221: CHIP Error 0x00000003: Incorrect state [1699270892.045772][1147:1147] CHIP:DMG: Command handler moving to [AwaitingDe]

To reproduce, run the system in Non-concurrent mode as described in the above ticket reference.

Bug prevalence

Every time on commissionee when running in Non-concurrent mode

GitHub hash of the SDK that was being used

cc6f964

Platform

raspi

Platform Version(s)

No response

Anything else?

No response

@bzbarsky-apple
Copy link
Contributor

@tehampson you might be interested in this, since you are touching the relevant code anyway.

@tehampson
Copy link
Contributor

Do you mind pointing out where in the spec it mentions that ConnectNetworkResponse is not required and in fact shouldn't be responded to in this instance. I am not familuar with the Non-concurrent mode stuff so any pointers to ramp up on this would be appreciated

@simonhmorris1
Copy link
Contributor Author

Here are some pointers to the Matter 1.2 specification.

Section 5.5 indicates two modes, concurrent connection and non-concurrent connection commissioning flow. A Commissioner and Commissionee with non-concurrent connection capability cannot be simultaneously connected to both the operational network (e.g Wi-Fi) and the commissioning channel (BLE).

11.8.7.9. ConnectNetwork Command
When non-concurrent commissioning is being used by a Commissioner or Administrator, it is possible
that the only method to determine success of the operation is operational discovery of the Node
on the new operational network. Therefore, before invoking the ConnectNetwork command, the
client SHOULD re-invoke the Arm Fail-Safe command with a duration that meets the following:
3. Sufficient time to allow operational discovery on the new network by a Commissioner or
Administrator.

@bzbarsky-apple
Copy link
Contributor

@tehampson The key part is that ConnectNetworkResponse would normally be sent after the operational network has been joined, but at that point the radio you would use to send it has been shut off.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants